ActiveActor
(read/write)
This property sets/gets the Active Actor by index. The actor must exist in memory before using this property.
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;
% Handler for Parallel processing functions
DSSParallel = DSSCircuit.Parallel;
% Gets the number of CPUs this PC has
CPUs = DSSParallel.NumCPUs;
% By default one actor is created, if you want more than one
% parallel instance you will have to create them. Try to leave at least
% One CPU available to handle the rest of windows, otherwise will block everything
disp('Creating Actors');
DSSText.Command = 'compile "C:\Program Files\OpenDSS\EPRITestCircuits\ckt5\Master_ckt5.DSS"';
DSSText.Command = 'set maxiterations=1000 maxcontroliter=1000'; % Just in case
DSSCircuit.Solution.Solve(); % Solves Actor 1
DSSText.Command = ['Clone ',int2str(CPUs-2)]; %Creates the other actors
DSSText.Command = 'set ActiveActor=*'; %activates all actors to send commands concurrently
DSSText.Command = 'set mode=Time stepsize=1h number=16000';
% to send commands to each actor separately you need to select each actor independently
DSSText.Command = 'set ActiveActor=1'; % Go back to actor 1
DSSText.Command = 'Set Parallel=Yes'; % Activates the parallel features