Mode
(read/write)
This property sets/gets an integer representing the solution mode. One of the following:
0 - Snapshot,
1 - Daily,
2 - Yearly (follow Yearly curve),
3 - DIrect ,
4 - DUtycycle,
5 - Time, ( see LoadShapeClass option)
6 - DYnamic, ( see LoadShapeClass option)
7 - Harmonic,
8 - HarmonicT, (sequential Harmonic Mode)
9 - M1 (Monte Carlo 1),
10 - M2 (Monte Carlo 2),
11 - M3 (Monte Carlo 3),
12 - Faultstudy,
13 - MF (monte carlo fault study)
14 - Peakday,
15 - LD1 (load-duration 1)
16 - LD2 (load-duration 2)
17 - AutoAdd (see AddType)
18 - YearlyVQ (Yearly Vector Quantiaztion)
19 - DutyVQ (Duty Vector Quantiaztion)
Side effect: setting the Mode property resets all monitors and energy meters. It also resets the time step, etc. to defaults for each mode. After the initial reset, the user must explicitly reset the monitors and/or meters until another Set Mode= command.
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;
% set simulation mode daily
DSSSolution.Mode = 1;
% set simulation step size 1 h
DSSSolution.StepSize = 1;
% gets the name of the default load shape (daily)
myDefLS = DSSSolution.DefaultDaily;
% set simulation hour 1.5
DSSSolution.dblHour = 1.5;
% Solve the model
DSSSolution.Solve();
% gets the new hour we are located
myHour = DSSSolution.dblHour;