Skip to content

Commit ff3c9ed

Browse files
committed
Final fixes for version 0.10.6
1 parent 5b1dbf5 commit ff3c9ed

File tree

5 files changed

+37
-12
lines changed

5 files changed

+37
-12
lines changed

Diff for: +DSS_MATLAB/ICircuit.m

+28-6
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
% ICircuit: DSS MATLAB interface class to DSS C-API
33
%
44
% Properties:
5-
% Buses -
6-
% CktElements -
75
% ActiveElement -
86
% Solution -
97
% ActiveBus -
@@ -67,7 +65,9 @@
6765
% YNodeVarray - Complex array of actual node voltages in same order as SystemY matrix.
6866
%
6967
% Methods:
68+
% Buses -
7069
% Capacity -
70+
% CktElements -
7171
% Disable -
7272
% Enable -
7373
% EndOfTimeStepUpdate -
@@ -90,8 +90,6 @@
9090
% UpdateStorage -
9191

9292
properties
93-
Buses
94-
CktElements
9593
ActiveElement
9694
Solution
9795
ActiveBus
@@ -157,8 +155,6 @@
157155
methods (Access = public)
158156
function obj = ICircuit(apiutil)
159157
obj@DSS_MATLAB.Base(apiutil);
160-
obj.Buses = DSS_MATLAB.IBus(obj.apiutil);
161-
obj.CktElements = DSS_MATLAB.ICktElement(obj.apiutil);
162158
obj.ActiveElement = DSS_MATLAB.ICktElement(obj.apiutil);
163159
obj.Solution = DSS_MATLAB.ISolution(obj.apiutil);
164160
obj.ActiveBus = DSS_MATLAB.IBus(obj.apiutil);
@@ -311,6 +307,32 @@
311307
obj.CheckForError();
312308
end
313309

310+
function result = CktElements(obj, NameOrIdx)
311+
if ischar(NameOrIdx) | isstring(NameOrIdx)
312+
obj.SetActiveElement(NameOrIdx);
313+
elseif isinteger(NameOrIdx)
314+
calllib('dss_capi_v7', 'Circuit_SetCktElementIndex', FullName);
315+
obj.CheckForError();
316+
else
317+
ME = MException(['DSS_MATLAB:Error'], 'Expected char, string or integer');
318+
throw(ME);
319+
end
320+
result = obj.ActiveCktElement;
321+
end
322+
323+
function result = Buses(obj, NameOrIdx)
324+
if ischar(NameOrIdx) | isstring(NameOrIdx)
325+
obj.SetActiveBus(NameOrIdx);
326+
elseif isinteger(NameOrIdx)
327+
obj.SetActiveBusi(NameOrIdx);
328+
else
329+
ME = MException(['DSS_MATLAB:Error'], 'Expected char, string or integer');
330+
throw(ME);
331+
end
332+
result = obj.ActiveBus;
333+
obj.CheckForError();
334+
end
335+
314336
end
315337
methods
316338

Diff for: +DSS_MATLAB/ICktElement.m

+6-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
% ICktElement: DSS MATLAB interface class to DSS C-API
33
%
44
% Properties:
5-
% Properties -
65
% AllPropertyNames - Array containing all property names of the active device.
76
% AllVariableNames - Array of strings listing all the published variable names, if a PCElement. Otherwise, null string.
87
% AllVariableValues - Array of doubles. Values of state variables of active element if PC element.
@@ -49,9 +48,13 @@
4948
% Variablei - Returns (value, Code). For PCElement, get the value of a variable by integer index. If Code>0 Then no variable by this index or not a PCelement.
5049
% IsOpen -
5150
% Open -
51+
% Properties -
52+
53+
properties (Access = protected)
54+
PropertiesRef
55+
end
5256

5357
properties
54-
Properties
5558
AllPropertyNames
5659
AllVariableNames
5760
AllVariableValues
@@ -95,7 +98,7 @@
9598
methods (Access = public)
9699
function obj = ICktElement(apiutil)
97100
obj@DSS_MATLAB.Base(apiutil);
98-
obj.Properties = DSS_MATLAB.IDSSProperty(obj.apiutil);
101+
obj.PropertiesRef = DSS_MATLAB.IDSSProperty(apiutil);
99102
end
100103

101104
function obj = Close(obj, Term, Phs)

Diff for: +DSS_MATLAB/version.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
function result = version
2-
result = '0.10.6rc1';
2+
result = '0.10.6';
33
end

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ language: generic
33
env:
44
global:
55
- DSS_CAPI_VERSION=0.10.6
6-
- DSS_MATLAB_VERSION=0.10.6rc1
6+
- DSS_MATLAB_VERSION=0.10.6
77

88
matrix:
99
include:

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Version 0.10.6, released on 2020-08-02, covers most of the COM functions and cla
2222
## Highlights from 0.10.6
2323

2424
- New `DSSobj.LegacyModels` toggle to activate pre-OpenDSS 9.0 models (`PVSystem`, `Storage`, ...). By default, the new models are used (previously known as `PVSystem2`, `Storage2`, ...).
25-
- New Extended Errors mechanism, signaling lots previously silent errors due to bad API usage. For backwards compatibility, you can disable it with `DSSobj.Error.ExtendedErrors = 0`.
25+
- New Extended Errors mechanism, signaling lots of previously silent errors due to bad API usage. For backwards compatibility, you can disable it with `DSSobj.Error.ExtendedErrors = 0`.
2626

2727
More at [DSS C-API changelog](https://github.com/dss-extensions/dss_capi/blob/0.10.x/docs/changelog.md#version-0106).
2828

0 commit comments

Comments
 (0)