Model
(read/write)
This property sets/gets the generator model using an integer. It can be one of the following:
1 : Generator injects a constant kW at specified power factor.
2 : Generator is modeled as a constant admittance.
3 : Const kW, constant kV. Somewhat like a conventional transmission power flow P-V generator.
4 : Const kW, Fixed Q (Q never varies)
5 : Const kW, Fixed Q(as a constant reactance)
6 : Compute load injection from User-written Model.(see usage of Xd, Xdp)
7 : Constant kW, kvar, but current-limited below Vminpu. Approximates a simple inverter. See also Balanced.
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';
DSSGen = DSSCircuit.Generators;
% Selects the first Generator from the list
DSSGen.First;
% Gets the generator model, if it's model 1, change it to model 4
% (For the example)
if DSSGen.model == 1,
DSSGen.model = 4;
end;