(method)


This method deletes an Action from the DSS Control Queue by the handle that is returned when the action is added. (The Push function returns the handle.)  The return value is always zero.


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';

DSSCtrlQueue = DSSCircuit.CtrlQueue;

% Defines some variables for the control

PTratio = 125.09; % for 26 kV system

ONsetting = 118.8;

OFFsetting = 121.2;

ActionCodeAdd = 201; % just an arbitrary action code

ActionCodeSub = 202; % just another arbitrary action code

DeviceHandle = 123; % arbitrary handle that signifies this control

Hour= 0; % the time when we want the action to take place

secDelay = 5;  % delay

 

DSSSolution.LoadMult = 1 * 1.1  %10% more each time

DSSSolution.InitSnap();

DSSSolution.SolveNoControl();

DSSSolution.SampleControlDevices(); %sample all other controls

 

DSSCircuit.SetActiveBus('myBus'); % Where the device is connected to

V = DSSBus.VMagAngle;

% check the first phase magnitude

Vreg = V(0) / PTratio;

disp(['Step ', num2str(i), ' Voltage=', num2str(Vreg), ' LoadMult=', num2str(DSSSolution.LoadMult)]); 

if Vreg > OFFsetting, % push a message to bump down the number of steps

    myHandle = DSSCtrlQueue.Push(hour, secDelay, ActionCodeSub, DeviceHandle);

end;

% Deletes the added action (for the example)

DSSSolution.Delete(myHandle);

% Apply control action

DSSSolution.DoControlActions();