Skip to content

Commit 3d15e6b

Browse files
committed
Match changes in DSS C-API, test with v0.10.6rc1
1 parent dcefae4 commit 3d15e6b

File tree

8 files changed

+174
-90
lines changed

8 files changed

+174
-90
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ matrix:
77
sudo: required
88
env:
99
- DOCKER_IMAGE=pmeira/manylinux_wheel_cmake_fpc
10-
- DSS_CAPI_TAG=0.10.6a2
10+
- DSS_CAPI_TAG=0.10.6rc1
1111
- LINUX_X64=1
1212
- CONDA_SUBDIR=linux-64
1313
services:
@@ -32,7 +32,7 @@ matrix:
3232
sudo: required
3333
env:
3434
- DOCKER_IMAGE=pmeira/manylinux_wheel_cmake_fpc_i686
35-
- DSS_CAPI_TAG=0.10.6a2
35+
- DSS_CAPI_TAG=0.10.6rc1
3636
- CONDA_SUBDIR=linux-32
3737
services:
3838
- docker
@@ -52,7 +52,7 @@ matrix:
5252
- name: "osx_x64"
5353
os: osx
5454
env:
55-
- DSS_CAPI_TAG=0.10.6a2
55+
- DSS_CAPI_TAG=0.10.6rc1
5656
script:
5757
- export TRAVIS_TAG_DSS_PYTHON=$TRAVIS_TAG
5858
- export TRAVIS_TAG=

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ clone_folder: c:\projects\dss_python
55
cache:
66
- c:\projects\VCForPython27.msi
77
environment:
8-
DSS_CAPI_TAG: 0.10.6a2
8+
DSS_CAPI_TAG: 0.10.6rc1
99
DSS_CAPI_PATH: c:\projects\dss_capi
1010
ANACONDA_API_TOKEN:
1111
secure: Pcm5IXFi4ZUsi1ue5QvPNASDo1Ns1REYbAwDJXRd3FRn2CfKbNPgnPda6fxoN6wG

dss/dss_capi_gr/ICktElement.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ def AllVariableValues(self):
112112
@property
113113
def BusNames(self):
114114
'''
115-
(read) Array of strings. Get Bus definitions to which each terminal is connected. 0-based array.
116-
(write) Array of strings. Set Bus definitions for each terminal is connected.
115+
Array of strings. Get Bus definitions to which each terminal is connected. 0-based array.
117116
'''
118117
return self.CheckForError(self._get_string_array(self._lib.CktElement_Get_BusNames))
119118

@@ -225,10 +224,7 @@ def NodeOrder(self):
225224

226225
@property
227226
def NormalAmps(self):
228-
'''
229-
(read) Normal ampere rating for PD Elements
230-
(write) Normal ampere rating
231-
'''
227+
'''Normal ampere rating for PD Elements'''
232228
return self.CheckForError(self._lib.CktElement_Get_NormalAmps())
233229

234230
@NormalAmps.setter
@@ -242,7 +238,10 @@ def NumConductors(self):
242238

243239
@property
244240
def NumControls(self):
245-
'''(read-only) Number of controls connected to this device. Use to determine valid range for index into Controller array.'''
241+
'''
242+
(read-only) Number of controls connected to this device.
243+
Use to determine valid range for index into Controller array.
244+
'''
246245
return self.CheckForError(self._lib.CktElement_Get_NumControls())
247246

248247
@property

dss/dss_capi_gr/IPDElements.py

Lines changed: 62 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ def __len__(self):
4040

4141
@property
4242
def FaultRate(self):
43-
'''Get/Set Number of failures per year. For LINE elements: Number of failures per unit length per year. '''
43+
'''
44+
Get/Set Number of failures per year.
45+
For LINE elements: Number of failures per unit length per year.
46+
'''
4447
return self.CheckForError(self._lib.PDElements_Get_FaultRate())
4548

4649
@FaultRate.setter
@@ -49,17 +52,27 @@ def FaultRate(self, Value):
4952

5053
@property
5154
def First(self):
52-
'''(read-only) Set the first enabled PD element to be the active element. Returns 0 if none found.'''
55+
'''
56+
(read-only) Set the first enabled PD element to be the active element.
57+
Returns 0 if none found.
58+
'''
5359
return self.CheckForError(self._lib.PDElements_Get_First())
5460

5561
@property
5662
def FromTerminal(self):
57-
'''(read-only) Number of the terminal of active PD element that is on the "from" side. This is set after the meter zone is determined.'''
63+
'''
64+
(read-only) Number of the terminal of active PD element that is on the "from"
65+
side. This is set after the meter zone is determined.
66+
'''
5867
return self.CheckForError(self._lib.PDElements_Get_FromTerminal())
5968

6069
@property
6170
def IsShunt(self):
62-
'''(read-only) Boolean indicating of PD element should be treated as a shunt element rather than a series element. Applies to Capacitor and Reactor elements in particular.'''
71+
'''
72+
(read-only) Boolean indicating of PD element should be treated as a shunt
73+
element rather than a series element. Applies to Capacitor and Reactor
74+
elements in particular.
75+
'''
6376
return self.CheckForError(self._lib.PDElements_Get_IsShunt()) != 0
6477

6578
@property
@@ -69,7 +82,10 @@ def Lambda(self):
6982

7083
@property
7184
def Name(self):
72-
'''Get/Set name of active PD Element. Returns null string if active element is not PDElement type.'''
85+
'''
86+
Get/Set name of active PD Element. Returns null string if active element
87+
is not PDElement type.
88+
'''
7389
return self._get_string(self.CheckForError(self._lib.PDElements_Get_Name()))
7490

7591
@Name.setter
@@ -81,7 +97,10 @@ def Name(self, Value):
8197

8298
@property
8399
def Next(self):
84-
'''(read-only) Advance to the next PD element in the circuit. Enabled elements only. Returns 0 when no more elements.'''
100+
'''
101+
(read-only) Advance to the next PD element in the circuit. Enabled elements
102+
only. Returns 0 when no more elements.
103+
'''
85104
return self.CheckForError(self._lib.PDElements_Get_Next())
86105

87106
@property
@@ -91,7 +110,10 @@ def Numcustomers(self):
91110

92111
@property
93112
def ParentPDElement(self):
94-
'''(read-only) Sets the parent PD element to be the active circuit element. Returns 0 if no more elements upline.'''
113+
'''
114+
(read-only) Sets the parent PD element to be the active circuit element.
115+
Returns 0 if no more elements upline.
116+
'''
95117
return self.CheckForError(self._lib.PDElements_Get_ParentPDElement())
96118

97119
@property
@@ -142,34 +164,55 @@ def AllNames(self):
142164
'''
143165
return self.CheckForError(self._get_string_array(self._lib.PDElements_Get_AllNames))
144166

145-
@property
146-
def AllMaxCurrents(self):
167+
def AllMaxCurrents(self, AllNodes=False):
147168
'''
148-
Array of doubles with the maximum current across the conductors, for each PD element.
169+
Array of doubles with the maximum current across the conductors, for each PD
170+
element.
171+
172+
By default, only the *first terminal* is used for the maximum current, matching
173+
the behavior of the "export capacity" command. Pass `AllNodes=True` to
174+
force the analysis to all terminals.
175+
176+
See also:
177+
https://sourceforge.net/p/electricdss/discussion/beginners/thread/da5b93ca/
149178
150179
(API Extension)
151180
'''
152-
self.CheckForError(self._lib.PDElements_Get_AllMaxCurrents_GR())
181+
self.CheckForError(self._lib.PDElements_Get_AllMaxCurrents_GR(AllNodes))
153182
return self._get_float64_gr_array()
154183

155-
@property
156-
def AllPctNorm(self):
184+
def AllPctNorm(self, AllNodes=False):
157185
'''
158-
Array of doubles with the maximum current across the conductors as a percentage of the Normal Ampere Rating, for each PD element.
186+
Array of doubles with the maximum current across the conductors as a percentage
187+
of the Normal Ampere Rating, for each PD element.
188+
189+
By default, only the *first terminal* is used for the maximum current, matching
190+
the behavior of the "export capacity" command. Pass `AllNodes=True` to
191+
force the analysis to all terminals.
192+
193+
See also:
194+
https://sourceforge.net/p/electricdss/discussion/beginners/thread/da5b93ca/
159195
160196
(API Extension)
161197
'''
162-
self.CheckForError(self._lib.PDElements_Get_AllPctNorm_GR())
198+
self.CheckForError(self._lib.PDElements_Get_AllPctNorm_GR(AllNodes))
163199
return self._get_float64_gr_array()
164200

165-
@property
166-
def AllPctEmerg(self):
201+
def AllPctEmerg(self, AllNodes=False):
167202
'''
168-
Array of doubles with the maximum current across the conductors as a percentage of the Emergency Ampere Rating, for each PD element.
203+
Array of doubles with the maximum current across the conductors as a percentage
204+
of the Emergency Ampere Rating, for each PD element.
205+
206+
By default, only the *first terminal* is used for the maximum current, matching
207+
the behavior of the "export capacity" command. Pass `AllNodes=True` to
208+
force the analysis to all terminals.
209+
210+
See also:
211+
https://sourceforge.net/p/electricdss/discussion/beginners/thread/da5b93ca/
169212
170213
(API Extension)
171214
'''
172-
self.CheckForError(self._lib.PDElements_Get_AllPctEmerg_GR())
215+
self.CheckForError(self._lib.PDElements_Get_AllPctEmerg_GR(AllNodes))
173216
return self._get_float64_gr_array()
174217

175218
@property

dss/dss_capi_ir/ICktElement.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ def AllVariableValues(self):
111111
@property
112112
def BusNames(self):
113113
'''
114-
(read) Array of strings. Get Bus definitions to which each terminal is connected. 0-based array.
115-
(write) Array of strings. Set Bus definitions for each terminal is connected.
114+
Array of strings. Get Bus definitions to which each terminal is connected. 0-based array.
116115
'''
117116
return self.CheckForError(self._get_string_array(self._lib.CktElement_Get_BusNames))
118117

@@ -218,10 +217,7 @@ def NodeOrder(self):
218217

219218
@property
220219
def NormalAmps(self):
221-
'''
222-
(read) Normal ampere rating for PD Elements
223-
(write) Normal ampere rating
224-
'''
220+
'''Normal ampere rating for PD Elements'''
225221
return self.CheckForError(self._lib.CktElement_Get_NormalAmps())
226222

227223
@NormalAmps.setter
@@ -235,7 +231,10 @@ def NumConductors(self):
235231

236232
@property
237233
def NumControls(self):
238-
'''(read-only) Number of controls connected to this device. Use to determine valid range for index into Controller array.'''
234+
'''
235+
(read-only) Number of controls connected to this device.
236+
Use to determine valid range for index into Controller array.
237+
'''
239238
return self.CheckForError(self._lib.CktElement_Get_NumControls())
240239

241240
@property

dss/dss_capi_ir/IPDElements.py

Lines changed: 62 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ def __len__(self):
4040

4141
@property
4242
def FaultRate(self):
43-
'''Get/Set Number of failures per year. For LINE elements: Number of failures per unit length per year. '''
43+
'''
44+
Get/Set Number of failures per year.
45+
For LINE elements: Number of failures per unit length per year.
46+
'''
4447
return self.CheckForError(self._lib.PDElements_Get_FaultRate())
4548

4649
@FaultRate.setter
@@ -49,17 +52,27 @@ def FaultRate(self, Value):
4952

5053
@property
5154
def First(self):
52-
'''(read-only) Set the first enabled PD element to be the active element. Returns 0 if none found.'''
55+
'''
56+
(read-only) Set the first enabled PD element to be the active element.
57+
Returns 0 if none found.
58+
'''
5359
return self.CheckForError(self._lib.PDElements_Get_First())
5460

5561
@property
5662
def FromTerminal(self):
57-
'''(read-only) Number of the terminal of active PD element that is on the "from" side. This is set after the meter zone is determined.'''
63+
'''
64+
(read-only) Number of the terminal of active PD element that is on the "from"
65+
side. This is set after the meter zone is determined.
66+
'''
5867
return self.CheckForError(self._lib.PDElements_Get_FromTerminal())
5968

6069
@property
6170
def IsShunt(self):
62-
'''(read-only) Boolean indicating of PD element should be treated as a shunt element rather than a series element. Applies to Capacitor and Reactor elements in particular.'''
71+
'''
72+
(read-only) Boolean indicating of PD element should be treated as a shunt
73+
element rather than a series element. Applies to Capacitor and Reactor
74+
elements in particular.
75+
'''
6376
return self.CheckForError(self._lib.PDElements_Get_IsShunt()) != 0
6477

6578
@property
@@ -69,7 +82,10 @@ def Lambda(self):
6982

7083
@property
7184
def Name(self):
72-
'''Get/Set name of active PD Element. Returns null string if active element is not PDElement type.'''
85+
'''
86+
Get/Set name of active PD Element. Returns null string if active element
87+
is not PDElement type.
88+
'''
7389
return self._get_string(self.CheckForError(self._lib.PDElements_Get_Name()))
7490

7591
@Name.setter
@@ -81,7 +97,10 @@ def Name(self, Value):
8197

8298
@property
8399
def Next(self):
84-
'''(read-only) Advance to the next PD element in the circuit. Enabled elements only. Returns 0 when no more elements.'''
100+
'''
101+
(read-only) Advance to the next PD element in the circuit. Enabled elements
102+
only. Returns 0 when no more elements.
103+
'''
85104
return self.CheckForError(self._lib.PDElements_Get_Next())
86105

87106
@property
@@ -91,7 +110,10 @@ def Numcustomers(self):
91110

92111
@property
93112
def ParentPDElement(self):
94-
'''(read-only) Sets the parent PD element to be the active circuit element. Returns 0 if no more elements upline.'''
113+
'''
114+
(read-only) Sets the parent PD element to be the active circuit element.
115+
Returns 0 if no more elements upline.
116+
'''
95117
return self.CheckForError(self._lib.PDElements_Get_ParentPDElement())
96118

97119
@property
@@ -142,32 +164,53 @@ def AllNames(self):
142164
'''
143165
return self.CheckForError(self._get_string_array(self._lib.PDElements_Get_AllNames))
144166

145-
@property
146-
def AllMaxCurrents(self):
167+
def AllMaxCurrents(self, AllNodes=False):
147168
'''
148-
Array of doubles with the maximum current across the conductors, for each PD element.
169+
Array of doubles with the maximum current across the conductors, for each PD
170+
element.
171+
172+
By default, only the *first terminal* is used for the maximum current, matching
173+
the behavior of the "export capacity" command. Pass `AllNodes=True` to
174+
force the analysis to all terminals.
175+
176+
See also:
177+
https://sourceforge.net/p/electricdss/discussion/beginners/thread/da5b93ca/
149178
150179
(API Extension)
151180
'''
152-
return self._get_float64_array(self._lib.PDElements_Get_AllMaxCurrents)
181+
return self.CheckForError(self._get_float64_array(self._lib.PDElements_Get_AllMaxCurrents, AllNodes))
153182

154-
@property
155-
def AllPctNorm(self):
183+
def AllPctNorm(self, AllNodes=False):
156184
'''
157-
Array of doubles with the maximum current across the conductors as a percentage of the Normal Ampere Rating, for each PD element.
185+
Array of doubles with the maximum current across the conductors as a percentage
186+
of the Normal Ampere Rating, for each PD element.
187+
188+
By default, only the *first terminal* is used for the maximum current, matching
189+
the behavior of the "export capacity" command. Pass `AllNodes=True` to
190+
force the analysis to all terminals.
191+
192+
See also:
193+
https://sourceforge.net/p/electricdss/discussion/beginners/thread/da5b93ca/
158194
159195
(API Extension)
160196
'''
161-
return self._get_float64_array(self._lib.PDElements_Get_AllPctNorm)
197+
return self.CheckForError(self._get_float64_array(self._lib.PDElements_Get_AllPctNorm, AllNodes))
162198

163-
@property
164-
def AllPctEmerg(self):
199+
def AllPctEmerg(self, AllNodes=False):
165200
'''
166-
Array of doubles with the maximum current across the conductors as a percentage of the Emergency Ampere Rating, for each PD element.
201+
Array of doubles with the maximum current across the conductors as a percentage
202+
of the Emergency Ampere Rating, for each PD element.
203+
204+
By default, only the *first terminal* is used for the maximum current, matching
205+
the behavior of the "export capacity" command. Pass `AllNodes=True` to
206+
force the analysis to all terminals.
207+
208+
See also:
209+
https://sourceforge.net/p/electricdss/discussion/beginners/thread/da5b93ca/
167210
168211
(API Extension)
169212
'''
170-
return self._get_float64_array(self._lib.PDElements_Get_AllPctEmerg)
213+
return self.CheckForError(self._get_float64_array(self._lib.PDElements_Get_AllPctEmerg, AllNodes))
171214

172215
@property
173216
def AllCurrents(self):

0 commit comments

Comments
 (0)