EnergyMeter
(read/write)
This property sets/gets the name of EnergyMeter object for circuit reduction.
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';
DSSReduceCkt = DSSCircuit.ReduceCkt;
DSSMeters = DSSCircuit.Meters;
% gets the names of the first EM on the list
i = DSSMeters.First;
myEM = DSSMeters.Name;
% set the EM name for the reduction
DSSReduceCkt.EnergyMeter = myEM;
% breaks loops first
DSSReduceCkt.DoLoopBreak();
% merge parallel lines
DSSReduceCkt.DoParallelLines();
% reduce
DSSReduceCkt.DoDefault();
% get the OpenDSS command
myStr = DSSReduceCkt.EditString;