AllElementLosses
(read only)
This property returns an array of total losses (complex) in each circuit element.
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;
% Gets the losses for all the elements in the model
myElementNames = DSSCircuit.AllElementNames;
myELosses = DSSCircuit.AllElementLosses;
mySize = size(myELosses);
myPairs = [];
% Sorts the losses in pairs (P,Q)
for i = 1:2:(mySize(2) - 1),
myPairs = [myPairs;[myELosses(i),myELosses(i + 1)]];
end;
% Links the element's name to the losses
myLosses = [];
for i = 1:size(myElementNames),
myLosses = [myLosses;[myElementNames(i),num2str(myPairs(i,1)),num2str(myPairs(i,2))]];
end;