ControlMode
(read/write)
This property sets/gets an integer representing the value of the {dssStatic* (0)| dssEvent (1) | dssTime (2)} Modes for control devices. Default is "STATIC". Control mode for the solution. Set to OFF to prevent controls from changing.
STATIC = Time does not advance. Control actions are executed in order of shortest time to act until all actions are cleared from the control queue. Use this mode for power flow solutions which may require several regulator tap changes per solution.
EVENT = solution is event driven. Only the control actions nearest in time are executed and the time is advanced automatically to the time of the event.
TIME = solution is time driven. Control actions are executed when the time for the pending action is reached or surpassed.
Controls may reset and may choose not to act when it comes their time.
Use TIME mode when modeling a control externally to the DSS and a solution mode such as DAILY or DUTYCYCLE that advances time, or set the time (hour and sec) explicitly from the external program.
Example
% Create DSS object
DSSObject = actxserver('OpenDSSEngine.DSS')
if ~DSSObject.Start(0),
disp('Unable to start openDSS');
return
end;
DSSText = DSSObject.Text;
DSSCircuit = DSSObject.ActiveCircuit;
% Compile a model
DSSText.Command = 'Compile C:\myPath\myModel.dss';
DSSSolution = DSSCircuit.Solution;
% set the control iterations to 1000
DSSSolution.ControlIterations = 1000;
% shows the name of the active control mode
switch DSSSolution.ControlMode
case 0
disp('Static')
case 1
disp('Event')
case 2
disp('Time')
otherwise
disp('Control mode not identified')
end