py_dss_interface package¶
ActiveClass¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.ActiveClass.ActiveClass.ActiveClass(obj_dss)[source]¶
Bases:
py_dss_interface.models.ActiveClass.ActiveClassS.ActiveClassS
,py_dss_interface.models.ActiveClass.ActiveClassI.ActiveClassI
,py_dss_interface.models.ActiveClass.ActiveClassV.ActiveClassV
This class implements the ActiveClass interface of OpenDSS.
The ActiveClass interface provides methods for accessing properties of DSS classes. This class defines the methods for accessing the different properties included in this interface: ActiveClassS, ActiveClassI, ActiveClassV.
- Args:
obj_dss: The object that provides access to the OpenDSS engine.
- property class_name: str¶
Gets the name of the active Element’s class.
- property count: int¶
Gets the number of elements in this class. Same as NumElements Property.
- first() int [source]¶
Sets first element in the active class to be the active DSS object. If object is a CktElement, ActiveCktElement also points to this element. Returns 0 if none.
- property name: str¶
Gets the name of the active Element of the Active class. Sets the name of the active Element of the Active class.
- property names: List[str]¶
Gets a variant array of strings consisting of all element names in the active Class.
- next() int [source]¶
Sets next element in the active class to be the active DSS object. If object is a CktElement, ActiveCktElement also points to this element. Returns 0 if none.
- property num_elements: int¶
Gets the number of elements in this class. Same as Count Property.
- property parent_class_name: str¶
Gets the name of the Parent Element of the Active class.
Bus¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Bus.Bus.Bus(obj_dss)[source]¶
Bases:
py_dss_interface.models.Bus.BusS.BusS
,py_dss_interface.models.Bus.BusI.BusI
,py_dss_interface.models.Bus.BusV.BusV
,py_dss_interface.models.Bus.BusF.BusF
This interface implements the Bus (IBus) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: BusS, BusI, BusV, BusF.
- property all_pce_active_bus: List[str]¶
Returns an array with the names of all PCE connected to the active bus.
- property all_pde_active_bus: List[str]¶
Returns an array with the names of all PDE connected to the active bus.
- property axc_012_matrix: List[float]¶
Variant array of doubles (complex) containing the complete 012 Zsc matrix.
- property bus_lambda: float¶
Returns the accumulated failure rate downstream from this bus, faults per year.
- property coord_defined: int¶
Returns 1 if a coordinate has been defined for this bus; otherwise, it will return 0.
- property cplx_sequence_voltages: List[float]¶
Returns the complex double array of sequence voltages (0, 1, 2) at this bus.
- property distance: float¶
Returns the distance from the energymeter (if non-zero).
- property interruptions_avg_duration: float¶
Returns the average interruption duration in hours.
- property interruptions_num: float¶
Returns the number of interruptions this bus per year.
- property interruptions_total_customers: float¶
Returns the annual number of customer interruptions from this bus.
- property isc: List[float]¶
Returns the short circuit current as complex array.
- property kv_base: float¶
Returns the base voltage at bus in kV.
- property latitude: float¶
Returns the GIS latitude assigned to the active bus (if any). Sets the GIS latitude to the active bus using the value given at the argument.
- property line_list: List[str]¶
Returns a variant array of strings containing the names of the lines connected to the active bus. The names of the lines include the class name ‘Line.’
- property line_total_miles: float¶
Returns the total length of line downline from this bus, in miles. For recloser siting algorithm.
- property load_list: List[str]¶
This parameter returns a variant array of strings containing the names of the loads connected to the active bus. The names of the lines include the class name ‘Load.’.
- property longitude: float¶
Returns the GIS longitude assigned to the active bus (if any). Sets the GIS longitude to the active bus using the value given at the argument.
- property name: str¶
Returns the name of the active bus.
- property nodes: List[int]¶
Returns an integer array of node numbers defined at the bus in same order as the voltages.
- property num_nodes: int¶
Returns the number of nodes of this bus.
- property outage_customer_accum_duration: float¶
Returns the accumulated customer outage durations.
- property pu_vll: List[float]¶
Returns a variant array of complex numbers representing L-L voltages in per unit. Returns -1.0 for 1-phase bus. If more than 3 phases, returns only first 3.
- property pu_voltages: List[float]¶
Returns the voltages in per unit at bus as complex array.
- property section_id: int¶
Returns the integer ID of the feeder section in which this bus is located.
- property seq_voltages: List[float]¶
Returns a complex array of Sequence voltages at this bus.
- property total_customers: int¶
Returns returns the total number of customers served down line from this bus.
- property unique_node_number: int¶
Returns a unique node number at the active bus to avoid node collisions and adds it to the node list for the bus. The start number can be specified in the second parameter.
- property vll: List[float]¶
For 2 and 3 phase buses, returns a variant array of complex numbers representing L-L voltages in volts. Returns -1.0 for 1-phase bus. If more than 3 phases, returns only first 3.
- property vmag_angle: List[float]¶
Returns a variant array of doubles containing voltages in magnitude (VLN), angle (deg).
- property vmag_angle_pu: List[float]¶
Returns a variant array of doubles containing voltages in per unit and angles in degrees.
- property voc: List[float]¶
Returns the open circuit voltage as complex array.
- property voltages: List[float]¶
Returns a complex array of voltages at this bus.
- property x: float¶
Returns the X coordinate for the bus. Allows to write the X coordinate for the bus. Returns 0.
- property y: float¶
Returns the Y coordinate for the bus. Allows to write the Y coordinate for the bus. Returns 0.
- property ysc_matrix: List[float]¶
Returns the complex array of Ysc matrix at bus, column by column.
- property zsc0: List[float]¶
Returns the complex zero-sequence short circuit impedance at bus.
- property zsc1: List[float]¶
Returns the complex positive-sequence short circuit impedance at bus.
- property zsc_matrix: List[float]¶
Returns the complex array of Zsc matrix at bus, column by column.
- property zsc_refresh: int¶
Recomputes Zsc for active bus for present circuit configuration. Return 1 if the procedure was successful.
Capacitors¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Capacitors.Capacitors.Capacitors(obj_dss)[source]¶
Bases:
py_dss_interface.models.Capacitors.CapacitorsF.CapacitorsF
,py_dss_interface.models.Capacitors.CapacitorsI.CapacitorsI
,py_dss_interface.models.Capacitors.CapacitorsS.CapacitorsS
,py_dss_interface.models.Capacitors.CapacitorsV.CapacitorsV
This interface implements the Capacitors (ICapacitors) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: CapacitorsF, CapacitorsI, CapacitorsS, CapacitorsV.
- property available_steps: int¶
Gets the number of steps available in cap bank to be switched ON.
- property count: int¶
Gets the number of capacitor objects in active circuit.
- property is_delta: int¶
Gets 1 if delta connection, otherwise will return 0 for distributing and switching the total kvar.
Sets (Argument) 1 if delta connection, otherwise will return 0 for distributing and switching the total kvar.
- property kv: float¶
Gets the bank rating. Use LL for 2 or 3 phases, or actual can rating for 1 phase.
Sets the bank rating. Use LL for 2 or 3 phases, or actual can rating for 1 phase. There is not a explicit return type in the oficial documentation, because of this we choose not put a explicit return too.
- property kvar: float¶
Gets the total bank kvar, distributed equally among phases and steps.
Sets the total bank kvar, distributed equally among phases and steps. There is not a explicit return type in the oficial documentation, because of this we choose not put a explicit return too.
- property name: str¶
Gets the name of the active Capacitor element.
Sets the name of the Capacitor element to set it active. There is not a explicit return type in the oficial documentation, because of this we choose not put a explicit return too.
- property names: List[str]¶
Gets a variant array of strings with all Capacitor names in the circuit.
- property num_steps: int¶
Gets the number of steps (defaults 1) for distributing and switching the total bank kvar.
Sets the number of steps (defaults 1) for distributing and switching the total bank kvar.
- property states: List[int]¶
- Gets a variant array of integers [0..numsteps-1] indicating the state of each step.
If value is -1 and error has occurred.
Sets a variant array of integers [0..numsteps-1] indicating the state of each step. If value is -1 and error has occurred.
CapControls¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.CapControls.CapControls.CapControls(obj_dss)[source]¶
Bases:
py_dss_interface.models.CapControls.CapControlsF.CapControlsF
,py_dss_interface.models.CapControls.CapControlsI.CapControlsI
,py_dss_interface.models.CapControls.CapControlsS.CapControlsS
,py_dss_interface.models.CapControls.CapControlsV.CapControlsV
This interface implements the CapControls (ICapControls) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: CapControlsF, CapControlsI, CapControlsS, CapControlsV
- property controlled_capacitor: str¶
Gets the name of the capacitor that is controlled.
Sets the name of the capacitor that is controlled.
- property count: int¶
Gets the number of CapControls in Active Circuit.
- property ct_ratio: float¶
Gets the transducer ratio current to control current.
Sets the transducer ratio current to control current.
- property dead_time: float¶
Gets the time delay [s] after switching off a step. Control may reset before actually switching.
Sets the time delay [s] after switching off a step. Control may reset before actually switching..
- property delay: float¶
Gets the time delay [s] to switch on after arming. Control may reset before actually switching.
Sets the time delay [s] to switch on after arming. Control may reset before actually switching.
- property delay_off: float¶
Gets the time delay [s] before switching off a step. Control may reset before actually switching.
Sets the time delay [s] before switching off a step. Control may reset before actually switching.
- property mode: int¶
Gets the type of automatic controller (see manual for details).
CURRENTCONTROL: Result := 0;
VOLTAGECONTROL: Result := 1;
VARCONTROL: Result := 2;
TIMECONTROL: Result := 3;
PFCONTROL: Result := 4;
USERCONTROL: Result := 4;
Sets the type of automatic controller (see manual for details).
0: elem.CapControlType := CURRENTCONTROL;
1: elem.CapControlType := VOLTAGECONTROL;
2: elem.CapControlType := KVARCONTROL;
3: elem.CapControlType := TIMECONTROL;
4: elem.CapControlType := PFCONTROL;
- property monitored_object: str¶
Gets the full name of the element that PT and CT are connected to.
Sets the full name of the element that PT and CT are connected to.
- property monitored_term: int¶
Gets the terminal number on the element that PT and CT are connected to.
Sets the terminal number on the element that PT and CT are connected to. There is not a explicit return type in the oficial documentation, because of this we choose not put a explicit return too.
- property name: str¶
Gets the name of the active CapControl.
Sets a CapControl active by name.
- property names: List[str]¶
Gets a variant array of string with all CapControl names.
- property off_setting: float¶
- property on_setting: float¶
Gets the threshold to arm or switch on a step. See Mode for Units.
Sets the threshold to arm or switch on a step. See Mode for Units.
- property pt_ratio: float¶
- property use_volt_override: int¶
- Gets if Vmin and Vmax are enabled to override the control Mode. There is not a explicit return type in the
oficial documentation, because of this we choose not put a explicit return too.
Sets if enables Vmin and Vmax to override the control Mode. There is not a explicit return type in the oficial documentation, because of this we choose not put a explicit return too.
- property vmax: float¶
Gets the Vmax, this reference with VoltOverride, switch off whenever PT voltage exceeds this level.
Sets the Vmax, this reference with VoltOverride, switch off whenever PT voltage exceeds this level.
- property vmin: float¶
Gets the Vmin, this reference with VoltOverride, switch ON whenever PT voltage drops below this level.
Sets the Vmin, this reference with VoltOverride, switch ON whenever PT voltage drops below this level.
Circuit¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Circuit.Circuit.Circuit(obj_dss)[source]¶
Bases:
py_dss_interface.models.Circuit.CircuitI.CircuitI
,py_dss_interface.models.Circuit.CircuitS.CircuitS
,py_dss_interface.models.Circuit.CircuitF.CircuitF
,py_dss_interface.models.Circuit.CircuitV.CircuitV
This interface implements the Circuit (ICIrcuit) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: CircuitI, CircuitS, CircuitF, CircuitV
- property buses_distances: List[float]¶
Returns distance from each bus to parent EnergyMeter. Corresponds to sequence in AllBusNames. Argument2 must be 0.
- property buses_names: List[str]¶
Returns an array of strings with the names of all the Buses of the active circuit (See AllNodeNames). Argument2 must be 0.
- property buses_vmag: List[float]¶
Returns an array of doubles (magnitude) with the node voltages from the most recent solution. Argument2 must be 0.
- property buses_vmag_pu: List[float]¶
Returns an array of doubles with the voltages in per unit of the most recent solution of the active circuit. Argument2 must be 0.
- property buses_volts: List[float]¶
Returns an array of doubles (two doubles for representing a complex number) with the node voltages from the most recent solution. Argument2 must be 0.
- property capacity: float¶
Returns the total capacity of the active circuit. Or this parameter it is necessary to specify the start and increment of the capacity in the arguments argument1 and argument2 respectively.
- property disable: str¶
Allows to disable an element of the active circuit, the element must be specified by name. As a result, this parameter will deliver the string ?Ok?.
- property elements_losses: List[float]¶
Returns an array of doubles (two doubles for representing a complex number) with the losses in each element of the active circuit. Argument2 must be 0.
- property elements_names: List[str]¶
Returns an array of strings with the names of all the elements of the active circuit. Argument2 must be 0.
- property enable: str¶
Allows to enable an element of the active circuit, the element must be specified by name. As a result, this parameter will deliver the string ?Ok?.
- property end_of_time_step_update: int¶
Calls end of time step cleanup routine in solutionalgs.pas. Returns 0.
- first_element() int [source]¶
Sets the first Element of the active class to be the active Element, as a result, this parameter will deliver the index of the active Element (0 if none).
- property line_losses: List[float]¶
Returns an array of doubles (two doubles for representing a complex number) with the total Line losses of the active circuit. Argument2 must be 0.
- property losses: List[float]¶
Returns an array of doubles (two doubles for representing a complex number) with the total losses of the active circuit. Argument2 must be 0.
- property name: str¶
Returns the name of the active circuit.
- next_element() int [source]¶
Sets the next Element of the active class to be the active Element, as a result, this parameter will deliver the index of the active Element (0 if none).
- property nodes_distances: List[float]¶
Returns distance from each Node to parent EnergyMeter. Corresponds to sequence in AllBusVmag. Argument2 must be 0.
- nodes_distances_by_phase(argument: int = 1) List[float] [source]¶
Returns array of doubles representing the distances to parent EnergyMeter. Sequence of array corresponds to other node ByPhase properties. Argument2 must contain the number of the phase to return.
- property nodes_names: List[str]¶
Returns an array of strings containing full name of each node in system in same order as returned by AllBusVolts, etc. Argument2 must be 0.
- nodes_names_by_phase(argument: int = 1) List[str] [source]¶
Returns array of strings of the node names by Phase criteria. Sequence corresponds to other ByPhase properties. Argument2 must contain the number of the phase to return.
- nodes_vmag_by_phase(argument: int = 1) List[float] [source]¶
Returns array of doubles representing the voltage magnitudes for nodes on the specified phase. The phase must be specified in the Argument2.
- nodes_vmag_pu_by_phase(argument: int = 1) List[float] [source]¶
Returns array of doubles representing the voltage magnitudes (in per unit) for nodes on the specified phase. The phase must be specified in the Argument2.
- property num_buses: int¶
Will deliver the number of buses included in the active circuit.
- property num_ckt_elements: int¶
Will deliver the number of CktElements included in the active circuit.
- property num_nodes: int¶
Will deliver the number of nodes included in the active circuit.
- property parent_pd_element: int¶
Sets parent PD Element, if any, to be the active circuit element and returns index > 0 if it fails or not applicable.
- pc_element_first() int [source]¶
Sets the first PCElement to be the active PCElement, as a result, this parameter will deliver the index of the active PCElement (ideally 1).
- pc_element_next() int [source]¶
Sets the next PCElement to be the active PCElement, as a result, this parameter will deliver the index of the active PCElement (if there is no more it will return a 0).
- pd_element_first() int [source]¶
Sets the first PDElement to be the active PDElement, as a result, this parameter will deliver the index of the active PDElement (ideally 1).
- pd_element_next() int [source]¶
Sets the next PDElement to be the active PDElement, as a result, this parameter will deliver the index of the active PDElement (if there is no more it will return a 0).
- property sample: int¶
Forces all meters and monitors to take a sample, returns 0.
- property save_sample: int¶
Forces all meters and monitors to save their sample buffers, returns 0.
- set_active_bus(active_bus: str)[source]¶
Allows to activate a bus of the active circuit, the bus must be specified by name. As a result, this parameter will deliver a string with the index of the active Bus.
- set_active_bus_i(i: int) int [source]¶
Sets active the bus specified by index, which is compatible with the index delivered by AllBusNames, returns 0 it everything ok.
- set_active_class(argument: str) str [source]¶
Allows tto activate a Class of the active circuit, the Class must be specified by name. As a result, this parameter will deliver a string with the index of the active Class.
- set_active_element(active_element: str)[source]¶
Allows to activate an element of the active circuit, the element must be specified by name. As a result, this parameter will deliver a string with the index of the active element.
- property substation_losses: List[float]¶
Returns an array of doubles (two doubles for representing a complex number) with the total transformer losses of the active circuit. Argument2 must be 0.
- property system_y: List[float]¶
Returns an array of doubles (two doubles for representing a complex number) containing the Y Bus Matrix of the system (after a solution has been performed). Argument2 must be 0.
- property total_power: List[float]¶
Returns an array of doubles (two doubles for representing a complex number) with the total power in watts delivered to the active circuit. Argument2 must be 0.
- property update_storage_t¶
Forces all storage classes to update. Typically, done after a solution.
- property y_currents: List[float]¶
Returns a variant array of doubles containing complex injection currents for the present solution. It is the “I” vector of I=YV. Argument2 must be 0.
- property y_node_order: List[str]¶
Returns a variant array of strings containing the names of the nodes in the same order as the Y Matrix. Argument2 must be 0.
- property y_node_varray: List[float]¶
Returns a complex array of actual node voltages in same order as SystemY Matrix. Argument2 must be 0.
CktElement¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.CktElement.CktElement.CktElement(obj_dss)[source]¶
Bases:
py_dss_interface.models.CktElement.CktElementI.CktElementI
,py_dss_interface.models.CktElement.CktElementS.CktElementS
,py_dss_interface.models.CktElement.CktElementF.CktElementF
,py_dss_interface.models.CktElement.CktElementV.CktElementV
This interface implements the CktElement interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: CktElementI, CktElementS, CktElementF, CktElementV
- property bus_names: List[str]¶
Delivers an array of strings with the names of all the buses connected to the active circuit element.
Allows to fix an array of strings with the names of all the buses connected to the active circuit element.
- close_terminal(argument: int) int [source]¶
Close the specified terminal (Argument) of the active DSS object.
- controller(argument: str) str [source]¶
Delivers the Full name of the i-th controller attached to the active circuit element. The i-th controller index must be specified in the argument arg. Ex: Str = Controller(2). See NumControls to determine valid index range.
- property cplx_seq_currents: List[float]¶
Delivers an array of doubles with the complex of sequence currents for all terminals of the active circuit element.
- property cplx_seq_voltages: List[float]¶
Delivers an array of doubles with the complex of sequence voltages for all terminals of the active circuit element.
- property currents: List[float]¶
Delivers an array of doubles with the currents at terminals of the active circuit element.
- property currents_mag_ang: List[float]¶
Delivers the currents in magnitude, angle format as a variant array of doubles of the active circuit element.
- property display: str¶
Displays the name of the active circuit element (not necessarily unique).
Allows to modify the name of the active circuit element (not necessarily unique).
- property emerg_amps: float¶
Deliver the Emergency ampere rating for the active PDElement.
- Allows to fix the Emergency ampere rating for the active PDElement. The new value must be defined in the
variable ?Argument?.
- enabled(argument: int) int [source]¶
Returns one of the following values: 0 if the active element is disabled or 1 if the active element is enabled.
- property energymeter: str¶
Delivers the name of the EnergyMeter linked to the active circuit element.
- property guid: str¶
Delivers the unique name for the active circuit element.
- property has_switch_control: int¶
Returns 1 if the active DSS object has a Switch Control linked; otherwise, it will return 0.
- property has_volt_control: int¶
Returns 1 if the active DSS object has a Volt Control linked; otherwise, it will return 0.
- property is_enabled: int¶
Returns one of the following values: 0 if the active element is disabled or 1 if the active element is enabled.
- property is_terminal_open: int¶
Return a 1 if any terminal of the active DSS object is open, otherwise, it will return a 0.
- property losses: List[float]¶
Delivers an array of doubles with the Losses at terminals of the active circuit element.
- property name: str¶
Delivers the full name of the active circuit element.
- property node_order: List[int]¶
Delivers a Variant array integers variant array of integer containing the node numbers (representing phases, for Example) for each conductor of each terminal.
- property norm_amps¶
Deliver the normal ampere rating for the active PDElement. Allows to fix the normal ampere rating for the active PDElement.
- property num_conductors: int¶
Deliver the number of conductors of the active DSS object.
- property num_controls: int¶
Returns number of controls linked to the active DSS object.
- property num_phases: int¶
Delivers the number of phases of the active DSS object.
- property num_properties: int¶
Return the number of properties of the active DSS object.
- property num_terminals: int¶
Deliver the number of terminals of the active DSS object.
- property ocp_dev_index: int¶
Returns the Index into Controller list of OCP Device controlling the active DSS object.
- property ocp_dev_type: int¶
Returns one of the following values: 0=none; 1=Fuse; 2=Recloser; 3=Relay according to the type of active control.
- open_terminal(argument: int) int [source]¶
Open the specified terminal (Argument) of the active DSS object.
- property phase_losses: List[float]¶
Delivers an array of doubles with the Losses per phase at the terminals of the active circuit element.
- property powers: List[float]¶
Delivers an array of doubles with the powers at terminals of the active circuit element.
- property property_names: List[str]¶
Delivers an array of strings with the names of all the properties of the active circuit element.
- property residuals_currents: List[float]¶
Delivers an array of doubles with the residual currents (magnitude, angle) in all the nodes of the active circuit element.
- property seq_currents: List[float]¶
Delivers an array of doubles with the symmetrical component Currents per phase at the terminals of the active circuit element.
- property seq_powers: List[float]¶
Delivers an array of doubles with the symmetrical component powers per phase at the terminals of the active circuit element.
- property seq_voltages: List[float]¶
Delivers an array of doubles with the symmetrical component voltages per phase at the terminals of the active circuit element.
- variable_i(argument: float) float [source]¶
Delivers get the value of a variable by index for the active PCElement.
- property variables_names: List[str]¶
Delivers a Variant array of strings listing all the published state variable names, if the active circuit element is a PCElement. Otherwise, null string.
- property variables_values: List[float]¶
Delivers a Variant array of doubles listing all the values of the state variables, if the active circuit element is a PCElement. Otherwise, null string.
- property voltages: List[float]¶
Delivers an array of doubles with the voltages at terminals of the active circuit element.
- property voltages_mag_ang: List[float]¶
Delivers the voltages in magnitude, angle format as a variant array of doubles of the active circuit element.
- property y_prim: List[float]¶
Delivers an array of doubles with the Y primitive matrix (complex) of the active circuit element.
CMathLib¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.CMathLib.CMathLib.CMathLib(obj_dss)[source]¶
Bases:
py_dss_interface.models.CMathLib.CMathLibF.CMathLibF
,py_dss_interface.models.CMathLib.CMathLibV.CMathLibV
This interface implements the CmathLib (ICmathLib) interface of OpenDSS by declaring 2 procedures for accessing the different properties included in this interface: CMathLibF, CMathLibV.
- static cabs(arg_real: float, arg_imaginary: float) float [source]¶
Returns the absolute value of complex number given in real (Argument1) and imaginary (Argument2) doubles.
- static cdang(arg_real: float, arg_imaginary: float) float [source]¶
Returns the angle, in degrees, of a complex number specified as two doubles: Real part (Argument1) and imaginary part (Argument2).
- static cmplx(real_part: float, imag_part: float) complex [source]¶
Convert real (Argument1) and imaginary (Argument1) doubles to variant array of doubles.
CtrlQueue¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.CtrlQueue.CtrlQueue.CtrlQueue(obj_dss)[source]¶
Bases:
py_dss_interface.models.CtrlQueue.CtrlQueueI.CtrlQueueI
,py_dss_interface.models.CtrlQueue.CtrlQueueV.CtrlQueueV
This interface implements the CtrlQueue (ICtrlQueue) interface of OpenDSS by declaring 2 procedures for accessing the different properties included in this interface: CtrlQueueI, CtrlQueueV
- property action_code: int¶
Gets the code for the active action. Long integer code to tell the control device what to do.
- property clear_actions: int¶
Clears the action list.
- property ctrlqueue: List[str]¶
Delivers the control actions contained in the CtrlQueue after the latest solve command.
- delete(argument: int) int [source]¶
Deletes a control action from the DSS control queue by referencing the handle of the action (Argument).
- property device_handle: int¶
Gets the handle (user defined) to device that must act on the pending action.
- do_all_queue() int [source]¶
Forces the execution of all control actions stored at the control queue. Returns 0.
- property num_actions: int¶
Gets the number of actions on the current action list (that have been popped off the control queue by CheckControlActions).
- property pop_action: int¶
Pops next action off the action list and makes it the active action. Returns zero if none.
- push(arg: List[float]) List[float] [source]¶
Pushes a control action onto the DSS control queue by time, action code, and device handle. Returns Control Queue handle.
- property queue_size: int¶
Delivers the size of the current control queue. Returns zero if none.
- property show: int¶
Shows the entire control queue in CSV format.
DSSElement¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.DSSElement.DSSElement.DSSElement(obj_dss)[source]¶
Bases:
py_dss_interface.models.DSSElement.DSSElementI.DSSElementI
,py_dss_interface.models.DSSElement.DSSElementS.DSSElementS
,py_dss_interface.models.DSSElement.DSSElementV.DSSElementV
This interface implements the DSSElement (IDSSElement) interface of OpenDSS by declaring 3 procedures for accessing the different properties included in this interface: DSSElementI, DSSElementS, DSSElementV
- property name: str¶
Gets the full name of the active DSS object (general element or circuit element).
- property num_properties: int¶
Gets the number of properties for the active DSS object.
- property property_names: List[str]¶
Gets a variant array of strings containing the names of all properties for the active DSS object.
DSSExecutive¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.DSSExecutive.DSSExecutive.DSSExecutive(obj_dss)[source]¶
Bases:
py_dss_interface.models.DSSExecutive.DSSExecutiveS.DSSExecutiveS
,py_dss_interface.models.DSSExecutive.DSSExecutiveI.DSSExecutiveI
This interface implements the DSS_Executive (IDSS_Executive) interface of OpenDSS by declaring 2 procedures for accessing the different properties included in this interface: DSSExecutiveS, DSSExecutiveI
- command_help(arg: str) str [source]¶
Gets help string for i-th command (specified in the argument as string).
- property num_commands: int¶
Gets the number of DSS Executive Commands.
- property num_options: int¶
Gets the number of DSS Executive Options.
DSSInterface¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.DSSInterface.DSSInterface.DSSInterface(dss_obj)[source]¶
Bases:
py_dss_interface.models.DSSInterface.DSSInterfaceS.DSSInterfaceS
,py_dss_interface.models.DSSInterface.DSSInterfaceI.DSSInterfaceI
,py_dss_interface.models.DSSInterface.DSSInterfaceV.DSSInterfaceV
This interface implements the DSS interface (IDSS - DDSS.pas) of OpenDSS by declaring 3 procedures for accessing the different properties included in this interface: DSSInterfaceS, DSSInterfaceI, DSSInterfaceV
- property allow_forms: int¶
Gets if the DSS allows forms (1) or not (0), default (1).
- Sets if the DSS allows forms (1) or not (0), default (1). PAY ATTENTION: If arg=0 Then NoFormsAllowed :=
TRUE (Only set to False) else NoFormsAllowed := FALSE;
- property classes: List[str]¶
Gets the list of DSS intrinsic classes (names of the classes).
- property datapath: str¶
Gets the Data File Path. Default for reports, etc. from DSS.
Sets the Data File Path. Default for reports, etc. from DSS.
- property default_editor: str¶
Gets the path name for the default text editor.
- new_circuit(argument: str) str [source]¶
Makes a new circuit, the name of the circuit must be specified in the Argument.
- property num_circuits: int¶
Gets the number of circuits currently defined.
- property num_classes: int¶
Gets the number of DSS intrinsic classes.
- property num_user_classes: int¶
Gets the number of user-defined classes.
- reset()[source]¶
Resets DSS initialization for restarts, etc. from applets. Nothing implemented in the OpenDSS Original Source Code
- property user_classes: List[str]¶
Gets list of user-defined classes (names of the classes).
- property version: str¶
Gets the version string for the DSS.
DSSProgress¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.DSSProgress.DSSProgress.DSSProgress(dss_obj)[source]¶
Bases:
py_dss_interface.models.DSSProgress.DSSProgressI.DSSProgressI
,py_dss_interface.models.DSSProgress.DSSProgressS.DSSProgressS
This interface implements the DSSProgress (IDSSProgress) interface of OpenDSS by declaring 2 procedures for accessing the different properties included in this interface: DSSProgressI, DSSProgressS
DSSProperties¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.DSSProperties.DSSProperties.DSSProperties(obj_dss)[source]¶
Bases:
py_dss_interface.models.DSSProperties.DSSPropertiesS.DSSPropertiesS
This interface implements the DSSproperties (IDSSProperties) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface.
This interface can be used to read/write certain properties of DSS objects.
- The structure of the interface is as follows:
CStr DSSProperties(int32_t Parameter, CStr Argument);
This interface returns a string pointer (ANSI) with the result of the query according to the value of the variable Parameter, which can be one of the following.
- description_active_property(argument: str) str [source]¶
This parameter will deliver the description of the active property. This parameter will deliver the name of the active property. The index of the property must be specified in the argument. The index minimum value is 1. This value must be entered as string.
- name_active_property(argument: str) str [source]¶
Delivers the name of the active property. The index of the property must be specified in the argument. The index minimum value is 1. This value must be entered as string.
- value_read(argument: str) str [source]¶
This parameter will deliver the value of the active property. This parameter will deliver the name of the active property. The index of the property must be specified in the argument. The index minimum value is 1. This value must be entered as string.
- value_write(argument: str) str [source]¶
This parameter will allow to set the value of the active property. The new value must be specified in the variable “argument” as string. This parameter will deliver the name of the active property. The index of the property must be specified in the argument. The index minimum value is 1. This value must be entered as string.
ErrorInterface¶
Created by eniocc at 11/05/2021
- class py_dss_interface.models.ErrorInterface.ErrorInterface.ErrorCode(obj_dss)[source]¶
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/write certain properties of the active DSS object.
- The structure of the interface is as follows:
int32_t ErrorCode(void );
- class py_dss_interface.models.ErrorInterface.ErrorInterface.ErrorDesc(obj_dss)[source]¶
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/write certain properties of the active DSS object.
- The structure of the interface is as follows:
CStr ErrorDesc(void );
This interface returns a string with description of the latest error code delivered by OpenDSS.
Fuses¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Fuses.Fuses.Fuses(obj_dss)[source]¶
Bases:
py_dss_interface.models.Fuses.FusesI.FusesI
,py_dss_interface.models.Fuses.FusesS.FusesS
,py_dss_interface.models.Fuses.FusesF.FusesF
,py_dss_interface.models.Fuses.FusesV.FusesV
” This interface implements the Fuses (IFuses) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: FusesI, FusesS, FusesF, FusesV
- property count: int¶
Returns the number of Fuses objects currently defined in the active circuit.
- property delay: float¶
- property idx: int¶
Gets the active fuse by index into the list of fuses. 1 based: 1..count. Sets the active fuse by index into the list of fuses. 1 based: 1..count.
- property is_blown: int¶
Returns the current state of the fuses. TRUE (1) if any on any phase is blown. Else FALSE (0).
- property monitored_obj: str¶
Gets the name of the Monitored Object by the active fuse. Sets the name of the Monitored Object by the active fuse.
- property monitored_term: int¶
Gets the terminal number to switch the fuse is connected. Sets the terminal number to switch the fuse is connected.
- property name: str¶
Gets the name of the active fuse. Sets the name of the active fuse.
- property names: List[str]¶
Gets the variant array of string containing names of all fuses in the circuit.
- property normal: List[str]¶
- Gets a variant array of strings[0..Nphases-1] indicating the normal state for all phases of the active fuse.
If value is -1 an error has occurred.
- Sets a variant array of strings [0..Nphases-1] indicating the state for all phases of the active fuse.
If value is -1 an error has occurred.
- property num_phases: int¶
Gets the number of phases of the active fuse.
- property open: int¶
Opening of fuse.
- property rated_current: float¶
- Gets the multiplier or actual amps for the TCCcurve object. Defaults to 1.0, Multiply current values of
TCC curve by this to get actual amps.
- Sets the multiplier or actual amps for the TCCcurve object. Defaults to 1.0, Multiply current values of
TCC curve by this to get actual amps.
- property state: List[str]¶
- Gets a variant array of strings[0..Nphases-1] indicating the present state for all phases of the active fuse.
If value is -1 an error has occurred.
- Sets a variant array of strings [0..Nphases-1] indicating the state for all phases of the active fuse.
If value is -1 an error has occurred.
- property switched_obj: str¶
Gets the full name of the circuit element switch that the fuse controls. Defaults to the MonitoredObj. Sets the full name of the circuit element switch that the fuse controls. Defaults to the MonitoredObj.
- property switched_term: int¶
Gets the terminal number of the terminal containing the switch controlled by the fuse. Sets the terminal number of the terminal containing the switch controlled by the fuse.
- property tcc_curve: str¶
Gets the name of the TCCcurve object that determines fuse blowing. Sets the name of the TCCcurve object that determines fuse blowing.
Generators¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Generators.Generators.Generators(dss_obj)[source]¶
Bases:
py_dss_interface.models.Generators.GeneratorsI.GeneratorsI
,py_dss_interface.models.Generators.GeneratorsF.GeneratorsF
,py_dss_interface.models.Generators.GeneratorsS.GeneratorsS
,py_dss_interface.models.Generators.GeneratorsV.GeneratorsV
This interface implements the Generators (IGenerators) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: GeneratorsI, GeneratorsF, GeneratorsS, GeneratorsV.
- property count: int¶
Returns the number of generators Objects in Active Circuit.
- property forced_on: int¶
Returns 1 if the generator is forced ON regardless of other dispatch criteria; otherwise, returns 0.
- Allows to force ON regardless of other dispatch criteria. To force ON put 1 in the argument, otherwise put
- property idx: int¶
Gets the active generator by Index into generators list. 1..Count.
Sets the active generator (argument) by Index into generators list. 1..Count.
- property kv: float¶
Gets the voltage base for the active generator, kV.
Sets the voltage base for the active generator, kV.
- property kva: float¶
Gets the KVA rating of the generator.
Sets the KVA rating of the generator.
- property kvar: float¶
Gets the kvar output for the active generator, kW is updated for current power factor.
Sets the kvar output for the active generator, kW is updated for current power factor.
- property kw: float¶
Gets the kW output for the active generator, kvar is updated for current power factor.
Sets the kW output for the active generator, kvar is updated for current power factor.
- property model: int¶
- Gets the active generator Model (see Manual for details).
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.
- Sets the active generator Model (see Manual for details).
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.
- property name: str¶
Gets the name of the active Generator.
Sets the name of the active Generator.
- property names: List[str]¶
Gets the array of names of all Generator objects.
- property pf: float¶
Gets the power factor (pos. = producing vars). Updates kvar based on present kW value.
Sets the power factor (pos. = producing vars). Updates kvar based on present kW value.
- property phases: int¶
- property register_names: List[str]¶
Gets the array of names of all generator Energy Meter registers.
- property register_values: List[float]¶
Gets the array of values in generator Energy Meter registers.
- property vmax_pu: float¶
Gets the Vmaxpu for Generator Model.
Sets the Vmaxpu for Generator Model.
- property vmin_pu: float¶
Gets the Vminpu for Generator Model.
Sets the Vminpu for Generator Model.
ISources¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.ISources.ISources.ISources(dss_obj)[source]¶
Bases:
py_dss_interface.models.ISources.ISourcesI.ISourcesI
,py_dss_interface.models.ISources.ISourcesF.ISourcesF
,py_dss_interface.models.ISources.ISourcesS.ISourcesS
,py_dss_interface.models.ISources.ISourcesV.ISourcesV
This interface implements the ISources (IIsources) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: ISourcesI, ISourcesF, ISourcesS, ISourcesV.
- property amps: float¶
Gets the magnitude of the Isource in Amps. Sets the magnitude of the Isource in Amps.
- property angle_deg: float¶
Gets the phase angle of the Isource in degrees. Sets the phase angle of the Isource in degrees.
- property count: int¶
Returns the number of Isource objects currently defined in the active circuit.
- property frequency: float¶
Gets the frequency of the Isource in Hz. Sets the frequency of the Isource in Hz.
- property name: str¶
Gets the name of the active Isource object. Sets the name of the active Isource object.
- property names: List[str]¶
Gets the variant array of string containing names of all ISources in the circuit.
LineCodes¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.LineCodes.LineCodes.LineCodes(dss_obj)[source]¶
Bases:
py_dss_interface.models.LineCodes.LineCodesF.LineCodesF
,py_dss_interface.models.LineCodes.LineCodesS.LineCodesS
,py_dss_interface.models.LineCodes.LineCodesI.LineCodesI
,py_dss_interface.models.LineCodes.LineCodesV.LineCodesV
This interface implements the Lines (ILineCodes) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface:
- property c0: float¶
Gets the Zero-sequence capacitance in ohms per unit length for the active LineCode.
- Sets the Zero-sequence capacitance in ohms per unit length for the active LineCode.
This value must be specified in the argument as a double.
- property c1: float¶
Gets the Positive-sequence capacitance in nF per unit length for the active LineCode.
Sets the Positive-sequence capacitance in nF per unit length for the active LineCode. This value must be specified in the argument as a double.
- property cmatrix: List[float]¶
Gets the capacitance matrix in ohms per unit length of the active LineCode.
- Sets the capacitance matrix in ohms per unit length of the active LineCode. The new values must be entered as
a vector of doubles using the argument.
- property count: int¶
Gets the number of Line Objects in Active Circuit.
- property emerg_amps: float¶
Gets the Emergency ampere rating for the active LineCode.
- Sets the Emergency ampere rating for the active LineCode. This value must be specified in the argument
as a double.
- first() int [source]¶
Sets the first element active. Returns 0 if no lines. Otherwise, index of the line element.
- property is_z1z0: int¶
Gets the flag (Boolean 1/0) denoting whether the impedance data were entered in symmetrical components.
- property name: str¶
Gets the name of the active LineCode element.
Sets the name of the active LineCode element. The new value must be specified in the argument as a string.
- property names: List[str]¶
Gets the capacitance matrix in ohms per unit length of the active LineCode.
- next() int [source]¶
Sets the next element active. Returns 0 if no lines. Otherwise, index of the line element.
- property norm_amps: float¶
Gets the normal ampere rating for the active LineCode.
- Sets the normal ampere rating for the active LineCode. This value must be specified in the argument
as a double.
- property phases: int¶
Delivers the number of phases of the active LineCode as an integer.
- Sets the number of phases of the active LineCode. The units must be specified as an integer in the
argument.
- property r0: float¶
Gets the Zero-sequence resistance in ohms per unit length for the active LineCode.
- Sets the Zero-sequence resistance in ohms per unit length for the active LineCode.
This value must be specified in the argument as a double.
- property r1: float¶
Gets the Positive-sequence resistance in ohms per unit length for the active LineCode.
- Sets the Positive-sequence resistance in ohms per unit length for the active LineCode.
This value must be specified in the argument as a double.
- property rmatrix: List[float]¶
Gets the resistance matrix in ohms per unit length of the active LineCode.
- Sets the resistance matrix in ohms per unit length of the active LineCode. The new values must be entered as
a vector of doubles using the argument.
- property units: int¶
Delivers the units of the active LineCode as an integer.
- Sets the units of the active LineCode. The units must be specified as an integer in the argument.
Please refer to the OpenDSS User manual for more information. UNITS_MAXNUM =9; UNITS_NONE =0; UNITS_MILES =1; UNITS_KFT =2; UNITS_KM =3; UNITS_M =4; UNITS_FT =5; UNITS_IN =6; UNITS_CM =7; UNITS_MM =8;
- property x0: float¶
Gets the Zero-sequence reactance in ohms per unit length for the active LineCode.
- Sets the Zero-sequence reactance in ohms per unit length for the active LineCode.
This value must be specified in the argument as a double.
- property x1: float¶
Gets the Positive-sequence reactance in ohms per unit length for the active LineCode.
- Sets the Positive-sequence reactance in ohms per unit length for the active LineCode.
This value must be specified in the argument as a double.
- property xmatrix: List[float]¶
Gets the reactance matrix in ohms per unit length of the active LineCode.
- Sets the reactance matrix in ohms per unit length of the active LineCode. The new values must be entered as
a vector of doubles using the argument.
Lines¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Lines.Lines.Lines(dss_obj)[source]¶
Bases:
py_dss_interface.models.Lines.LinesV.LinesV
,py_dss_interface.models.Lines.LinesS.LinesS
,py_dss_interface.models.Lines.LinesI.LinesI
,py_dss_interface.models.Lines.LinesF.LinesF
This interface implements the Lines (ILines) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: LinesV, LinesS, LinesI, LinesF.
- property bus1: str¶
Gets the name of bus for terminal 1.
Sets the name of bus for terminal 1.
- property bus2: str¶
Gets the name of bus for terminal 2.
Sets the name of bus for terminal 2.
- property c0: float¶
Gets the zero sequence capacitance, nanofarads per unit length.
Sets the zero sequence capacitance, nanofarads per unit length.
- property c1: float¶
Gets the positive sequence capacitance, nanofarads per unit length.
Sets the positive sequence capacitance, nanofarads per unit length.
- property cmatrix: List[float]¶
Gets the capacitance matrix (full), nanofarads per unit length. Variant array of doubles.
Sets the capacitance matrix (full), nanofarads per unit length. Variant array of doubles.
- property count: int¶
Gets the number of Line Objects in Active Circuit.
- property emerg_amps: float¶
Gets the emergency (maximum) ampere rating of Line.
Sets the emergency (maximum) ampere rating of Line.
- first() int [source]¶
Sets the first element active. Returns 0 if no lines. Otherwise, index of the line element.
- property geometry: str¶
Gets the name of the Line geometry code.
Sets the name of the Line geometry code.
- property length: float¶
Gets the length of line section in units compatible with the LineCode definition.
Sets the length of line section in units compatible with the LineCode definition.
- property linecode: str¶
Gets the name of LineCode object that defines the impedances.
Sets the name of LineCode object that defines the impedances.
- property name: str¶
Gets the name of the active Line element. Sets the name of the Line element to set it active.
- property names: List[str]¶
Gets the name of all Line Objects.
- next() int [source]¶
Sets the next element active. Returns 0 if no lines. Otherwise, index of the line element.
- property norm_amps: float¶
Gets the normal ampere rating of line section.
Sets the normal ampere rating of Line.
- property num_cust: int¶
Gets the number of customers on this line section.
- property parent: int¶
Gets the parents of the active Line to be the active Line. Return 0 if no parent or action fails.
- property phases: int¶
Gets the number of phases of the active line object.
Sets the number of phases of the active line object.
- property r0: float¶
Gets the zero sequence resistance, ohm per unit length.
Sets the zero sequence resistance, ohm per unit length.
- property r1: float¶
Gets the positive sequence resistance, ohm per unit length.
Sets the positive sequence resistance, ohm per unit length.
- property rg: float¶
Gets the earth return value used to compute line impedance’s at power frequency.
Sets the earth return value used to compute line impedances at power frequency.
- property rho: float¶
Gets the earth resistivity, m-ohms.
Sets the earth resistivity, m-ohms.
- property rmatrix: List[float]¶
Gets the resistance matrix (full), ohms per unit length. Variant array of doubles.
Sets the resistance matrix (full), ohms per unit length. Variant array of doubles.
- property season_rating: float¶
Returns the rating for the current season (in Amps) if the SeasonalRatings option is active.
- property spacing: str¶
Gets the name of the Line spacing code.
Sets the name of the Line spacing code.
- property units: int¶
Gets the units of the line (distance, check manual for details).
- Sets the units of the line (distance, check manual for details).
units: {none | mi|kft|km|m|Ft|in|cm } UNITS_MAXNUM =9; UNITS_NONE =0; UNITS_MILES =1; UNITS_KFT =2; UNITS_KM =3; UNITS_M =4; UNITS_FT =5; UNITS_IN =6; UNITS_CM =7; UNITS_MM =8;
- property x0: float¶
Gets the zero sequence reactance, ohm per unit length.
Sets the zero sequence reactance, ohm per unit length.
- property x1: float¶
Gets the positive sequence reactance, ohm per unit length.
Sets the positive sequence reactance, ohm per unit length.
- property xg: float¶
Gets the earth return reactance value used to compute line impedances at power frequency.
Sets the earth return reactance value used to compute line impedances at power frequency.
- property xmatrix: List[float]¶
Gets the reactance matrix (full), ohms per unit length. Variant array of doubles.
Sets the reactance matrix (full), ohms per unit length. Variant array of doubles.
- property yprim: List[float]¶
Gets the YPrimitive of the active Line.
According to the official documentation this parameter does nothing at present.
Loads¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Loads.Loads.Loads(obj_dss)[source]¶
Bases:
py_dss_interface.models.Loads.LoadsF.LoadsF
,py_dss_interface.models.Loads.LoadsI.LoadsI
,py_dss_interface.models.Loads.LoadsS.LoadsS
,py_dss_interface.models.Loads.LoadsV.LoadsV
This interface implements the Loads (ILoads) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: LoadsF, LoadsI, LoadsS, LoadsV.
- property allocation_factor: float¶
- Allows to read the AllocationFactor property of the active load. The parameter argument can be filled with
a 0.
- Allows to write the AllocationFactor property of the active load. The parameter argument must contain the
new value in AllocationFactor for the desired active load. The return value will be equal to 0.
- property c_factor: float¶
Allows to read the CFactor property of the active load. The parameter argument can be filled with a 0.
- Allows to write the CFactor property of the active load. The parameter argument must contain the new value
in CFactor for the desired active load. The return value will be equal to 0.
- property class_number: int¶
- Allows to read the code number used to separate loads by class or group. The parameter argument can be
filled with a 0.
Allows to read the code number used to separate loads by class or group. The parameter argument can be filled with a 0.
- property count: int¶
Returns the number of load elements within the active circuit. The parameter argument can be filled with a 0.
- property cvr_curve: str¶
- Allows to read the CVRCurve property of the active load. The parameter argument can be filled with an
empty string.
- Allows to set the CVRCurve property for the active load. The parameter argument must contain the Name of
the new CVRCurve to be linked to the active load. The return value will be equal to empty.
- property cvr_vars: float¶
Allows to read the CVRvars property of the active load. The parameter argument can be filled with a 0.
- Allows to write the CVRvars property of the active load. The parameter argument must contain the new value
in CVRWatts for the desired active load. The return value will be equal to 0.
- property cvr_watts: float¶
Allows to read the CVRWatts property of the active load. The parameter argument can be filled with a 0.
- Allows to write the CVRWatts property of the active load. The parameter argument must contain the new
value in CVRWatts for the desired active load. The return value will be equal to 0.
- property daily: str¶
- Allows to read the daily property of the active load. The parameter argument can be filled with an empty
string.
Allows to set the daily property for the active load. The parameter argument must contain the Name of the new daily to be linked to the active load. The return value will be equal to empty.
- property duty: str¶
- Allows to read the duty property of the active load. The parameter argument can be filled with an empty
string.
Allows to set the dduty property for the active load. The parameter argument must contain the Name of the new duty to be linked to the active load. The return value will be equal to empty.
- first() int [source]¶
Allows to set the active load into the first load registered in the active circuit. As a result, this property will return the number 1. The parameter argument can be filled with a 0.
- property growth: str¶
- Allows to read the Growth property of the active load. The parameter argument can be filled with an empty
string.
Allows to set the Growth property for the active load. The parameter argument must contain the Name of the new Growth to be linked to the active load. The return value will be equal to empty.
- property idx: int¶
Allows to read the index of the active load. The parameter argument can be filled with a 0.
Allows to write the index of the active load. The parameter argument must contain the index of the desired active load. The return value will be equal to 0.
- property is_delta: int¶
- Allows to read if the active load is connected in delta, if the answer is positive, this function will
deliver a 1; otherwise, the answer will be 0. The parameter argument can be filled with a 0.
Allows to read if the active load is connected in delta, if the answer is positive, this function will deliver a 1; otherwise, the answer will be 0. This parameter will return a 0.
- property kv: float¶
Allows to read the kV property of the active load. The parameter argument can be filled with a 0.
- Allows to write the kV property of the active load. The parameter argument must contain the new value in
kV for the desired active load. The return value will be equal to 0.
- property kva: float¶
Allows to read the kva property of the active load. The parameter argument can be filled with a 0.
- Allows to write the kva property of the active load. The parameter argument must contain the new value in
kva for the desired active load. The return value will be equal to 0.
- property kvar: float¶
Allows to read the kvar property of the active load. The parameter argument can be filled with a 0.
- Allows to write the kvar property of the active load. The parameter argument must contain the new value in
kvar for the desired active load. The return value will be equal to 0.
- property kw: float¶
Allows to read the kW property of the active load. The parameter argument can be filled with a 0.
- Allows to write the kW property of the active load. The parameter argument must contain the new value in
kW for the desired active load. The return value will be equal to 0.
- property kwh: float¶
Allows to read the kWh property of the active load. The parameter argument can be filled with a 0.
Allows to write the kWh property of the active load. The parameter argument must contain the new value in kWh for the desired active load. The return value will be equal to 0.
- property kwh_days: float¶
Allows to read the kWhdays property of the active load. The parameter argument can be filled with a 0.
Allows to write the kWhdays property of the active load. The parameter argument must contain the new value in kWhdays for the desired active load. The return value will be equal to 0.
- property model: int¶
Allows to read the model of the active load. The parameter argument can be filled with a 0.
Allows to write the model of the active load using the parameter argument. This parameter will return a 0.
- property name: str¶
- Allows to read the Name property of the active load. The parameter argument can be filled with an empty
string.
Allows to set the active load by specifying the Name load. The parameter argument must contain the Name of the load to activate. The return value will be equal to empty.
- property names¶
Allows to read the names of all the loads present in the active circuit. The result is delivered as variant, however, the content of this variant is an array of strings.
- next() int [source]¶
Sets the active load into the next load registered in the active circuit. As a result, this property will deliver the index of the active load. The parameter argument can be filled with a 0.
- property num_cust: int¶
Allows to read the number of customer of the active load. The parameter argument can be filled with a 0.
Allows to write the number of customers of the active load using the parameter argument. This parameter will return a 0.
- property pct_mean: float¶
Allows to read the PctMean property of the active load. The parameter argument can be filled with a 0.
- Allows to write the PctMean property of the active load. The parameter argument must contain the new value
in PctMean for the desired active load. The return value will be equal to 0.
- property pct_std_dev: float¶
Allows to read the PctStdDev property of the active load. The parameter argument can be filled with a 0.
- Allows to write the PctStdDev property of the active load. The parameter argument must contain the new
value in PctStdDev for the desired active load. The return value will be equal to 0.
- property pf: float¶
Allows to read the pf property of the active load. The parameter argument can be filled with a 0.
Allows to write the pf property of the active load. The parameter argument must contain the new value in pf for the desired active load. The return value will be equal to 0.
- property r_neut: float¶
- Allows to read the RNeut (neutral resistance for wye connected loads) property of the active load. The
parameter argument can be filled with a 0.
Allows to write the RNeut (neutral resistance for wye connected loads) property of the active load. The parameter argument must contain the new value in RNeut for the desired active load. The return value will be equal to 0.
- property rel_weight: float¶
- Allows to read the RelWeight (relative weighting factor) property of the active load. The parameter
argument can be filled with a 0.
Allows to write the RelWeight (relative weighting factor) property of the active load. The parameter argument must contain the new value in RelWeight for the desired active load. The return value will be equal to 0.
- property rl: float¶
- Allows to read the PctSeriesRL (Percent of Load that is modeled as series R-L for harmonic studies)
property of the active load. The parameter argument can be filled with a 0.
Allows to write the PctSeriesRL (Percent of Load that is modeled as series R-L for harmonic studies) property of the active load. The parameter argument must contain the new value in PctSeriesRL for the desired active load. The return value will be equal to 0.
- property spectrum: str¶
- Allows to read the Spectrum property of the active load. The parameter argument can be filled with an
empty string.
Allows to set the Spectrum property for the active load. The parameter argument must contain the Name of the new Spectrum to be linked to the active load. The return value will be equal to empty.
- property status: int¶
- Allows to read Response to load multipliers: Fixed (growth only - 1), Exempt (no LD curve - 2), Variable (
all - 0), of the active load. The parameter argument can be filled with a 0.
Allows to read Response to load multipliers: Fixed (growth only - 1), Exempt (no LD curve - 2), Variable ( all - 0), of the active load. This parameter will return a 0.
- property vmax_pu: float¶
Allows to read the VMaxpu property of the active load. The parameter argument can be filled with a 0.
- Allows to write the VMaxpu property of the active load. The parameter argument must contain the new value
in VMaxpu for the desired active load. The return value will be equal to 0.
- property vmin_emerg: float¶
Allows to read the VMinemerg property of the active load. The parameter argument can be filled with a 0.
- Allows to write the VMinemerg property of the active load. The parameter argument must contain the new
value in VMinemerg for the desired active load. The return value will be equal to 0.
- property vmin_norm: float¶
Allows to read the VMinnorm property of the active load. The parameter argument can be filled with a 0.
- Allows to write the VMinnorm property of the active load. The parameter argument must contain the new
value in VMinnorm for the desired active load. The return value will be equal to 0.
- property vmin_pu: float¶
- property x_neut: float¶
Allows to read the Xneut property of the active load. The parameter argument can be filled with a 0.
- Allows to write the Xneut property of the active load. The parameter argument must contain the new value
in Xneut for the desired active load. The return value will be equal to 0.
- property xfkva: float¶
- Allows to read the xfKVA (Rated service transformer KVA for load allocation, using Allocationfactor.
Affects kW, kvar and pf.) property of the active load. The parameter argument can be filled with a 0.
Allows to write the xfKVA (Rated service transformer KVA for load allocation, using Allocationfactor. Affects kW, kvar and pf.) property of the active load. The parameter argument must contain the new value in xfKVA for the desired active load. The return value will be equal to 0.
- property yearly: str¶
- Allows to read the Yearly property of the active load. The parameter argument can be filled with an empty
string.
Allows to set the Yearly property for the active load. The parameter argument must contain the Name of the new Yearly to be linked to the active load. The return value will be equal to empty.
- property zipv: List[float]¶
Allows to read the array of 7 elements (doubles) for ZIP property of the active Load object.
Allows to write the array of 7 elements (doubles) for ZIP property of the active Load object.
LoadShapes¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.LoadShapes.LoadShapes.LoadShapes(obj_dss)[source]¶
Bases:
py_dss_interface.models.LoadShapes.LoadShapesF.LoadShapesF
,py_dss_interface.models.LoadShapes.LoadShapesI.LoadShapesI
,py_dss_interface.models.LoadShapes.LoadShapesS.LoadShapesS
,py_dss_interface.models.LoadShapes.LoadShapesV.LoadShapesV
This interface implements the LoadShape (ILoadShape) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: .
- property count: int¶
Returns the number of LoadShape objects currently _defined in LoadShape collection.
- first() int [source]¶
sets the first loadshape active and return integer index of the loadshape. Returns 0 if no more.
- property hr_interval: float¶
Gets the fixed interval time value, hours. Sets the fixed interval time value, hours.
- property min_interval: float¶
Gets the fixed interval time value, in minutes. Sets the fixed interval time value, in minutes.
- property name: str¶
Gets the name of the active LoadShape object. Sets the name of the active LoadShape object.
- property names: List[str]¶
Gets a variant array of strings containing names of all LoadShape objects currently defined.
- next() int [source]¶
Sets the next loadshape active and return integer index of the loadshape. Returns 0 if no more.
- normalize() int [source]¶
Normalizes the P and Q curves based on either Pbase, Qbase or simply the peak value of the curve.
- property npts: int¶
Gets the number of points in active LoadShape. Sets the number of points in active LoadShape.
- property p_base: float¶
Gets the base for normalizing P curve. If left at zero, the peak value is used. Sets the base for normalizing P curve. If left at zero, the peak value is used.
- property p_mult: List[float]¶
Gets a variant array of doubles for the P multiplier in the LoadShape. Sets a variant array of doubles for the P multiplier in the LoadShape.
- property q_base: float¶
Gets the base for normalizing Q curve. If left at zero, the peak value is used. Sets the base for normalizing Q curve. If left at zero, the peak value is used.
- property q_mult: List[float]¶
Gets a variant array of doubles for the Q multiplier in the LoadShape. Sets a variant array of doubles for the Q multiplier in the LoadShape.
- property s_interval: float¶
Gets the fixed interval data time interval, seconds. Sets the fixed interval data time interval, seconds.
- property time_array: List[float]¶
Gets a time array in hours corresponding to P and Q multipliers when the Interval = 0. Sets a time array in hours corresponding to P and Q multipliers when the Interval = 0.
- property use_actual: int¶
- Gets a TRUE/FALSE (1/0) to let Loads know to use the actual value in the curve rather than use the value as
a multiplier.
- Sets a TRUE/FALSE (1/0 - Argument) to let Loads know to use the actual value in the curve rather than use
the value as a multiplier.
Meters¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Meters.Meters.Meters(obj_dss)[source]¶
Bases:
py_dss_interface.models.Meters.MetersV.MetersV
,py_dss_interface.models.Meters.MetersS.MetersS
,py_dss_interface.models.Meters.MetersF.MetersF
,py_dss_interface.models.Meters.MetersI.MetersI
This interface implements the Meters (IMeters) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: MetersV, MetersS, MetersF, MetersI.
- property all_branches_in_zone: List[str]¶
Returns a wide string list of all branches in zone of the active Energy Meter object.
- property all_end_elements: List[str]¶
Returns a variant array of names of all zone end elements.
- property all_pce_in_zone: List[str]¶
This parameter returns a wide string list of all the PCE in zone of the active Energy Meter object.
- property alloc_factors: List[float]¶
Returns an array of doubles: allocation factors for the active Meter.
Receives an array of doubles to set the phase allocation factors for the active Meter.
- property avg_repair_time: float¶
Returns the average Repair Time in this Section of the meter zone.
- property calc_current: List[float]¶
- Returns the magnitude of the real part of the Calculated Current (normally determined by solution)
for the meter to force some behavior on Load Allocation.
Sets the magnitude of the real part of the Calculated Current (normally determined by solution) for the meter to force some behavior on Load Allocation.
- close_all_di_files() int [source]¶
Closes all Demand Interval (DI) files. Necessary at the end of a run.
- property count: int¶
Returns the number of Energy Meters in the Active Circuit.
- property count_branches: int¶
Returns the number of branches in active Energy Meter zone (same as sequencelist size).
- property count_end_elements: int¶
Returns the number of zone end elements in the active meter zone.
- property cust_interrupts: float¶
Returns the total customer interruptions for this meter zone based on reliability calcs.
- property di_files_are_open: int¶
Returns a global flag (1=true, 0=false) to indicate if Demand Interval (DI) files have been properly opened.
- property fault_rate_x_repair_hrs: float¶
Returns the sum of Fault Rate Time Repair Hours in this section of the meter zone.
- property metered_element: str¶
Returns the name of the metered element (considering the active Energy Meter).
Sets the name of the metered element (considering the active Energy Meter).
- property metered_terminal: int¶
Returns the number of metered terminal by the active Energy Meter.
Sets the number of metered terminal by the active Energy Meter.
- property name: str¶
Returns the active Energy Meter’s name.
Sets the active Energy Meter’s name.
- property names: List[str]¶
Returns an array of all Energy Meter names.
- property num_section_branches: int¶
Returns the number of branches (lines) in the active section.
- property num_section_customers: int¶
Returns the number of customers in the active section.
- property num_sections: int¶
Returns the number of feeder sections in this meter’s zone.
- property ocp_device_type: int¶
Returns the type of OCP device: {1=fuse | 2+ recloser | 3= relay}.
- property peak_current: List[float]¶
Returns an array of doubles with the Peak Current Property.
Receives an array of doubles to set values of Peak Current Property.
- property register_names: List[str]¶
Returns an array of strings containing the names of the registers.
- property register_values: List[float]¶
Returns an array of values contained in the Meter registers for the active Meter.
- property saidi: float¶
Returns the SAIDI for this meter zone. Execute DoreliabilityCalc first.
- property saifi: float¶
Returns SAIFI for this meter’s zone. Execute reliability calc method first.
- property saifi_kw: float¶
Returns the SAIFI based on kW rather than number of customers. Get after reliability calcs.
- sample_all() int [source]¶
Causes all Energy Meters to take a sample of the present state. Returns 0.
- save() int [source]¶
Causes active meter to save its current sample buffer to its meter stream. Then you can access the Bytestream or channel data. Most standard solution modes do this automatically.
- property sect_seq_idx: int¶
Returns the Sequence Index of the branch at the head of this section.
- property sect_total_cust: int¶
Returns the total customers down line from this section.
- property seq_list_size: int¶
Calculates SAIFI, etc. if the Argument is equal to 1 this parameter will assume restoration, otherwise it will not.
- property sequence_index: int¶
- Returns the index into meter’s SequenceList that contains branch pointers in lexical order. Earlier index
guaranteed to be up line from later index. Sets PDElement active.
Sets the index into meter’s SequenceList that contains branch pointers in lexical order. Earlier index guaranteed to be up line from later index. Sets PDElement active.
- property sum_branch_flt_rates: float¶
Returns the sum of the branch fault rates in this section of the meter’s zone.
- property total_customers: int¶
Returns the total number of customers in this zone (down line from the Energy Meter).
- property totals: List[float]¶
Returns the totals for all registers of all Meters.
Monitors¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Monitors.Monitors.Monitors(obj_dss)[source]¶
Bases:
py_dss_interface.models.Monitors.MonitorsI.MonitorsI
,py_dss_interface.models.Monitors.MonitorsV.MonitorsV
,py_dss_interface.models.Monitors.MonitorsS.MonitorsS
This interface implements the Monitors (IMonitors) interface of OpenDSS by declaring 3 procedures for accessing the different properties included in this interface: MonitorsI._, MonitorsV, MonitorsS.
- property byte_stream: List[int]¶
Returns a byte array containing monitor stream values. Make sure a “save” is done first (standard solution modes do this automatically).
- channel(argument) List[float] [source]¶
Returns a variant array of doubles for the specified channel (usage: MyArray = DSSmonitor. Channel(i)) A save or SaveAll should be executed first. Done automatically by most standard solution modes.
- property count: int¶
Returns the number of monitors.
- property dbl_freq: List[float]¶
Returns a variant array of doubles containing time values for harmonics mode solutions; empty for time mode solutions (use dblHour).
- property dbl_hour: List[float]¶
Returns returns a variant array of doubles containing time value in hours for the time-sampled monitor values; empty if frequency-sampled values for harmonics solution (see dblFreq).
- property element: str¶
Returns the full name of element being monitored by the active Monitor.
Sets the full name of element being monitored by the active Monitor.
- property file_name: str¶
Returns the name of the CSV file associated with active monitor.
- property file_version: int¶
Returns the Monitor File version (integer).
- property header: List[str]¶
Returns the header string; Variant array of strings containing Channel Names.
- property mode: int¶
Returns the monitor mode (bitmask integer - see DSS Help).
Sets the monitor mode (bitmask integer - see DSS Help).
Bitmask integer designating the values the monitor is to capture:
0 = Voltages and currents at designated terminal
1 = Powers at designated terminal
2 = Tap Position (Transformer Device only) 3 = State Variables (PCElements only)
- 4 = Flicker level and severity index (Pst) for voltages. No adders apply.
Flicker level at simulation time step, Pst at 10-minute time step.
5 = Solution variables (Iterations, etc). Normally, these would be actual phasor quantities from solution.
6 = Capacitor Switching (Capacitors only)
7 = Storage state vars (Storage device only)
8 = All winding currents (Transformer device only)
9 = Losses, watts and var (of monitored device)
10 = All Winding voltages (Transformer device only) Normally, these would be actual phasor quantities from solution.
11 = All terminal node voltages and line currents of monitored device Combine mode with adders below to achieve other results for terminal quantities:
+16 = Sequence quantities
+32 = Magnitude only
+64 = Positive sequence only or avg of all phases
Mix adder to obtain desired results. For example:
Mode=112 will save positive sequence voltage and current magnitudes only
Mode=48 will save all sequence voltages and currents, but magnitude only.
- property name: str¶
Returns the active Monitor object by name.
Sets the active Monitor object by name.
- property names: List[str]¶
Returns an array of all Monitor names (array of strings).
- property num_channels: int¶
Returns the number of Channels on the active Monitor.
- property record_size: int¶
Returns the size of each record in ByteStream.
- property sample_count: int¶
Returns number of examples in Monitor at present.
- save() int [source]¶
Causes active monitor to save its current sample buffer to its monitor stream. Then you can access the Bytestream or channel data. Most standard solution modes do this automatically.
- property terminal: int¶
Returns the terminal number of element being monitored.
Sets sets the terminal number of element being monitored.
Parallel¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Parallel.Parallel.Parallel(obj_dss)[source]¶
Bases:
py_dss_interface.models.Parallel.ParallelI.ParallelI
,py_dss_interface.models.Parallel.ParallelV.ParallelV
These interfaces allows users to use the parallel processing features included in OpenDSS-PM. With this interface it is possible to create multiple actors, specify the CPU where the actor will be executed, control the execution of the actors, check the actors status and progress among many other functionalities.
- property active_actor: int¶
Returns the ID of the active actor. Sets the ID of the active actor; this number cannot be higher than the number of existing actors.
- property active_parallel: int¶
- Gets if the parallel features of OpenDSS-PM are active. If active, this parameter will return 1, otherwise,
will return 0 and OpenDSS-PM will behave sequentially.
Sets enables/disables the parallel features of OpenDSS-PM. To enable set the argument in 1, otherwise, the argument should be 0 and OpenDSS-PM will behave sequentially.
- property actor_cpu: int¶
Gets the ID of the CPU assigned for the execution of the active actor.
Sets the CPU for the execution of the active actor.
- property actor_progress: List[int]¶
Returns an array of integers containing the progress in percentage for each active actor.
- property actor_status: List[int]¶
Returns an array of integers containing the status of each active actor. If 1, the actor is ready to receive new commands, if 0, the actor is busy performing a simulation and cannot take new ?solve? commands at this time. However, the actor is capable to deliver values while the simulation is being performed.
- property concatenate_reportsl: int¶
- Gets the state of the ConcatenateReports property of OpenDSS-PM. If 1, means that every time the user
executes a Show/Export monitor operation, the data stored on the monitors with the same name for each actor will be concatenated one after the other. Otherwise (0), to get access of each monitor the user will have to activate the actor of interest and then perform the Show/Export command on the desired monitor.
Sets the state of the ConcatenateReports property of OpenDSS-PM. If 1, means that every time the user executes a Show/Export monitor operation, the data stored on the monitors with the same name for each actor will be concatenated one after the other. Otherwise (0), to get access of each monitor the user will have to activate the actor of interest and then perform the Show/Export command on the desired monitor.
- create_actor() int [source]¶
Creates a new actor and sets the active actor ID as the ID for the recently created actor. If there are no more CPUs available, the system will not allow the creation of the new actor.
- property num_actors: int¶
Gets the number of actors created in the actual session.
- property num_cores: int¶
Returns the number of physical cores available in the local computer. If your computer has less than 64 Cores, this number should be the number of CPUs/2. For more information, please check: https://www.howtogeek.com/194756/cpu-basics-multiple-cpus-cores-and-hyper-threading-explained/.
- property num_cpus: int¶
Returns the number of CPUs available in the local computer.
Parser¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Parser.Parser.Parser(obj_dss)[source]¶
Bases:
py_dss_interface.models.Parser.ParserI.ParserI
,py_dss_interface.models.Parser.ParserS.ParserS
,py_dss_interface.models.Parser.ParserF.ParserF
,py_dss_interface.models.Parser.ParserV.ParserV
This interface implements the CmathLib (ICmathLib) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: ParserI, ParserS, ParserF, ParserV.
- property auto_increment: int¶
- In this parameter the default is false (0). If true (1) parser automatically advances to next token after
DblValue, IntValue, or StrValue. Simpler when you don’t need to check for parameter names.
- In this parameter the default is false (0). If true (1) parser automatically advances to next token after
DblValue, IntValue, or StrValue. Simpler when you don’t need to check for parameter names.
- property begin_quote: str¶
- Gets the string containing the characters for quoting in OpenDSS scripts. Matching pairs defined in EndQuote.
Default is “([{.
- Sets the string containing the characters for quoting in OpenDSS scripts. Matching pairs defined in EndQuote.
Default is “([{.
- property cmd_string: str¶
- Gets a string to be parsed. Loading this string resets the parser to the beginning of the line.
Then parse off the tokens in sequence.
Sets a string to be parsed. Loading this string resets the parser to the beginning of the line. Then parse off the tokens in sequence.
- property dbl_value: float¶
Returns next parameter as a double.
- property delimiters: str¶
- Gets the string defining hard delimiters used to separate token on the command string. Default is ,
and =. The = separates token name from token value. These override whitespaces to separate tokens.
Sets the string defining hard delimiters used to separate token on the command string. Default is , and =. The = separates token name from token value. These override whitespace to separate tokens.
- property end_quote: str¶
- Gets the string containing the characters, in order, that match the beginning quote characters in BeginQuote.
Default is “)]}.
- Sets the string containing the characters, in order, that match the beginning quote characters in BeginQuote.
Default is “)]}.
- property int_value: int¶
Returns next parameter as a long integer.
- property matrix: List[float]¶
Use this property to parse a Matrix token in OpenDSS format. Returns square matrix of order specified. Order same as default fortran order: column by column.
- property parser_next_param: str¶
Gets next token and return tag name (before = sign) if any. See Autoincrement.
- property parser_str_value: str¶
Returns next parameter as a string.
- property reset_delimiters: int¶
Reset delimiters to their default values.
- property sym_matrix: List[float]¶
Use this property to parse a Matrix token in lower triangular form. Symmetry is forced.
- property vector: List[float]¶
Returns token as variant array of doubles. For parsing quoted array syntax.
- property white_space: str¶
Gets the characters used for White space in the command string. Default in blank and Tab.
Sets the characters used for White space in the command string. Default in blank and Tab.
PDElements¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.PDElements.PDElements.PDElements(obj_dss)[source]¶
Bases:
py_dss_interface.models.PDElements.PDElementsF.PDElementsF
,py_dss_interface.models.PDElements.PDElementsI.PDElementsI
,py_dss_interface.models.PDElements.PDElementsS.PDElementsS
This interface implements the PDElements (IPDElements) interface of OpenDSS by declaring 3 procedures for accessing the different properties included in this interface: PDElementsF, PDElementsI, PDElementsS.
- property accumulated_failure_rate: float¶
Gets the accumulated failure rate for this branch on down line.
- property branch_failure_rate: float¶
Gets the failure rate for this branch. Faults per year including length of line.
- property count: int¶
Gets number of PDElements in active circuit.
- property fault_rate: float¶
Gets the number of failures per year. For LINE elements: Number of failures per unit length per year.
Sets the number of failures per year. For LINE elements: Number of failures per unit length per year.
- first() int [source]¶
Sets the first enabled PD element to be the active element. Returns 0 if none found.
- property from_terminal: int¶
Gets the number of the terminal of active PD element that is on the “from” side. This is set after the meter zone is determined.
- property is_shunt: int¶
Sets returns 1 if the PD element should be treated as a shunt element rather than a series element. Applies to capacitor and reactor elements in particular.
- property name: str¶
Gets the name of the active PDElement, returns null string if active element id not PDElement.
Sets the name of the active PDElement, returns null string if active element id not PDElement.
- next() int [source]¶
Sets the next enabled PD element to be the active element. Returns 0 if none found.
- property num_customers: int¶
Gets the number of customers in this branch.
- property parent_pd_element: int¶
Gets the parent PD element to be the active circuit element. Returns 0 if no more elements upline.
- property pct_permanent: float¶
- Gets the percent of faults that are permanent (require repair). Otherwise,
fault is assumed to be transient/temporary.
Sets the percent of faults that are permanent (require repair). Otherwise, fault is assumed to be transient/temporary.
- property repair_time: float¶
Gets the average time to repair a permanent fault on this branch, hours.
- property section_id: int¶
Gets the integer ID of the feeder section that this PDElement branch is part of.
- property total_customers: int¶
Gets the total number of customers from this branch to the end of the zone.
- property total_miles: float¶
Gets the total miles of line from this element to the end of the zone. For recloser siting algorithm.
PVSystems¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.PVSystems.PVSystems.PVSystems(obj_dss)[source]¶
Bases:
py_dss_interface.models.PVSystems.PVSystemsV.PVSystemsV
,py_dss_interface.models.PVSystems.PVSystemsS.PVSystemsS
,py_dss_interface.models.PVSystems.PVSystemsI.PVSystemsI
,py_dss_interface.models.PVSystems.PVSystemsF.PVSystemsF
This interface implements the PVSystems (IPVSystems) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: PVSystemsV, PVSystemsS, PVSystemsI, PVSystemsF.
- property count: int¶
Returns the number of PVSystem objects currently defined in the active circuit.
- property idx: int¶
Gets the active PVSystem by index; 1..Count. Sets the active PVSystem by index; 1..Count..
- property irradiance: float¶
Gets the present value of the Irradiance property in W/sq-m. Sets the present value of the Irradiance property in W/sq-m.
- property kva: float¶
Gets the rated kVA of the PVSystem. Sets the rated kVA of the PVSystem.
- property kvar: float¶
Gets the kvar value. Sets the kvar value.
- property kw_output: float¶
Gets the kW output.
- property name: str¶
Gets the name of the active PVSystem. Sets the name of the active PVSystem.
- property names: List[str]¶
Gets the variant array of string containing names of all PVSystems in the circuit.
- property pf: float¶
Gets the power factor value. Sets the power factor value.
- property pmpp: float¶
Gets the Pmpp. Sets the Pmpp.
Reclosers¶
- class py_dss_interface.models.Reclosers.Reclosers.Reclosers(obj_dss)[source]¶
Bases:
py_dss_interface.models.Reclosers.ReclosersI.ReclosersI
,py_dss_interface.models.Reclosers.ReclosersV.ReclosersV
,py_dss_interface.models.Reclosers.ReclosersS.ReclosersS
,py_dss_interface.models.Reclosers.ReclosersF.ReclosersF
This interface implements the Reclosers (IReclosers) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: ReclosersI, ReclosersV, ReclosersS, ReclosersF._
- close() int [source]¶
Close the switched object controlled by the recloser. Resets recloser to first operation.
- property count: int¶
Gets number of Reclosers in active circuit.
- property ground_inst: float¶
Gets the ground (3I0) instantaneous trip setting - curve multiplier or actual amps. Sets the ground (3I0) instantaneous trip setting - curve multiplier or actual amps.
- property ground_trip¶
Gets the ground (3I0) trip multiplier or actual amps. Sets the ground (3I0) trip multiplier or actual amps.
- property idx: int¶
Gets the active recloser by index into the recloser list. 1..Count. Sets the active recloser by index into the recloser list. 1..Count.
- property intervals: List[float]¶
- property monitored_obj: str¶
Gets the full name of object this Recloser is monitoring. Sets the full name of object this Recloser is monitoring.
- property monitored_term: int¶
Gets the terminal number of Monitored Object for the Recloser. Sets the terminal number of Monitored Object for the Recloser.
- property name: str¶
Gets the name of the active Recloser Object. Sets the name of the active Recloser Object.
- property names: List[str]¶
Gets a variant array of strings with names of all reclosers in active circuit. Gets a variant array of doubles: reclose intervals (s) between shots.
- property num_fast: int¶
Gets the number of fast shots. Sets the number of fast shots.
- property phase_inst: float¶
Gets the phase instantaneous curve multiplier or actual amps. Sets the phase instantaneous curve multiplier or actual amps.
- property phase_trip: float¶
Gets the phase trip curve multiplier or actual amps. Sets the phase trip curve multiplier or actual amps.
- property shots: int¶
Gets the number of shots to lockout (fast + delayed). Sets the number of shots to lockout (fast + delayed).
- property switched_obj: str¶
Gets the full name of the circuit element that is being switched by this Recloser. Sets the full name of the circuit element that is being switched by this Recloser.
- property switched_term: int¶
Gets the terminal of the controlled device being switched by the Recloser. Sets the terminal of the controlled device being switched by the Recloser.
RegControls¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.RegControls.RegControls.RegControls(obj_dss)[source]¶
Bases:
py_dss_interface.models.RegControls.RegControlsI.RegControlsI
,py_dss_interface.models.RegControls.RegControlsF.RegControlsF
,py_dss_interface.models.RegControls.RegControlsV.RegControlsV
,py_dss_interface.models.RegControls.RegControlsS.RegControlsS
This interface implements the RegControls (IRegControls) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: RegControlsI, RegControlsF, RegControlsV, RegControlsS.
- property count: int¶
Gets the number of RegControl objects in Active Circuit.
- property ct_primary: float¶
Gets the CT primary ampere rating (secondary is 0.2 amperes). Sets the CT primary ampere rating (secondary is 0.2 amperes).
- property delay: float¶
- Gets the time delay [s] after arming before the first tap change.
Control may reset before actually changing taps.
- Sets the time delay [s] after arming before the first tap change. Control may reset before actually
changing taps.
- property forward_band: float¶
Gets the regulation bandwidth in forward direction, centered on Vreg. Sets the regulation bandwidth in forward direction, centered on Vreg.
- property forward_r: float¶
Gets the LDC R settings in Volts. Sets the LDC R settings in Volts.
- property forward_vreg: float¶
Gets the target voltage in the forward direction, on PT secondary base. Sets the target voltage in the forward direction, on PT secondary base.
- property forward_x: float¶
Gets the LDC X settings in Volts. Sets sets the LDC X settings in Volts.
- property is_inverse_time: int¶
- Gets the inverse time feature. Time delay is inversely adjusted, proportional to the amount of voltage
outside the regulator band.
- Sets the inverse time feature. Time delay is inversely adjusted, proportional to the amount of voltage
outside the regulator band.
- property is_reversible: int¶
Gets the setting in the reverse direction, usually not applicable to substation transformers. Sets the different settings for the reverse direction (see Manual for details), usually not applicable to substation transformers.
- property max_tap_change: int¶
- Gets the maximum tap change per iteration in STATIC solution mode. 1 is more realistic, 16 is the default for
faster solution.
- Sets the maximum tap change per iteration in STATIC solution mode. 1 is more realistic, 16 is the default for
faster solution.
- property monitored_bus: str¶
Gets the name of the remote regulated bus, in lieu of LDC settings. Sets the name of the remote regulated bus, in lieu of LDC settings.
- property name: str¶
Gets the active RegControl name. Sets the active RegControl name.
- property names: List[str]¶
Gets a variant array of strings containing all RegControl names.
- property pt_ratio: float¶
Gets the PT ratio for voltage control settings. Sets the PT ratio for voltage control settings.
- property reverse_band: float¶
Gets the bandwidth in reverse direction, centered on reverse Vreg. Sets the bandwidth in reverse direction, centered on reverse Vreg.
- property reverse_r: float¶
Gets the reverse LDC R settings in Volts. Sets the reverse LDC R settings in Volts.
- property reverse_vreg: float¶
Gets the target voltage in the reverse direction, on PT secondary base. Sets the target voltage in the reverse direction, on PT secondary base.
- property reverse_x: float¶
Gets the reverse LDC X settings in Volts. Sets the reverse LDC X settings in Volts.
- property tap_delay: float¶
- Gets the time delay [s] for subsequent tap changes in a set. Control may reset before actually changing
taps.
- Sets the time delay [s] for subsequent tap changes in a set. Control may reset before actually changing
taps.
- property tap_number: int¶
Gets the actual tap number of the active RegControl. Sets the actual tap number of the active RegControl.
- property tap_winding: int¶
Gets the tapped winding number. Sets the tapped winding number.
- property transformer: str¶
Gets the name of the transformer this regulator controls. Sets the name of the transformer this regulator controls.
- property voltage_limit: float¶
- property winding: int¶
Gets the winding number for PT and CT connections. Sets the winding number for PT and CT connections.
Relays¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Relays.Relays.Relays(obj_dss)[source]¶
Bases:
py_dss_interface.models.Relays.RelaysS.RelaysS
,py_dss_interface.models.Relays.RelaysV.RelaysV
,py_dss_interface.models.Relays.RelaysI.RelaysI
This interface implements the Relays (IRelays) interface of OpenDSS by declaring 3 procedures for accessing the different properties included in this interface: RelaysS, RelaysV, RelaysI.
- property count: int¶
Gets number of Relays in active circuit.
- property idx: int¶
Gets the active relay by index into the Relay list. 1..Count. Sets the active relay by index into the Relay list. 1..Count.
- property monitored_obj¶
Gets the full name of the object this relay is monitoring. Sets the full name of the object this relay is monitoring.
- property monitored_term: int¶
Gets the number of terminal of monitored element that this relay is monitoring. Sets the number of terminal of monitored element that this relay is monitoring.
- property name¶
Gets the name of the active Relay. Sets the name of the active Relay.
- property names: List[str]¶
Gets a variant array of strings containing names of all relay elements.
- property switched_obj¶
Gets the full name of element that will switched when relay trips. Sets the full name of element that will switched when relay trips.
- property switched_term: int¶
Gets the number of terminal of the switched object that will be opened when the relay trips. Sets the number of terminal of the switched object that will be opened when the relay trips.
Sensors¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Sensors.Sensors.Sensors(obj_dss)[source]¶
Bases:
py_dss_interface.models.Sensors.SensorsV.SensorsV
,py_dss_interface.models.Sensors.SensorsS.SensorsS
,py_dss_interface.models.Sensors.SensorsI.SensorsI
,py_dss_interface.models.Sensors.SensorsF.SensorsF
This interface implements the Sensors (ISensors) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: SensorsV, SensorsS, SensorsI, SensorsF.
- property currents: List[float]¶
Gets an array of doubles for the line current measurements; don’t use with KWS and KVARS. Sets an array of doubles for the line current measurements; don’t use with KWS and KVARS.
- property is_delta: int¶
Returns 1 if the sensor is connected in delta; otherwise, returns 0. Allows to set 1 if the sensor is connected in delta; otherwise, set 0 (argument).
- property kv_base: float¶
Gets the voltage base for the sensor measurements. LL for 2 and 3 - phase sensors, LN for 1-phase sensors. Sets the voltage base for the sensor measurements. LL for 2 and 3 - phase sensors, LN for 1-phase sensors.
- property kvars: List[float]¶
Gets an array of doubles for Q measurements; overwrites currents with a new estimate using KWS. Sets an array of doubles for Q measurements; overwrites currents with a new estimate using KWS.
- property kws: List[float]¶
Gets an array of doubles for P measurements; overwrites currents with a new estimate using KVARS. Sets an array of doubles for P measurements; overwrites currents with a new estimate using KVARS.
- property metered_element: str¶
Gets the full name of the measured element. Sets the full name of the measured element.
- property metered_terminal: int¶
Gets the number of the measured terminal in the measured element. Sets the number of the measured terminal in the measured element.
- property name: str¶
Gets the name of the active sensor object. Sets the name of the active sensor object.
- property names: List[str]¶
Returns a variant array of sensor names.
- property pct_error: float¶
Gets the assumed percent error in the Sensor measurement. Default is 1. Sets the assumed percent error in the Sensor measurement. Default is 1.
- property reverse_delta: int¶
Returns 1 if voltage measurements are 1-3, 3-2, 2-1; otherwise 0. Allows to set 1 if voltage measurements are 1-3, 3-2, 2-1; otherwise 0.
- property weight: float¶
Gets the weighting factor for this sensor measurement with respect to the other sensors. Default is 1. Sets the weighting factor for this sensor measurement with respect to the other sensors. Default is 1.
Settings¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Settings.Settings.Settings(obj_dss)[source]¶
Bases:
py_dss_interface.models.Settings.SettingsS.SettingsS
,py_dss_interface.models.Settings.SettingsF.SettingsF
,py_dss_interface.models.Settings.SettingsI.SettingsI
,py_dss_interface.models.Settings.SettingsV.SettingsV
This interface implements the Settings (ISettings) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: SettingsS, SettingsF, SettingsI, SettingsV.
- property allocation_factors: float¶
Sets all load allocation factors for all loads defined by XFKVA property to this value.
- property allow_duplicates: int¶
Gets if OpenDSS allows duplicate names of objects: {1 allow, 0 not allow}.
Sets if OpenDSS allows duplicate names of objects: {1 allow, 0 not allow}.
- property auto_bus_list: str¶
Gets the list of Buses or (File=xxxxx) syntax for the AutoAdd solution mode.
Sets the list of Buses or (File=xxxxx) syntax for the AutoAdd solution mode.
- property ckt_model: int¶
Gets {dssMultiphase* | dssPositiveSeq} Indicate if the circuit model is positive sequence.
Sets {dssMultiphase* | dssPositiveSeq} Indicate if the circuit model is positive sequence.
- property emerg_vmax_pu: float¶
Gets the per unit maximum voltage for Emergency conditions.
Sets the per unit maximum voltage for Emergency conditions.
- property emerg_vmin_pu: float¶
Gets the per unit minimum voltage for Emergency conditions.
Sets the per unit minimum voltage for Emergency conditions.
- property loss_regs: List[int]¶
Gets the array of Integers defining Energy Meter registers to use for computing Losses.
Sets the array of Integers defining Energy Meter registers to use for computing Losses.
- property loss_weight: float¶
Gets the weighting factor applied to Loss register values.
Sets the weighting factor applied to Loss register values.
- property norm_vmax_pu: float¶
Gets the per unit maximum voltage for Normal conditions.
Sets the per unit maximum voltage for Normal conditions.
- property norm_vmin_pu: float¶
Gets the per unit minimum voltage for Normal conditions.
Sets the per unit minimum voltage for Normal conditions.
- property price_curve: str¶
- Gets the name of LoadShape object that serves as the source of price signal data for yearly simulations,
etc.
Sets the name of LoadShape object that serves as the source of price signal data for yearly simulations, etc.
- property price_signal: float¶
Gets the price signal for the circuit.
Sets the price signal for the circuit.
- property trapezoidal: int¶
Gets {True (1) | False (0)} value of trapezoidal integration flag in Energy Meters.
Sets {True (1) | False (0)} value of trapezoidal integration flag in Energy Meters.
- property ue_regs: List[int]¶
Gets the array of Integers defining Energy Meter registers to use for computing UE.
Sets the array of Integers defining Energy Meter registers to use for computing UE.
- property ue_weight: float¶
Gets the weighting factor applied to UE register values.
Sets the weighting factor applied to UE register values.
- property voltage_bases: List[float]¶
Gets the array of doubles defining the legal voltage bases in kV L-L.
Sets the array of doubles defining the legal voltage bases in kV L-L.
- property zone_lock: int¶
- Gets the status of Lock zones on energy meters to prevent rebuilding if a circuit
change occurs: {1= true, 0= False}.
Sets the status of Lock zones on energy meters to prevent rebuilding if a circuit change occurs: {1= true, 0= False}.
Solution¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Solution.Solution.Solution(obj_dss)[source]¶
Bases:
py_dss_interface.models.Solution.SolutionI.SolutionI
,py_dss_interface.models.Solution.SolutionF.SolutionF
,py_dss_interface.models.Solution.SolutionS.SolutionS
,py_dss_interface.models.Solution.SolutionV.SolutionV
This interface implements the Solution (ISolution) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: SolutionI, SolutionF, SolutionS, SolutionV.
- property add_type: int¶
Returns the type of device to add in AutoAdd Mode: {dssGen (default)|dssCap}. Modifies the type of device to add in AutoAdd Mode: {dssGen (default)|dssCap}.
- property algorithm: int¶
Returns the base solution algorithm: {dssNormalSolve | dssNewtonSolve}. Modifies the base solution algorithm: {dssNormalSolve | dssNewtonSolve}.
- build_y_matrix() int [source]¶
Forces building of the System Y matrix according to the argument: {1= series elements only | 2= Whole Y matrix}.
- property bus_levels: List[int]¶
Returns an array of integers containing BusLevels array. This array gives a numeric value to each bus to specify how far it is from the circuit?s backbone (a continuous path from the feeder head to the feeder end). It is very handy to understand the circuit?s topology.
- calc_inc_matrix() int [source]¶
Starts the calculation of the incidence matrix for the active actor. Please be sure that the circuits of each actor have been compiled and ready to be solved before using this command.
- calc_inc_matrix_0() int [source]¶
Starts the calculation of the Branch to Node incidence matrix for the active actor. Please be sure that the circuits of each actor have been compiled and ready to be solved before using this command. The difference between this command and the CalcIncMatrix is that the calculated matrix will be ordered hierarchically from the substation to the feeder end, which can be helpful for many operations. Additionally, the Bus Levels vector is calculated and the rows (PDElements) and columns (Buses) are permuted so it is easy to identify their position in the circuit.
- property cap_kvar: float¶
Returns the capacitor kvar for adding in AutoAdd mode. Sets the capacitor kvar for adding in AutoAdd mode.
- check_controls() int [source]¶
Performs the normal process for sampling and executing Control Actions and Fault Status and rebuilds Y if necessary.
- check_fault_status() int [source]¶
Executes status check on all fault objects defined in the circuit. Returns 0.
- property control_actions_done: int¶
Indicates that the control actions are done: {1 done, 0 not done}. Modifies the flag to indicate that the control actions are done: {1 done, 0 not done}.
- property control_iterations: int¶
Returns the current value of the control iteration counter. Modifies the current value of the control iteration counter.
- property control_mode: int¶
Returns the mode for control devices: {dssStatic (default) | dssEvent | dssTime}. Modifies the mode for control devices: {dssStatic (default) | dssEvent | dssTime}.
- property converged: int¶
Indicates whether the circuit solution converged (1 converged | 0 not converged). Modifies the converged flag (1 converged | 0 not converged).
- property dbl_hour: float¶
Returns the hour as a double, including fractional part. Sets the hour as a double, including fractional part.
- property default_daily: str¶
Returns the default daily load shape (defaults to “Default”). Sets the default daily load shape (defaults to “Default”).
- property default_yearly: str¶
Returns the default yearly load shape (defaults to “Default”). Sets the default yearly load shape (defaults to “Default”).
- do_control_actions() int [source]¶
Pops control actions off the control queue and dispatches to the proper control element.
- property event_log: List[str]¶
Returns an array of strings containing the Event Log.
- finish_time_step() int [source]¶
Calls cleanup, sample monitors, and increment time at end of time step.
- property frequency: float¶
Returns the frequency for the next solution. Sets the frequency for the next solution.
- property gen_kw: float¶
Returns the generator kW for AutoAdd mode. Sets the generator kW for AutoAdd mode.
- property gen_mult: float¶
Returns the default multiplier applied to generators (like LoadMult). Sets the default multiplier applied to generators (like LoadMult).
- property gen_pf: float¶
Returns the pf for generators in AutoAdd mode. Sets the pf for generators in AutoAdd mode.
- property hour: int¶
Returns the present hour (See DSS help). Modifies the present hour (See DSS help).
- property inc_matrix_cols: List[str]¶
Returns an array of strings specifying the way the cols of the incidence matrix (buses) are organized, depending on the way the Branch to node incidence matrix was calculated (CalcIncMatrix/CalcIncMatrix_O) the result could be very different.
- property inc_matrix_rows: List[str]¶
Returns an array of strings specifying the way the rows of the incidence matrix (PDElements) are organized, depending on the way the Branch to node incidence matrix was calculated (CalcIncMatrix/CalcIncMatrix_O) the result could be very different..
- init_snap() int [source]¶
Initializes some variables for snap shot power flow. SolveSnap does this automatically.
- property iterations: int¶
Returns the number of iterations taken for the last solution.
- property laplacian: List[int]¶
Returns an array of integers containing the Laplacian matrix using the incidence matrix previously calculated , this means that before calling this command the incidence matrix needs to be calculated using calcincmatrix/calcincmatrix_o. This command will return only the non-zero values in compressed coordinate format (row, col, value)..
- property ld_curve: str¶
Returns the Load-Duration Curve name for LD modes. Sets the Load-Duration Curve name for LD modes.
- property load_model: int¶
Returns the Load Model: {dssPowerFlow (default)|dssAdmittance}. Modifies the Load Model: {dssPowerFlow (default)|dssAdmittance}.
- property load_mult: float¶
Returns the default load multiplier applied to all non-fixed loads. Sets the default load multiplier applied to all non-fixed loads.
- property max_control_iterations: int¶
Returns the maximum allowable control iterations. Modifies the maximum allowable control iterations.
- property max_iterations: int¶
Returns the Maximum number of iterations used to solve the circuit. Modifies the Maximum number of iterations used to solve the circuit.
- property mode: int¶
- property mode_id: str¶
Returns the ID (text) of the present solution mode.
- property most_iterations_done: int¶
Returns the max number of iterations required to converge at any control iteration of the most recent solution..
- property nc_matrix: List[int]¶
Returns an array of integers containing the incidence matrix (1-D). Each cell of the incidence matrix is delivered using 3 elements of the array delivered, the first is the row, the second is the column and the third is the value (1/-1). This procedure will only deliver the non-zero elements..
- property number: int¶
Returns the number of solutions to perform for MonteCarlo and time series simulations. Modifies the number of solutions to perform for MonteCarlo and time series simulations.
- property pct_growth: float¶
Returns the percent default annual load growth rate. Sets the percent default annual load growth rate.
- property process_time: float¶
Retrieves the time required (microseconds) to perform the latest solution time step, this time does not include the time required for sampling meters/monitors.
- property process_time_step: float¶
Retrieves the time required (microseconds) to perform the latest solution time step including the time required for sampling meters/monitors.
- property random: int¶
Returns the randomization mode for random variables “Gaussian” o “Uniform”. Modifies the randomization mode for random variables “Gaussian” o “Uniform”.
- sample_control_devices() int [source]¶
Executes a sampling of all intrinsic control devices, which push control actions into the control queue.
- sample_do_control_actions() int [source]¶
Sample controls and then process the control queue for present control mode and dispatch control actions. Returns 0.
- property seconds: float¶
Returns the seconds from top of the hour. Sets the seconds from top of the hour.
- solve_all() int [source]¶
Starts the solution process for all the actors created in memory. Please be sure that the circuits of each actor have been compiled and ready to be solved before using this command.
- solve_direct() int [source]¶
Executes a direct solution from the system Y matrix, ignoring compensation currents of loads, generators (includes Yprim only).
- solve_no_control() int [source]¶
Is similar to SolveSnap except no control actions are checked or executed.
- solve_plus_control() int [source]¶
Executes a power flow solution (SolveNoControl) plus executes a CheckControlActions that executes any pending control actions.
- solve_power_flow() int [source]¶
Solves using present power flow method. Iterative solution rather than direct solution.
- property step_size: float¶
Returns the step size for the next solution. Sets the step size for the next solution.
- property step_size_hr: float¶
Sets the step size in Hours.
- property step_size_min: float¶
Sets the step size in minutes.
- property system_y_changed: int¶
Indicates if elements of the System Y have been changed by recent activity. If changed returns 1; otherwise 0.
- property tolerance: float¶
Returns the solution convergence tolerance. Sets the solution convergence tolerance.
- property total_iterations: int¶
Returns the total iterations including control iterations for most recent solution.
- property total_time: float¶
Retrieves the accumulated time required (microseconds) to perform the simulation. Sets the accumulated time (microseconds) register. The new value for this register must be specified in the argument.
- property year: int¶
Returns the present Year (See DSS help). Modifies the present Year (See DSS help).
SwtControls¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.SwtControls.SwtControls.SwtControls(obj_dss)[source]¶
Bases:
py_dss_interface.models.SwtControls.SwtControlsS.SwtControlsS
,py_dss_interface.models.SwtControls.SwtControlsV.SwtControlsV
,py_dss_interface.models.SwtControls.SwtControlsI.SwtControlsI
,py_dss_interface.models.SwtControls.SwtControlsF.SwtControlsF
This interface implements the SwtControls (ISwtControls) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: SwtControlsS, SwtControlsV, SwtControlsI, SwtControlsF.
- property action: int¶
- Gets the open (1) or close (2) action of the switch. No effect if switch is locked.
However, reset removes any lock and then closes the switch (shelf state). 0 = none action.
Sets open (1) or close (2) the switch. No effect if switch is locked. However, reset removes any lock and then closes the switch (shelf state). 0 = none action (see manual for details).
- property count: int¶
Gets the total number of SwtControls in the active circuit.
- property delay: float¶
- Gets the time delay [s] between arming and opening or closing the switch.
Control may reset before actually operating the switch.
Sets sets the time delay [s] between arming and opening or closing the switch. Control may reset before actually operating the switch.
- property is_locked: int¶
Gets the lock state: {1 locked | 0 not locked}.
Sets the lock to prevent both manual and automatic switch operation.
- property name: str¶
Gets the active swtcontrol name.
Sets the active swtcontrol by name.
- property names: List[str]¶
Gets a variant array of strings with all SwtControl names in the active circuit.
- property switched_obj: str¶
Gets the name of the switched object by the active SwtControl.
Sets the switched object by name.
- property switched_term: int¶
Gets the terminal number where the switch is located on the SwitchedObj.
Sets the terminal number where the switch is located on the SwitchedObj.
Text¶
Created by eniocc at 11/10/2020
Topology¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Topology.Topology.Topology(obj_dss)[source]¶
Bases:
py_dss_interface.models.Topology.TopologyI.TopologyI
,py_dss_interface.models.Topology.TopologyV.TopologyV
,py_dss_interface.models.Topology.TopologyS.TopologyS
This interface implements the Topology (ITopology) interface of OpenDSS by declaring 3 procedures for accessing the different properties included in this interface: TopologyI, TopologyV, TopologyS.
- property active_branch: int¶
Returns the index of the active Branch.
- property active_level: int¶
Gets the topological depth of the active branch.
- property all_isolated_branches: List[str]¶
Gets a variant array of all isolated branch names.
- property all_isolated_loads: List[str]¶
Gets a variant array of all isolated load names.
- property all_looped_pairs: List[str]¶
Gets a variant array of all looped element names, by pairs.
- backward_branch() int [source]¶
Moves back toward the source, return index of new active branch or 0 if no more.
- property branch_name: str¶
Gets the name of the active branch. Sets the name of the active branch.
- property bus_name: str¶
Gets the name of the active Bus. Sets the Bus active by name.
- first_load() int [source]¶
Sets as active load the first load at the active branch, return index or 0 if none.
- forward_branch() int [source]¶
Moves forward in the tree, return index of new active branch or 0 if no more.
- next_load() int [source]¶
Sets as active load the next load at the active branch, return index or 0 if none.
- property num_isolated_branches: int¶
Gets the number of isolated branches (PD elements and capacitors).
- property num_isolated_loads: int¶
Gets the number of isolated loads.
- property num_loops: int¶
Gets the number of loops.
Transformers¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Transformers.Transformers.Transformers(obj_dss)[source]¶
Bases:
py_dss_interface.models.Transformers.TransformersV.TransformersV
,py_dss_interface.models.Transformers.TransformersF.TransformersF
,py_dss_interface.models.Transformers.TransformersI.TransformersI
,py_dss_interface.models.Transformers.TransformersS.TransformersS
This interface implements the Transformers (ITransformer) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: TransformersV, TransformersF, TransformersI, TransformersS.
- property count: int¶
Gets the number of transformers within the active circuit.
- property is_delta: int¶
Gets the information about if the active winding is delta (1) or wye (0) connection.
Sets the information about if the active winding is delta (1) or wye (0) connection.
- property kv: float¶
Gets the active winding kV rating. Phase-phase for 2 or 3 phases, actual winding kV 1 phase transformer.
Sets the active winding kV rating. Phase-phase for 2 or 3 phases, actual winding kV 1 phase transformer.
- property kva: float¶
- Gets the active winding kVA rating. On winding 1, this also determines normal and emergency current
ratings for all windings.
Sets the active winding kVA rating. On winding 1, this also determines normal and emergency current ratings for all windings.
- property max_tap: float¶
Gets the active winding maximum tap in per-unit.
Sets the active winding maximum tap in per-unit.
- property min_tap: float¶
Gets the active winding minimum tap in per-unit.
Sets the active winding minimum tap in per-unit.
- property name: str¶
Gets the active transformer name.
Sets the active transformer by name.
- property names: List[str]¶
Gets a variant array of strings with all Transformer names in the active circuit.
- property num_taps: int¶
Gets the active winding number of tap steps between MinTap and MaxTap.
Sets the active winding number of tap steps between MinTap and MaxTap.
- property num_windings: int¶
Gets the number of windings on this transformer. Allocates memory; set or change this property first.
Sets the number of windings on this transformer. Allocates memory; set or change this property first.
- property r: float¶
Gets the active winding resistance in %.
Sets the active winding resistance in %.
- property r_neut: float¶
Gets the active winding neutral resistance [ohms] for wye connections. Set less than zero ungrounded wye.
Sets the active winding neutral resistance [ohms] for wye connections. Set less than zero ungrounded wye.
- property str_wdg_voltages: str¶
Gets the voltages at the active winding of the active transformer in string format.
- property tap: float¶
Gets the active winding tap in per-unit.
Sets the active winding tap in per-unit.
- property wdg: int¶
- Gets the active winding number from 1..NumWindings.
Update this before reading or setting a sequence of winding properties (R, Tap, kV, kVA, etc.).
Sets the active winding number from 1..NumWindings. Update this before reading or setting a sequence of winding properties (R, Tap, kV, kVA, etc.).
- property wdg_currents: List[float]¶
Gets a a variant array of doubles containing the currents at the active winding on the active transformer. These currents come as complex pairs.
- property wdg_voltages: List[float]¶
Gets a variant array of doubles containing the voltages at the active winding on the active transformer. These voltages come as complex pairs.
- property x_neut: float¶
Gets the active winding neutral reactance [ohms] for wye connections.
Sets the active winding neutral reactance [ohms] for wye connections.
- property xfmr_code: str¶
Gets the name of an XfrmCode that supplies electrical parameters for this transformer.
Sets the name of an XfrmCode that supplies electrical parameters for this transformer.
- property xhl: float¶
- Gets the percent reactance between windings 1 and 2, on winding 1 kVA base. Use for 2 winding or 3 winding
transformers.
Sets the percent reactance between windings 1 and 2, on winding 1 kVA base. Use for 2 winding or 3 winding transformers.
- property xht: float¶
- Gets the percent reactance between windings 1 and 3, on winding 1 kVA base. Use for 3 winding transformers
only.
Sets the percent reactance between windings 1 and 3, on winding 1 kVA base. Use for 3 winding transformers only.
- property xlt: float¶
- Gets he percent reactance between windings 2 and 3, on winding 1 kVA base. Use for 3 winding transformers
only.
Sets the percent reactance between windings 2 and 3, on winding 1 kVA base. Use for 3 winding transformers only.
VSources¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.VSources.VSources.VSources(obj_dss)[source]¶
Bases:
py_dss_interface.models.VSources.VSourcesS.VSourcesS
,py_dss_interface.models.VSources.VSourcesV.VSourcesV
,py_dss_interface.models.VSources.VSourcesI.VSourcesI
,py_dss_interface.models.VSources.VSourcesF.VSourcesF
This interface implements the Vsources (IVSources) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: VSourcesS, VSourcesV, VSourcesI, VSourcesF.
- property angle_deg: float¶
Gets the source phase angle of first phase in degrees. Sets the source phase angle of first phase in degrees.
- property base_kv: float¶
Gets the source voltage in kV. Sets the source voltage in kV.
- property count: int¶
Returns the number of VSource objects currently defined in the active circuit.
- property frequency: float¶
Gets the source frequency in Hz. Sets the source frequency in Hz.
- property name: str¶
Gets the name of the active VSource. Sets the name of the active VSource.
- property names: List[str]¶
Gets the name of the active VSource.
- property phases: int¶
Gets the number of phases of the active VSource. Sets the number of phases of the active VSource.
- property pu: float¶
Gets the source voltage in pu. Sets the source voltage in pu.
XYCurves¶
Created by eniocc at 11/10/2020
- class py_dss_interface.models.XYCurves.XYCurves.XYCurves(dss_obj)[source]¶
Bases:
py_dss_interface.models.XYCurves.XYCurvesS.XYCurvesS
,py_dss_interface.models.XYCurves.XYCurvesI.XYCurvesI
,py_dss_interface.models.XYCurves.XYCurvesF.XYCurvesF
,py_dss_interface.models.XYCurves.XYCurvesV.XYCurvesV
This interface implements the XYCurves (IXYCurves) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface: XYCurvesS, XYCurvesI, XYCurvesF, XYCurvesV.
- property count: int¶
Gets number of XYCurves in active circuit.
- property name: str¶
Gets the name of the active XYCurve Object.
Sets the name of the active XYCurve Object.
- property npts: int¶
- property x: float¶
Gets the interpolated value after setting X.
Sets the X value.
- property x_array: List[float]¶
Gets the X values as a variant array of doubles. Set Npts to max number expected if setting.
Sets the X values as a variant array of doubles specified in Argument. Set Npts to max number expected if setting.
- property x_scale: float¶
Gets the factor to scale X values from original curve.
Sets the factor to scale X values from original curve.
- property x_shift: float¶
Gets the amount to shift X value from original curve.
Sets the amount to shift X value from original curve.
- property y: float¶
Gets the interpolated value after setting Y.
Sets the Y value.
- property y_array: List[float]¶
Gets the Y values as a variant array of doubles. Set Npts to max number expected if setting..
Sets the Y values as a variant array of doubles specified in Argument. Set Npts to max number expected if setting.
- property y_scale: float¶
Gets the factor to scale Y values from original curve.
Sets the factor to scale Y values from original curve.
- property y_shift: float¶
Gets the amount to shift Y value from original curve.
Sets the amount to shift Y value from original curve.