|
2 | 2 | % IBus: DSS MATLAB interface class to DSS C-API
|
3 | 3 | %
|
4 | 4 | % Properties:
|
5 |
| - % Coorddefined - (read-only) False=0 else True. Indicates whether a coordinate has been defined for this bus |
6 |
| - % CplxSeqVoltages - (read-only) Complex Double array of Sequence Voltages (0, 1, 2) at this Bus. |
7 |
| - % Cust_Duration - (read-only) Accumulated customer outage durations |
8 |
| - % Cust_Interrupts - (read-only) Annual number of customer-interruptions from this bus |
9 |
| - % Distance - (read-only) Distance from energymeter (if non-zero) |
10 |
| - % Int_Duration - (read-only) Average interruption duration, hr. |
11 |
| - % Isc - (read-only) Short circuit currents at bus; Complex Array. |
12 |
| - % Lambda - (read-only) Accumulated failure rate downstream from this bus; faults per year |
13 |
| - % N_Customers - (read-only) Total numbers of customers served downline from this bus |
14 |
| - % N_interrupts - (read-only) Number of interruptions this bus per year |
15 |
| - % Name - (read-only) Name of Bus |
16 |
| - % Nodes - (read-only) Integer Array of Node Numbers defined at the bus in same order as the voltages. |
17 |
| - % NumNodes - (read-only) Number of Nodes this bus. |
18 |
| - % SectionID - (read-only) Integer ID of the feeder section in which this bus is located. |
19 |
| - % SeqVoltages - (read-only) Double Array of sequence voltages at this bus. |
20 |
| - % TotalMiles - (read-only) Total length of line downline from this bus, in miles. For recloser siting algorithm. |
21 |
| - % VLL - (read-only) For 2- and 3-phase buses, returns array of complex numbers represetin L-L voltages in volts. Returns -1.0 for 1-phase bus. If more than 3 phases, returns only first 3. |
22 |
| - % VMagAngle - (read-only) Variant Array of doubles containing voltages in Magnitude (VLN), angle (deg) |
23 |
| - % Voc - (read-only) Open circuit voltage; Complex array. |
24 |
| - % Voltages - (read-only) Complex array of voltages at this bus. |
25 |
| - % YscMatrix - (read-only) Complex array of Ysc matrix at bus. Column by column. |
26 |
| - % Zsc0 - (read-only) Complex Zero-Sequence short circuit impedance at bus. |
27 |
| - % Zsc1 - (read-only) Complex Positive-Sequence short circuit impedance at bus.. |
28 |
| - % ZscMatrix - (read-only) Complex array of Zsc matrix at bus. Column by column. |
29 |
| - % kVBase - (read-only) Base voltage at bus in kV |
30 |
| - % puVLL - (read-only) Returns Complex array of pu L-L voltages for 2- and 3-phase buses. Returns -1.0 for 1-phase bus. If more than 3 phases, returns only 3 phases. |
31 |
| - % puVmagAngle - (read-only) Array of doubles containig voltage magnitude, angle pairs in per unit |
32 |
| - % puVoltages - (read-only) Complex Array of pu voltages at the bus. |
| 5 | + % Coorddefined - False=0 else True. Indicates whether a coordinate has been defined for this bus |
| 6 | + % CplxSeqVoltages - Complex Double array of Sequence Voltages (0, 1, 2) at this Bus. |
| 7 | + % Cust_Duration - Accumulated customer outage durations |
| 8 | + % Cust_Interrupts - Annual number of customer-interruptions from this bus |
| 9 | + % Distance - Distance from energymeter (if non-zero) |
| 10 | + % Int_Duration - Average interruption duration, hr. |
| 11 | + % Isc - Short circuit currents at bus; Complex Array. |
| 12 | + % Lambda - Accumulated failure rate downstream from this bus; faults per year |
| 13 | + % N_Customers - Total numbers of customers served downline from this bus |
| 14 | + % N_interrupts - Number of interruptions this bus per year |
| 15 | + % Name - Name of Bus |
| 16 | + % Nodes - Integer Array of Node Numbers defined at the bus in same order as the voltages. |
| 17 | + % NumNodes - Number of Nodes this bus. |
| 18 | + % SectionID - Integer ID of the feeder section in which this bus is located. |
| 19 | + % SeqVoltages - Double Array of sequence voltages at this bus. |
| 20 | + % TotalMiles - Total length of line downline from this bus, in miles. For recloser siting algorithm. |
| 21 | + % VLL - For 2- and 3-phase buses, returns array of complex numbers represetin L-L voltages in volts. Returns -1.0 for 1-phase bus. If more than 3 phases, returns only first 3. |
| 22 | + % VMagAngle - Variant Array of doubles containing voltages in Magnitude (VLN), angle (deg) |
| 23 | + % Voc - Open circuit voltage; Complex array. |
| 24 | + % Voltages - Complex array of voltages at this bus. |
| 25 | + % YscMatrix - Complex array of Ysc matrix at bus. Column by column. |
| 26 | + % Zsc0 - Complex Zero-Sequence short circuit impedance at bus. |
| 27 | + % Zsc1 - Complex Positive-Sequence short circuit impedance at bus.. |
| 28 | + % ZscMatrix - Complex array of Zsc matrix at bus. Column by column. |
| 29 | + % kVBase - Base voltage at bus in kV |
| 30 | + % puVLL - Returns Complex array of pu L-L voltages for 2- and 3-phase buses. Returns -1.0 for 1-phase bus. If more than 3 phases, returns only 3 phases. |
| 31 | + % puVmagAngle - Array of doubles containig voltage magnitude, angle pairs in per unit |
| 32 | + % puVoltages - Complex Array of pu voltages at the bus. |
33 | 33 | % x - X Coordinate for bus (double)
|
34 | 34 | % y - Y coordinate for bus(double)
|
35 | 35 | %
|
36 | 36 | % Methods:
|
37 | 37 | % GetUniqueNodeNumber -
|
38 | 38 | % ZscRefresh -
|
39 | 39 |
|
| 40 | + properties (Access = protected) |
| 41 | + apiutil |
| 42 | + end |
| 43 | + |
40 | 44 | properties
|
41 | 45 | Coorddefined
|
42 | 46 | CplxSeqVoltages
|
|
71 | 75 | end
|
72 | 76 |
|
73 | 77 | methods (Access = public)
|
| 78 | + function obj = IBus(apiutil) |
| 79 | + obj.apiutil = apiutil; |
| 80 | + end |
74 | 81 |
|
75 | 82 | function result = GetUniqueNodeNumber(obj, StartNumber)
|
76 | 83 | result = calllib('dss_capi_v7', 'Bus_GetUniqueNodeNumber', StartNumber);
|
|
90 | 97 |
|
91 | 98 | function result = get.CplxSeqVoltages(obj)
|
92 | 99 | % (read-only) Complex Double array of Sequence Voltages (0, 1, 2) at this Bus.
|
93 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_CplxSeqVoltages'); |
| 100 | + calllib('dss_capi_v7', 'Bus_Get_CplxSeqVoltages_GR'); |
| 101 | + result = obj.apiutil.get_float64_gr_array(); |
94 | 102 | end
|
95 | 103 |
|
96 | 104 | function result = get.Cust_Duration(obj)
|
|
115 | 123 |
|
116 | 124 | function result = get.Isc(obj)
|
117 | 125 | % (read-only) Short circuit currents at bus; Complex Array.
|
118 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_Isc'); |
| 126 | + calllib('dss_capi_v7', 'Bus_Get_Isc_GR'); |
| 127 | + result = obj.apiutil.get_float64_gr_array(); |
119 | 128 | end
|
120 | 129 |
|
121 | 130 | function result = get.Lambda(obj)
|
|
140 | 149 |
|
141 | 150 | function result = get.Nodes(obj)
|
142 | 151 | % (read-only) Integer Array of Node Numbers defined at the bus in same order as the voltages.
|
143 |
| - result = DSS_MATLAB.get_int32_array('Bus_Get_Nodes'); |
| 152 | + calllib('dss_capi_v7', 'Bus_Get_Nodes_GR'); |
| 153 | + result = obj.apiutil.get_int32_gr_array(); |
144 | 154 | end
|
145 | 155 |
|
146 | 156 | function result = get.NumNodes(obj)
|
|
155 | 165 |
|
156 | 166 | function result = get.SeqVoltages(obj)
|
157 | 167 | % (read-only) Double Array of sequence voltages at this bus.
|
158 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_SeqVoltages'); |
| 168 | + calllib('dss_capi_v7', 'Bus_Get_SeqVoltages_GR'); |
| 169 | + result = obj.apiutil.get_float64_gr_array(); |
159 | 170 | end
|
160 | 171 |
|
161 | 172 | function result = get.TotalMiles(obj)
|
|
165 | 176 |
|
166 | 177 | function result = get.VLL(obj)
|
167 | 178 | % (read-only) For 2- and 3-phase buses, returns array of complex numbers represetin L-L voltages in volts. Returns -1.0 for 1-phase bus. If more than 3 phases, returns only first 3.
|
168 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_VLL'); |
| 179 | + calllib('dss_capi_v7', 'Bus_Get_VLL_GR'); |
| 180 | + result = obj.apiutil.get_float64_gr_array(); |
169 | 181 | end
|
170 | 182 |
|
171 | 183 | function result = get.VMagAngle(obj)
|
172 | 184 | % (read-only) Variant Array of doubles containing voltages in Magnitude (VLN), angle (deg)
|
173 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_VMagAngle'); |
| 185 | + calllib('dss_capi_v7', 'Bus_Get_VMagAngle_GR'); |
| 186 | + result = obj.apiutil.get_float64_gr_array(); |
174 | 187 | end
|
175 | 188 |
|
176 | 189 | function result = get.Voc(obj)
|
177 | 190 | % (read-only) Open circuit voltage; Complex array.
|
178 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_Voc'); |
| 191 | + calllib('dss_capi_v7', 'Bus_Get_Voc_GR'); |
| 192 | + result = obj.apiutil.get_float64_gr_array(); |
179 | 193 | end
|
180 | 194 |
|
181 | 195 | function result = get.Voltages(obj)
|
182 | 196 | % (read-only) Complex array of voltages at this bus.
|
183 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_Voltages'); |
| 197 | + calllib('dss_capi_v7', 'Bus_Get_Voltages_GR'); |
| 198 | + result = obj.apiutil.get_float64_gr_array(); |
184 | 199 | end
|
185 | 200 |
|
186 | 201 | function result = get.YscMatrix(obj)
|
187 | 202 | % (read-only) Complex array of Ysc matrix at bus. Column by column.
|
188 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_YscMatrix'); |
| 203 | + calllib('dss_capi_v7', 'Bus_Get_YscMatrix_GR'); |
| 204 | + result = obj.apiutil.get_float64_gr_array(); |
189 | 205 | end
|
190 | 206 |
|
191 | 207 | function result = get.Zsc0(obj)
|
192 | 208 | % (read-only) Complex Zero-Sequence short circuit impedance at bus.
|
193 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_Zsc0'); |
| 209 | + calllib('dss_capi_v7', 'Bus_Get_Zsc0_GR'); |
| 210 | + result = obj.apiutil.get_float64_gr_array(); |
194 | 211 | end
|
195 | 212 |
|
196 | 213 | function result = get.Zsc1(obj)
|
197 | 214 | % (read-only) Complex Positive-Sequence short circuit impedance at bus..
|
198 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_Zsc1'); |
| 215 | + calllib('dss_capi_v7', 'Bus_Get_Zsc1_GR'); |
| 216 | + result = obj.apiutil.get_float64_gr_array(); |
199 | 217 | end
|
200 | 218 |
|
201 | 219 | function result = get.ZscMatrix(obj)
|
202 | 220 | % (read-only) Complex array of Zsc matrix at bus. Column by column.
|
203 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_ZscMatrix'); |
| 221 | + calllib('dss_capi_v7', 'Bus_Get_ZscMatrix_GR'); |
| 222 | + result = obj.apiutil.get_float64_gr_array(); |
204 | 223 | end
|
205 | 224 |
|
206 | 225 | function result = get.kVBase(obj)
|
|
210 | 229 |
|
211 | 230 | function result = get.puVLL(obj)
|
212 | 231 | % (read-only) Returns Complex array of pu L-L voltages for 2- and 3-phase buses. Returns -1.0 for 1-phase bus. If more than 3 phases, returns only 3 phases.
|
213 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_puVLL'); |
| 232 | + calllib('dss_capi_v7', 'Bus_Get_puVLL_GR'); |
| 233 | + result = obj.apiutil.get_float64_gr_array(); |
214 | 234 | end
|
215 | 235 |
|
216 | 236 | function result = get.puVmagAngle(obj)
|
217 | 237 | % (read-only) Array of doubles containig voltage magnitude, angle pairs in per unit
|
218 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_puVmagAngle'); |
| 238 | + calllib('dss_capi_v7', 'Bus_Get_puVmagAngle_GR'); |
| 239 | + result = obj.apiutil.get_float64_gr_array(); |
219 | 240 | end
|
220 | 241 |
|
221 | 242 | function result = get.puVoltages(obj)
|
222 | 243 | % (read-only) Complex Array of pu voltages at the bus.
|
223 |
| - result = DSS_MATLAB.get_float64_array('Bus_Get_puVoltages'); |
| 244 | + calllib('dss_capi_v7', 'Bus_Get_puVoltages_GR'); |
| 245 | + result = obj.apiutil.get_float64_gr_array(); |
224 | 246 | end
|
225 | 247 |
|
226 | 248 | function result = get.x(obj)
|
|
0 commit comments