This method sets/gets Forces building of the System Y matrix. This function requires 2 arguments: The first argument is an integer used to specify what elements of the matrix need to be built {1= series elements only | 2= Whole Y matrix}. The second argument is another integer as well (1 or 0) that indicates DSS to rebuild the V and I vectors used for solving the circuit (1 = Reallocate VI vectors, 0 = Do not Reallocate VI; leave as is).


% Create DSS object

DSSObject = actxserver('OpenDSSEngine.DSS')

if ~DSSObject.Start(0),

                    disp('Unable to start openDSS');



DSSText = DSSObject.Text;

DSSCircuit = DSSObject.ActiveCircuit;

% Compile a model        

DSSText.Command = 'Compile C:\myPath\myModel.dss';

DSSSolution = DSSCircuit.Solution;

% Rebuild the whole Y matrix