Flag objects
Several flag variables are also defined, each with multiple entries defined.
Here is an example of use of CapControlModes.KVAR:
CapControls.Mode(CapControlModes.KVAR)OpenDSSDirect.DSS.ActionCodesOpenDSSDirect.DSS.CapControlModesOpenDSSDirect.DSS.LineUnitsOpenDSSDirect.DSS.LoadModelsOpenDSSDirect.DSS.LoadStatusOpenDSSDirect.DSS.MonitorModesOpenDSSDirect.DSS.OptionsOpenDSSDirect.DSS.SolveModes
OpenDSSDirect.DSS.ActionCodes — Module.ActionCodes flags - options include:
None: No actionOpen: Open a switchClose: Close a switchReset: Reset to the shelf state (unlocked, closed for a switchLock: Lock a switch, prventing both manual and automatic operationUnlock: Unlock a switch, permitting both manual and automatic operationTapUp: Move a regulator tap upTapDown: Move a regulator tap down
OpenDSSDirect.DSS.CapControlModes — Module.CapControlModes flags - options include:
Current: Current control, ON and OFF settings on CT secondaryVoltage: Voltage control, ON and OFF settings on the PT secondary baseKVAR: kvar control, ON and OFF settings on PT / CT baseTime: Time control ON and OFF settings are seconds from midnightPF: ON and OFF settings are power factor, negative for leading
Example:
capcontrols.Mode(CapControlModes.KVAR)OpenDSSDirect.DSS.LineUnits — Module.LineUnits flags - options include:
None: No line length unit.Miles: Line length units in miles.kFt: Line length units are in thousand feet.km: Line length units are km.meter: Line length units are Meters.ft: Line units in feet.inch: Line length units are inches.cm: Line units are cm.mm: Line length units are mm.Maxnum: Maximum number of line units constants.
OpenDSSDirect.DSS.LoadModels — Module.LoadModels flags - options include:
ConstPQConstZMotorCVRConstIConstPFixedQConstPFixedXZIPV
OpenDSSDirect.DSS.LoadStatus — Module.LoadStatus flags - options include:
VariableFixedExempt
OpenDSSDirect.DSS.Options — Module.Options flags - options include:
PowerFlow: Power Flow load model optionAdmittance: Admittance load model optionNormalSolve: Solution algorithm option ‐ Normal solution modeNewtonSolve: Solution algorithm option ‐ Newton solutionStatic: Control Mode option ‐ StaticEvent: Control Mode Option ‐ Event driven solution modeTime: Control mode option ‐ Time driven modeMultiphase: Circuit model is multiphase (default)PositiveSeq: Circuit model is positive sequence model onlyGaussian: Random mode = GaussianUniform: Random mode = UniformLogNormal: Random Mode = Log normalAddGen: Add generators in AutoAdd modeAddCap: Add capacitors in AutoAdd modeControlOFF: Control Mode OFF = ‐1
OpenDSSDirect.DSS.MonitorModes — Module.MonitorModes flags - options include:
VI: Monitor records Voltage and Current at the terminal (Default)Power: Monitor records kW, kvar or kVA, angle values, etc. at the terminal to which it is connectedTaps: For monitoring Regulator and Transformer tapsStates: For monitoring State Variables (for PC Elements only)Sequence: Reports the monitored quantities as sequence quantitiesMagnitude: Reports the monitored quantities in Magnitude OnlyPosOnly: Reports the Positive Seq only or avg of all phases
Sequence, Magnitude, and PosOnly are bit-level flags that can be combined with other flags. It's best to use & to test for one of these flags. Use | to combine flags.
Examples:
Monitors.Mode() & MonitorModes.Power
Monitors.Mode(MonitorModes.Magnitude | MonitorModes.Power)OpenDSSDirect.DSS.SolveModes — Module.SolveModes flags - options include:
SnapShot: Solve a single snapshot power flowDutyCycle: Solve following Duty Cycle load shapesDirect: Solve direct (forced admittance modelDaily: Solve following Daily load shapesMonte1: Monte Carlo Mode 1Monte2: Monte Carlo Mode 2Monte3: Monte Carlo Mode 3FaultStudy: Fault study at all busesYearly: Solve following Yearly load shapesMonteFault: Monte carlo Fault StudyPeakDay: Solves for Peak Day using Daily load curveLD1: Load‐duration Mode 1LD2: Load‐Duration Mode 2AutoAdd: Auto add generators or capacitorsHarmonic: (no Help string available)Dynamic