fpowerkit 0.3.0__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/PKG-INFO +2 -2
  2. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/solcmb.py +4 -3
  3. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/soldist.py +2 -0
  4. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/soldss.py +3 -3
  5. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit.egg-info/PKG-INFO +2 -2
  6. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/setup.py +2 -2
  7. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/LICENSE +0 -0
  8. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/README.md +0 -0
  9. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/__init__.py +0 -0
  10. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/bus.py +0 -0
  11. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/cases.py +0 -0
  12. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/ess.py +0 -0
  13. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/gen.py +0 -0
  14. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/grid.py +0 -0
  15. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/island.py +0 -0
  16. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/line.py +0 -0
  17. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/pvwind.py +0 -0
  18. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/solbase.py +0 -0
  19. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/solnt.py +0 -0
  20. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit/utils.py +0 -0
  21. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit.egg-info/SOURCES.txt +0 -0
  22. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit.egg-info/dependency_links.txt +0 -0
  23. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit.egg-info/requires.txt +0 -0
  24. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/fpowerkit.egg-info/top_level.txt +0 -0
  25. {fpowerkit-0.3.0 → fpowerkit-0.3.1}/setup.cfg +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: fpowerkit
3
- Version: 0.3.0
4
- Summary: A Distflow PDN solver based on Gurobi.
3
+ Version: 0.3.1
4
+ Summary: A PDN solver with multiple solutions.
5
5
  Author: fmy_xfk
6
6
  Classifier: Programming Language :: Python :: 3
7
7
  Classifier: License :: OSI Approved :: MIT License
@@ -1,13 +1,13 @@
1
- from enum import StrEnum
1
+ from enum import Enum
2
2
  from typing import Union, Iterable
3
3
  from .grid import Grid
4
4
  from .solbase import DEFAULT_SAVETO, GridSolveResult, SolverBase
5
5
  from warnings import warn
6
6
 
7
- class Estimator(StrEnum):
7
+ class Estimator(Enum):
8
8
  DistFlow = 'DistFlow'
9
9
 
10
- class Calculator(StrEnum):
10
+ class Calculator(Enum):
11
11
  OpenDSS = 'OpenDSS'
12
12
  Newton = 'Newton'
13
13
  NoneSolver = 'None'
@@ -24,6 +24,7 @@ class CombinedSolver(SolverBase):
24
24
  super().__init__(grid, eps, max_iter, default_saveto = default_saveto)
25
25
 
26
26
  from .soldist import DistFlowSolver
27
+ assert estimator == Estimator.DistFlow, "Only DistFlow is supported for now."
27
28
  self.est = DistFlowSolver(grid, mlrp = mlrp)
28
29
  self.cal_str = calculator
29
30
  if calculator in CALCULATORS_NEED_SOURCE_BUS:
@@ -3,6 +3,7 @@ from pathlib import Path
3
3
  from typing import Optional, Union
4
4
  from dataclasses import dataclass
5
5
  import math
6
+ import warnings
6
7
  from .solbase import *
7
8
  from .island import *
8
9
 
@@ -138,6 +139,7 @@ class DistFlowSolver(SolverBase):
138
139
  from cvxpy import Variable as Var
139
140
  except ImportError:
140
141
  raise ImportError("cvxpy or ecos is not installed. Please install them using 'pip install cvxpy ecos'")
142
+ warnings.filterwarnings("ignore", category=FutureWarning, module="cvxpy")
141
143
  cons: 'list[cp.Constraint]' = []
142
144
  # Create GEN vars
143
145
  pg0: 'dict[str, VF]' = {}
@@ -8,7 +8,7 @@ def _convert(il:Island, t:int, source_bus:str):
8
8
  raise ImportError("py_dss_interface or OpenDSS is not installed. Please install OpenDSS first and then py_dss_interface using 'pip install py_dss_interface'")
9
9
 
10
10
  try:
11
- d = DSS()
11
+ d = DSS() # type: ignore
12
12
  except:
13
13
  d = DSS.DSSDLL() # type: ignore
14
14
  d.text("clear")
@@ -103,8 +103,8 @@ class OpenDSSSolver(SolverBase):
103
103
  self.dss.text("calcv")
104
104
  self.dss.text("solve maxcontrol=10000")
105
105
  if hasattr(self.dss, "circuit"):
106
- bnames = self.dss.circuit.buses_names
107
- bvolt = np.array(self.dss.circuit.buses_volts).reshape(-1, 3, 2)
106
+ bnames = self.dss.circuit.buses_names # type: ignore
107
+ bvolt = np.array(self.dss.circuit.buses_volts).reshape(-1, 3, 2) # type: ignore
108
108
  else:
109
109
  bnames = self.dss.circuit_all_bus_names() # type: ignore
110
110
  bvolt = np.array(self.dss.circuit_all_bus_volts()).reshape(-1, 3, 2) # type: ignore
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: fpowerkit
3
- Version: 0.3.0
4
- Summary: A Distflow PDN solver based on Gurobi.
3
+ Version: 0.3.1
4
+ Summary: A PDN solver with multiple solutions.
5
5
  Author: fmy_xfk
6
6
  Classifier: Programming Language :: Python :: 3
7
7
  Classifier: License :: OSI Approved :: MIT License
@@ -5,10 +5,10 @@ with open("desc.md", "r", encoding="utf8") as f:
5
5
 
6
6
  setup(
7
7
  name="fpowerkit",
8
- version="0.3.0",
8
+ version="0.3.1",
9
9
  author="fmy_xfk",
10
10
  packages=find_packages(),
11
- description="A Distflow PDN solver based on Gurobi.",
11
+ description="A PDN solver with multiple solutions.",
12
12
  long_description=long_description,
13
13
  long_description_content_type="text/markdown",
14
14
  classifiers=[
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes