altdss.AltDSS
#
Module Contents#
Classes#
API#
- class altdss.AltDSS.AltDSS(api_util)#
Bases:
altdss.Obj.IObj
- AutoTrans: altdss.AutoTrans.IAutoTrans#
None
- Bus: altdss.Bus.IBuses#
None
- BusDistances() altdss.types.Float64Array #
Returns distance from each bus to parent EnergyMeter. Corresponds to sequence in AllBusNames.
- BusNames() List[str] #
Array of strings containing names of all buses in circuit (see AllNodeNames).
- BusVMag() altdss.types.Float64Array #
Array of magnitudes (doubles) of voltages at all buses
- BusVMagPU() altdss.types.Float64Array #
Array of all bus voltages (each node) magnitudes in Per unit
- BusVolts() altdss.types.ComplexArray #
Complex array of all bus, node voltages from most recent solution
- CNData: altdss.CNData.ICNData#
None
- CapControl: altdss.CapControl.ICapControl#
None
- Capacitor: altdss.Capacitor.ICapacitor#
None
- Capacity(Start: float, Increment: float) float #
Compute the maximum load the active circuit can serve in the PRESENT YEAR.
This method uses the EnergyMeter objects with the registers set with the
SET UEREGS= (...)
command for the AutoAdd functions.Returns the metered kW (load + losses - generation) and per unit load multiplier for the loading level at which something in the system reports an overload or undervoltage. If no violations, then it returns the metered kW for peak load for the year (1.0 multiplier).
Aborts and returns 0 if no EnergyMeters.
Original COM help: https://opendss.epri.com/Capacity1.html
- Clear()#
- ClearAll()#
- Command(value: Optional[AnyStr]) Optional[str] #
Input command string for the DSS engine.
If no command is provided, the latest command string is returned.
Prefer using the
Commands
function or the call operator from this class.
- Commands(Value: Union[AnyStr, List[AnyStr]])#
Runs a list of strings or a large string as commands directly in the DSS engine. Intermediate results from the classic
Text.Result
are ignored.Value can be a list of strings, or a single large string (usually faster, but varies).
- ControlQueue: altdss.ControlQueue.IControlQueue#
None
- DisableElement(name: AnyStr)#
Disable a circuit element by name (removes from circuit but leave in database).
- DynamicExp: altdss.DynamicExp.IDynamicExp#
None
- ESPVLControl: altdss.ESPVLControl.IESPVLControl#
None
- Element: altdss.CircuitElement.CircuitElementBatch#
None
- EnableElement(name: AnyStr)#
Enable a circuit element by name
- EnergyMeter: altdss.EnergyMeter.IEnergyMeter#
None
- Error: altdss.Error.IError#
None
- ExpControl: altdss.ExpControl.IExpControl#
None
- Fault: altdss.Fault.IFault#
None
- Fuse: altdss.Fuse.IFuse#
None
- GICLine: altdss.GICLine.IGICLine#
None
- GICTransformer: altdss.GICTransformer.IGICTransformer#
None
- GICsource: altdss.GICsource.IGICsource#
None
- GenDispatcher: altdss.GenDispatcher.IGenDispatcher#
None
- Generator: altdss.Generator.IGenerator#
None
- GrowthShape: altdss.GrowthShape.IGrowthShape#
None
- IndMach012: altdss.IndMach012.IIndMach012#
None
- InvControl: altdss.InvControl.IInvControl#
None
- Isource: altdss.Isource.IIsource#
None
- Line: altdss.Line.ILine#
None
- LineCode: altdss.LineCode.ILineCode#
None
- LineGeometry: altdss.LineGeometry.ILineGeometry#
None
- LineLosses() complex #
Complex total line losses in the circuit
- LineSpacing: altdss.LineSpacing.ILineSpacing#
None
- Load: altdss.Load.ILoad#
None
- LoadShape: altdss.LoadShape.ILoadShape#
None
- Losses() complex #
Total losses in active circuit, complex number (two-element array of double).
- Monitor: altdss.Monitor.IMonitor#
None
- property Name: str#
Name of the active circuit.
- NewContext() altdss.AltDSS.AltDSS #
Creates a new DSS engine context, wrapped by the AltDSS classes.
An AltDSS Context encapsulates most of the global state of the original OpenDSS engine, allowing the user to create multiple instances in the same process. By creating contexts manually, the management of threads and potential issues should be handled by the user.
- NodeDistances() altdss.types.Float64Array #
Returns an array of distances from parent EnergyMeter for each Node. Corresponds to AllBusVMag sequence.
- NodeDistancesByPhase(Phase: int) altdss.types.Float64Array #
Returns an array of doubles representing the distances to parent EnergyMeter. Sequence of array corresponds to other node ByPhase properties.
- NodeNames() List[str] #
Array of strings containing full name of each node in system in same order as returned by AllBusVolts, etc.
- NodeNamesByPhase(Phase: int) List[str] #
Return array of strings of the node names for the By Phase criteria. Sequence corresponds to other ByPhase properties.
- NodeVMagByPhase(Phase: int) altdss.types.Float64Array #
Returns Array of doubles represent voltage magnitudes for nodes on the specified phase.
- NodeVMagPUByPhase(Phase: int) altdss.types.Float64Array #
Returns array of per unit voltage magnitudes for each node by phase
- property NumBuses: int#
Total number of Buses in the circuit.
- property NumCircuitElements: int#
Number of CircuitElements in the circuit.
- property NumNodes: int#
Total number of nodes in the circuit.
- PCElement: altdss.PCElement.PCElementBatch#
None
- PDElement: altdss.PDElement.PDElementBatch#
None
- PVSystem: altdss.PVSystem.IPVSystem#
None
- PriceShape: altdss.PriceShape.IPriceShape#
None
- Reactor: altdss.Reactor.IReactor#
None
- Recloser: altdss.Recloser.IRecloser#
None
- ReduceCircuit: altdss.ReduceCkt.IReduceCkt#
None
- RegControl: altdss.RegControl.IRegControl#
None
- Relay: altdss.Relay.IRelay#
None
- SaveSample()#
Force all meters and monitors to save their current buffers.
- Sensor: altdss.Sensor.ISensor#
None
- Settings: altdss.Settings.ISettings#
None
- Solution: altdss.Solution.ISolution#
None
- Spectrum: altdss.Spectrum.ISpectrum#
None
- Storage: altdss.Storage.IStorage#
None
- StorageController: altdss.StorageController.IStorageController#
None
- property SubstationLosses: complex#
Complex losses in all transformers designated to substations.
- SwtControl: altdss.SwtControl.ISwtControl#
None
- SystemY(dense=False) altdss.types.ComplexArray #
Get the system Y complex matrix. Requires either a previous solution or explicitly building the matrix.
In AltDSS, defaults to the sparse matrix data.
Use
dense=True
to force a dense matrix. Beware the memory requirements. The recommendation is to only use dense matrices for small systems.
- TCC_Curve: altdss.TCC_Curve.ITCC_Curve#
None
- TSData: altdss.TSData.ITSData#
None
- TShape: altdss.TShape.ITShape#
None
- TakeSample()#
Force all Meters and Monitors to take a sample.
- property TextResult: str#
Result string for the last DSS command (classic
Text.Result
).
- Topology: altdss.Topology.ITopology#
None
- TotalPower() complex #
Total power (complex), kVA delivered to the circuit
- Transformer: altdss.Transformer.ITransformer#
None
- UPFC: altdss.UPFC.IUPFC#
None
- UPFCControl: altdss.UPFCControl.IUPFCControl#
None
- UpdateStorage()#
Force an update to all storage classes.
Typically done after a solution. Done automatically in intrinsic solution modes.
Original COM help: https://opendss.epri.com/UpdateStorage.html
- VCCS: altdss.VCCS.IVCCS#
None
- VSConverter: altdss.VSConverter.IVSConverter#
None
- Version() str #
- Vsource: altdss.Vsource.IVsource#
None
- WireData: altdss.WireData.IWireData#
None
- XYcurve: altdss.XYcurve.IXYcurve#
None
- XfmrCode: altdss.XfmrCode.IXfmrCode#
None
- YCurrents() altdss.types.ComplexArray #
Array of doubles containing complex injection currents for the present solution. It is the “I” vector of I=YV
- YMatrix: altdss.YMatrix.IYMatrix#
None
- YNodeOrder() List[str] #
Array of strings containing the names of the nodes in the same order as the Y matrix
- YNodeVarray() altdss.types.ComplexArray #
Complex array of actual node voltages in same order as SystemY matrix.
- ZIP: altdss.ZIP.IZIP#
None
- __call__(cmds: Union[AnyStr, List[AnyStr]])#
Pass either a single string (with either one or multiples commands, separated by new lines), or a list of strings.
Shortcut to
AltDSS.Commands()
.Examples:
# single command dss("new Circuit.test") # list of commands dss(["new Circuit.test", "new Line.line1 bus1=a bus2=b"]) # block of commands in a big string dss(""" clear new Circuit.test new Line.line1 bus1=a bus2=b new Load.load1 bus1=a bus2=b """)
- __init__(api_util)#
Creates a new AltDSS instance for the DSS context specified in
api_util
.Not intended for typical usage. For creating new separate DSS instances, refer to the
AltDSS.NewContext
method.
- to_dss_python() dss.IDSS #
Returns an instance of DSS-Python for the active DSS Context.
A compatible DSS-Python (
pip install dss-python
) is required.
- to_json(options: dss.enums.DSSJSONFlags = 0) str #
Returns data for all objects and basic circuit properties as a JSON-encoded string. The JSON data is organized using
The
options
parameter contains bit-flags to toggle specific features. SeeObj_ToJSON
(C-API) for more, orDSSObj.to_json
in Python.
- to_opendssdirect() opendssdirect.OpenDSSDirect.OpenDSSDirect #
Returns an instance of OpenDSSDirect.py for the active DSS Context.
A compatible OpenDSSDirect.py (
pip install OpenDSSDirect.py
) is required.