fpowerkit 0.3.1__tar.gz → 0.3.2__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.
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/PKG-INFO +2 -9
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/README.md +1 -1
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/ess.py +6 -1
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/pvwind.py +6 -2
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/soldist.py +3 -3
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit.egg-info/PKG-INFO +2 -9
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/setup.py +1 -1
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/LICENSE +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/__init__.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/bus.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/cases.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/gen.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/grid.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/island.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/line.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/solbase.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/solcmb.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/soldss.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/solnt.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit/utils.py +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit.egg-info/SOURCES.txt +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit.egg-info/dependency_links.txt +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit.egg-info/requires.txt +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/fpowerkit.egg-info/top_level.txt +0 -0
- {fpowerkit-0.3.1 → fpowerkit-0.3.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: fpowerkit
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: A PDN solver with multiple solutions.
|
|
5
5
|
Author: fmy_xfk
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -11,13 +11,6 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Requires-Dist: feasytools>=0.0.21
|
|
13
13
|
Requires-Dist: numpy>=1.19.0
|
|
14
|
-
Dynamic: author
|
|
15
|
-
Dynamic: classifier
|
|
16
|
-
Dynamic: description
|
|
17
|
-
Dynamic: description-content-type
|
|
18
|
-
Dynamic: requires-dist
|
|
19
|
-
Dynamic: requires-python
|
|
20
|
-
Dynamic: summary
|
|
21
14
|
|
|
22
15
|
# FPowerKit - A power distribution network calculation component
|
|
23
16
|
|
|
@@ -72,9 +72,14 @@ class ESS:
|
|
|
72
72
|
return self.Charge(self.P, dur)
|
|
73
73
|
return 0
|
|
74
74
|
|
|
75
|
+
@property
|
|
76
|
+
def tanPhi(self) -> float:
|
|
77
|
+
'''tan φ = sqrt(1 - PF**2) / PF'''
|
|
78
|
+
return math.sqrt(1 - self._pf**2) / self._pf
|
|
79
|
+
|
|
75
80
|
def __q(self, P: float) -> float:
|
|
76
81
|
'''Calculate reactive power'''
|
|
77
|
-
return P *
|
|
82
|
+
return P * self.tanPhi
|
|
78
83
|
|
|
79
84
|
def GetLoad(self, t: int, cprice:float, dprice:float) -> 'tuple[float, float]':
|
|
80
85
|
'''
|
|
@@ -53,15 +53,19 @@ class PVWind:
|
|
|
53
53
|
|
|
54
54
|
@property
|
|
55
55
|
def PF(self):
|
|
56
|
-
'''Power factor, cos(phi). Reactive output Q = P *
|
|
56
|
+
'''Power factor, cos(phi). Reactive output Q = P * tan φ'''
|
|
57
57
|
return self._pf
|
|
58
58
|
@PF.setter
|
|
59
59
|
def PF(self, pf: float):
|
|
60
60
|
self._pf = pf
|
|
61
61
|
|
|
62
|
+
@property
|
|
63
|
+
def tanPhi(self):
|
|
64
|
+
return math.sqrt(1 - self._pf**2) / self._pf
|
|
65
|
+
|
|
62
66
|
def Q(self, _t):
|
|
63
67
|
'''Reactive power output, pu'''
|
|
64
|
-
return self.P(_t) *
|
|
68
|
+
return self.P(_t) * self.tanPhi
|
|
65
69
|
|
|
66
70
|
def position(self):
|
|
67
71
|
'''Return the position of the PV Panel'''
|
|
@@ -178,7 +178,7 @@ class DistFlowSolver(SolverBase):
|
|
|
178
178
|
# Add PVW constraints
|
|
179
179
|
for pID, p in island.PVWItems():
|
|
180
180
|
cons.append(pvwp[pID] <= p.P(_t))
|
|
181
|
-
cons.append(pvwp[pID] *
|
|
181
|
+
cons.append(pvwp[pID] * p.tanPhi == pvwq[pID])
|
|
182
182
|
|
|
183
183
|
# Bind GEN vars to Bus
|
|
184
184
|
pg: 'dict[str, list[VF]]' = {b: [] for b in island.Buses}
|
|
@@ -274,8 +274,8 @@ class DistFlowSolver(SolverBase):
|
|
|
274
274
|
cp.quad_over_lin(cp.hstack([P[lid], Q[lid]]), v[i]) <= l[lid]
|
|
275
275
|
)
|
|
276
276
|
|
|
277
|
-
for pID, p in island.PVWItems():
|
|
278
|
-
|
|
277
|
+
#for pID, p in island.PVWItems():
|
|
278
|
+
# cons.append(pvwp[pID] + cp.sqrt(1 - p.PF**2) == pvwq[pID])
|
|
279
279
|
|
|
280
280
|
# Objective components
|
|
281
281
|
decs = self.C * (cp.sum(list(Pdec.values())) +
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: fpowerkit
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: A PDN solver with multiple solutions.
|
|
5
5
|
Author: fmy_xfk
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -11,13 +11,6 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Requires-Dist: feasytools>=0.0.21
|
|
13
13
|
Requires-Dist: numpy>=1.19.0
|
|
14
|
-
Dynamic: author
|
|
15
|
-
Dynamic: classifier
|
|
16
|
-
Dynamic: description
|
|
17
|
-
Dynamic: description-content-type
|
|
18
|
-
Dynamic: requires-dist
|
|
19
|
-
Dynamic: requires-python
|
|
20
|
-
Dynamic: summary
|
|
21
14
|
|
|
22
15
|
# FPowerKit - A power distribution network calculation component
|
|
23
16
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|