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 interface implements the ActiveClass (IActiveClass) interface of OpenDSS by declaring 3 procedures for accessing the different properties included in this interface: ActiveClassS, ActiveClassI, ActiveClassV. Ih the original paper Davis cited that are 4 procedures, but only 3 were described.
- class py_dss_interface.models.ActiveClass.ActiveClass.ActiveClassI(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the ActiveClass Class where the values are integers.
- The structure of the interface is as follows:
int32_t ActiveClassI(int32_t Parameter,int32_t argument).
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- active_class_count() int [source]
Gets the number of elements in this class. Same as NumElements Property.
- active_class_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.
- class py_dss_interface.models.ActiveClass.ActiveClass.ActiveClassS(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the ActiveClass Class where the values are strings.
- The structure of the interface is as follows:
CStr ActiveClassI(int32_t Parameter, CStr argument)
This interface returns a string, the first parameter is used to specify the property of the class to be used and the second parameter can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- active_class_get_class_name() str [source]
Sets the name of the active Element of the Active class.
- class py_dss_interface.models.ActiveClass.ActiveClass.ActiveClassV(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the ActiveClass Class where the values are Variants.
- The structure of the interface is as follows:
void ActiveClassI(int32_t Parameter, VARIANT *Argument)
This interface returns a Variant, the first parameter is used to specify the property of the class to be used and the second parameter can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
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.
- class py_dss_interface.models.Bus.Bus.BusF(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:
double BUSF(int32_t Parameter, double Argument)
This interface returns a floating point number (64 bits) according to the number sent in the variable “parameter”. The parameter can be one of the following.
- bus_interruptions_avg_duration() float [source]
Returns the average interruption duration in hours.
- bus_interruptions_total_customers() float [source]
Returns the annual number of customer interruptions from this bus.
- bus_lambda() float [source]
Returns the accumulated failure rate downstream from this bus, faults per year.
- bus_line_total_miles() float [source]
Returns the total length of line downline from this bus, in miles. For recloser siting algorithm.
- bus_outage_customer_accum_duration() float [source]
Returns the accumulated customer outage durations.
- bus_read_latitude() float [source]
This parameter returns the GIS latitude assigned to the active bus (if any).
- bus_read_longitude() float [source]
This parameter returns the GIS longitude assigned to the active bus (if any).
- bus_write_latitude(latitude_param: float) float [source]
This parameter sets the GIS latitude to the active bus using the value given at the argument..
- bus_write_longitude(longitude_param: float) float [source]
This parameter sets the GIS longitude to the active bus using the value given at the argument..
- class py_dss_interface.models.Bus.Bus.BusI(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 BUSI(int32_t Parameter, int32_t Argument)
This interface returns an integer according to the number sent in the variable “parameter”. The parameter can be one of the following.
- bus_coord_defined() int [source]
Returns 1 if a coordinate has been defined for this bus; otherwise, it will return 0.
- bus_get_unique_node_number(start_number: int = 1) int [source]
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.
- Parameters
start_number – The first number corresponding the initial bus node number
- Returns
int
- Return type
int
- bus_section_id() int [source]
Returns the integer ID of the feeder section in which this bus is located.
- class py_dss_interface.models.Bus.Bus.BusS(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 BUSS(int32_t Parameter, CStr Argument)
This interface returns a string according to the number sent in the variable “parameter”. The parameter can be one of the following.
- class py_dss_interface.models.Bus.Bus.BusV(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:
void BUSV(int32_t Parameter, VARIANT *Argument)
This interface returns a variant according to the number sent in the variable “parameter”. The parameter can be one of the following.
- bus_all_pce_active_bus() List[str] [source]
Returns an array with the names of all PCE connected to the active bus.
- bus_all_pde_active_bus() List[str] [source]
Returns an array with the names of all PDE connected to the active bus.
- bus_axc_012_matrix()[source]
Variant array of doubles (complex) containing the complete 012 Zsc matrix.
- bus_cplx_sequence_voltages()[source]
Returns the complex double array of sequence voltages (0, 1, 2) at this bus.
- bus_line_list()[source]
This parameter 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.’
- bus_load_list()[source]
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.’.
- bus_nodes() List[int] [source]
Returns an integer array of node numbers defined at the bus in same order as the voltages.
- bus_pu_vll()[source]
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..
- bus_pu_vmag_angle()[source]
Returns a variant array of doubles containing voltages in per unit and angles in degrees.
- bus_vll()[source]
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.
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.
- class py_dss_interface.models.Capacitors.Capacitors.CapacitorsF(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Capacitors Class where the values are doubles.
- The structure of the interface is as follows:
double CapacitorsF(int32_t Parameter, double argument)
This interface returns a floating point number (64 bits), the first parameter is used to specify the property of the class to be used and second parameter can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- capacitors_read_kv() float [source]
Gets the bank rating. Use LL for 2 or 3 phases, or actual can rating for 1 phase.
- capacitors_read_kvar() float [source]
Gets the total bank kvar, distributed equally among phases and steps.
- class py_dss_interface.models.Capacitors.Capacitors.CapacitorsI(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Capacitors Class where the values are integers.
- The structure of the interface is as follows:
int32_t CapacitorsI(int32_t Parameter, int32_t argument)
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- capacitors_add_step() int [source]
Adds one step of the capacitor if available. If successful returns 1.
- capacitors_available_steps() int [source]
Gets the number of steps available in cap bank to be switched ON.
- capacitors_read_is_delta() int [source]
Gets 1 if delta connection, otherwise will return 0 for distributing and switching the total kvar.
- capacitors_read_num_steps() int [source]
Gets the number of steps (defaults 1) for distributing and switching the total bank kvar.
- capacitors_subtract_step() int [source]
Subtracts one step of the capacitor if available. If no more steps, returns 0.
- class py_dss_interface.models.Capacitors.Capacitors.CapacitorsS(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Capacitors Class where the values are Strings.
- The structure of the interface is as follows:
CStr CapacitorsS(int32_t Parameter, CStr capacitor_name)
This interface returns a string, the first parameter is used to specify the property of the class to be used and the second parameter can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- class py_dss_interface.models.Capacitors.Capacitors.CapacitorsV(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Capacitors Class where the values are Variants.
- The structure of the interface is as follows:
void CapacitorsV(int32_t Parameter, VARIANT *Argument)
This interface returns a Variant, the first parameter is used to specify the property of the class to be used and the second parameter can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- capacitors_all_names() List[str] [source]
Gets a variant array of strings with all Capacitor names in the circuit.
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
- class py_dss_interface.models.CapControls.CapControls.CapControlsF(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:
double CapControlsF(int32_t Parameter, double Argument);
This interface returns a floating point number (64 bits) with the result of the query according to the value of the variable Parameter, which can be one of the following.
- capcontrols_read_dead_time() float [source]
Gets the time delay [s] after switching off a step. Control may reset before actually switching.
- capcontrols_read_delay() float [source]
Gets the time delay [s] to switch on after arming. Control may reset before actually switching.
- capcontrols_read_delay_off() float [source]
Gets the time delay [s] before switching off a step. Control may reset before actually switching.
- capcontrols_read_off_setting() float [source]
Gets the threshold to switch off a step. See Mode for Units.
- capcontrols_read_on_setting() float [source]
Gets the threshold to arm or switch on a step. See Mode for Units.
- capcontrols_read_pt_ratio() float [source]
Gets the transducer ratio from primary feeder to control voltage.
- capcontrols_read_vmax() float [source]
Gets the Vmax, this reference with VoltOverride, switch off whenever PT voltage exceeds this level.
- capcontrols_read_vmin() float [source]
Gets the Vmin, this reference with VoltOverride, switch ON whenever PT voltage drops below this level.
- capcontrols_write_ct_ratio(argument: float) float [source]
Sets the transducer ratio current to control current.
- capcontrols_write_dead_time(argument: float) float [source]
Sets the time delay [s] after switching off a step. Control may reset before actually switching..
- capcontrols_write_delay(argument: float) float [source]
Sets the time delay [s] to switch on after arming. Control may reset before actually switching.
- capcontrols_write_delay_off(argument: float) float [source]
Sets the time delay [s] before switching off a step. Control may reset before actually switching.
- capcontrols_write_off_setting(argument: float) float [source]
Sets the threshold to switch off a step. See Mode for Units.
- capcontrols_write_on_setting(argument: float) float [source]
Sets the threshold to arm or switch on a step. See Mode for Units.
- capcontrols_write_pt_ratio(argument: float) float [source]
Sets the transducer ratio from primary feeder to control voltage.
- class py_dss_interface.models.CapControls.CapControls.CapControlsI(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 CapControlsI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following
- capcontrols_read_mode() int [source]
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;
- capcontrols_read_monitored_term() int [source]
Gets the terminal number on the element that PT and CT are connected to.
- capcontrols_read_use_volt_override() int [source]
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.” return self.dss_obj.CapControlsI(6, 0).
- capcontrols_write_mode(argument: int) int [source]
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;
- class py_dss_interface.models.CapControls.CapControls.CapControlsS(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 CapControlsS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- capcontrols_read_monitored_obj() str [source]
Gets the full name of the element that PT and CT are connected to.
- capcontrols_write_capacitor(argument: str) str [source]
Sets the name of the capacitor that is controlled.
- class py_dss_interface.models.CapControls.CapControls.CapControlsV(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:
void CapControlsV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
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
- class py_dss_interface.models.Circuit.Circuit.CircuitF(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:
double CircuitF(int32_t Parameter, double Argument1, double Argument2);
This interface returns a floating point number (IEEE754 64 bits) according to the number sent in the variable “parameter”. The parameter can be one of the following.
- class py_dss_interface.models.Circuit.Circuit.CircuitI(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 CircuitI(int32_t Parameter, int32_t Argument);
This interface returns an integer according to the number sent in the variable “parameter”. The parameter can be one of the following.
- circuit_end_of_time_step_update() int [source]
Calls end of time step cleanup routine in solutionalgs.pas. Returns 0.
- circuit_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).
- circuit_first_pc_element() 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).
- circuit_first_pd_element() 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).
- 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).
- circuit_next_pc_element() 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).
- circuit_next_pd_element() 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).
- circuit_num_ckt_elements() int [source]
Will deliver the number of CktElements included in the active circuit.
- circuit_parent_pd_element() int [source]
Sets parent PD Element, if any, to be the active circuit element and returns index > 0 if it fails or not applicable.
- circuit_save_sample() int [source]
Forces all meters and monitors to save their sample buffers, returns 0.
- class py_dss_interface.models.Circuit.Circuit.CircuitS(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 CircuitS(int32_t Parameter, CStr Argument);
This interface returns a string according to the number sent in the variable “parameter”. The parameter can be one of the following.
- circuit_disable() str [source]
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?.
- circuit_enable() str [source]
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?.
- circuit_set_active_bus(argument: str) 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.
- class py_dss_interface.models.Circuit.Circuit.CircuitV(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:
void CircuitV(int32_t Parameter, VARIANT *Argument, int32_t Argument2);
This interface returns a variant according to the number sent in the variable “parameter”. The parameter can be one of the following.
- circuit_all_bus_distances() List[float] [source]
Returns distance from each bus to parent EnergyMeter. Corresponds to sequence in AllBusNames. Argument2 must be 0.
- circuit_all_bus_names() List[str] [source]
Returns an array of strings with the names of all the Buses of the active circuit (See AllNodeNames). Argument2 must be 0.
- circuit_all_bus_vmag() List[float] [source]
Returns an array of doubles (magnitude) with the node voltages from the most recent solution. Argument2 must be 0.
- circuit_all_bus_vmag_pu() List[float] [source]
Returns an array of doubles with the voltages in per unit of the most recent solution of the active circuit. Argument2 must be 0.
- circuit_all_bus_volts() List[float] [source]
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.
- circuit_all_element_losses() List[float] [source]
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.
- circuit_all_element_names() List[str] [source]
Returns an array of strings with the names of all the elements of the active circuit. Argument2 must be 0.
- circuit_all_node_distances() List[float] [source]
Returns distance from each Node to parent EnergyMeter. Corresponds to sequence in AllBusVmag. Argument2 must be 0.
- circuit_all_node_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.
- circuit_all_node_names() List[str] [source]
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.
- circuit_all_node_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.
- circuit_all_node_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.
- circuit_all_node_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.
- circuit_line_losses() List[float] [source]
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.
- circuit_losses() List[float] [source]
Returns an array of doubles (two doubles for representing a complex number) with the total losses of the active circuit. Argument2 must be 0.
- circuit_substation_losses() List[float] [source]
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.
- circuit_system_y() List[float] [source]
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.
- circuit_total_power() List[float] [source]
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.
- circuit_y_currents()[source]
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.
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
- class py_dss_interface.models.CktElement.CktElement.CktElementF(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
- cktelement_read_emerg_amps() float [source]
Deliver the Emergency ampere rating for the active PDElement.
- cktelement_read_norm_amps() float [source]
Deliver the normal ampere rating for the active PDElement.
- cktelement_variable_i(argument: float) float [source]
Delivers get the value of a variable by index for the active PCElement.
- class py_dss_interface.models.CktElement.CktElement.CktElementI(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 CktElementI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- cktelement_close(argument: int) int [source]
Close the specified terminal (Argument) of the active DSS object.
- cktelement_has_switch_control() int [source]
Returns 1 if the active DSS object has a Switch Control linked; otherwise, it will return 0.
- cktelement_has_volt_control() int [source]
Returns 1 if the active DSS object has a Volt Control linked; otherwise, it will return 0.
- cktelement_is_open() int [source]
Return a 1 if any terminal of the active DSS object is open, otherwise, it will return a 0.
- cktelement_num_conductors() int [source]
Deliver the number of conductors of the active DSS object.
- cktelement_ocp_dev_index() int [source]
Returns the Index into Controller list of OCP Device controlling the active DSS object.
- cktelement_ocp_dev_type() int [source]
Returns one of the following values: 0=none; 1=Fuse; 2=Recloser; 3=Relay according to the type of active control.
- cktelement_open(argument: int) int [source]
Open the specified terminal (Argument) of the active DSS object.
- class py_dss_interface.models.CktElement.CktElement.CktElementS(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 CktElementS(int32_t Parameter, CStr Argument);
This interface returns a string (pAnsiChar) with the result of the query according to the value of the variable Parameter, which can be one of the following.
- cktelement_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.
- cktelement_energymeter() str [source]
Delivers the name of the EnergyMeter linked to the active circuit element.
- class py_dss_interface.models.CktElement.CktElement.CktElementV(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:
void CktElementV(int32_t Parameter, VARIANT *Argument);
This interface returns a variant (the format depends on the parameter) with the result of the query according to the value of the variable Parameter, which can be one of the following.
- cktelement_all_property_names() List[str] [source]
Delivers an array of strings with the names of all the properties of the active circuit element.
- cktelement_all_variables_names() List[str] [source]
Delivers a Variant array of strings listing all the published state variable names, if the active circuit element is a PCElement. Otherwise, null string.
- cktelement_all_variables_values() List[float] [source]
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.
- cktelement_cplx_seq_currents() List[float] [source]
Delivers an array of doubles with the complex of sequence currents for all terminals of the active circuit element.
- cktelement_cplx_seq_voltages() List[float] [source]
Delivers an array of doubles with the complex of sequence voltages for all terminals of the active circuit element.
- cktelement_currents() List[float] [source]
Delivers an array of doubles with the currents at terminals of the active circuit element.
- cktelement_currents_mag_ang() List[float] [source]
Delivers the currents in magnitude, angle format as a variant array of doubles of the active circuit element.
- cktelement_losses() List[float] [source]
Delivers an array of doubles with the Losses at terminals of the active circuit element.
- cktelement_node_order() List[int] [source]
Delivers a Variant array integers variant array of integer containing the node numbers (representing phases, for Example) for each conductor of each terminal.
- cktelement_phase_losses() List[float] [source]
Delivers an array of doubles with the Losses per phase at the terminals of the active circuit element.
- cktelement_powers() List[float] [source]
Delivers an array of doubles with the powers at terminals of the active circuit element.
- cktelement_read_bus_names() List[str] [source]
Delivers an array of strings with the names of all the buses connected to the active circuit element.
- cktelement_residuals() List[float] [source]
Delivers an array of doubles with the residual currents (magnitude, angle) in all the nodes of the active circuit element.
- cktelement_seq_currents() List[float] [source]
Delivers an array of doubles with the symmetrical component Currents per phase at the terminals of the active circuit element.
- cktelement_seq_powers() List[float] [source]
Delivers an array of doubles with the symmetrical component powers per phase at the terminals of the active circuit element.
- cktelement_seq_voltages() List[float] [source]
Delivers an array of doubles with the symmetrical component voltages per phase at the terminals of the active circuit element.
- cktelement_voltages() List[float] [source]
Delivers an array of doubles with the voltages at terminals of the active circuit element.
- cktelement_voltages_mag_ang() List[float] [source]
Delivers the voltages in magnitude, angle format as a variant array of doubles 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.
- class py_dss_interface.models.CMathLib.CMathLib.CMathLibF(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:
double CmathLibF(int32_t Parameter, double Argument1, double Argument2);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.CMathLib.CMathLib.CMathLibV(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:
void CmathLibV(int32_t Parameter, double Argument1, Argument2, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
- cmathlib_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
- class py_dss_interface.models.CtrlQueue.CtrlQueue.CtrlQueueI(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the CtrlQueue Class where the values are integers.
- The structure of the interface is as follows:
int32_t CtrlQueueI(int32_t Parameter, int32_t argument)
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- ctrlqueue_action_code() int [source]
Gets the code for the active action. Long integer code to tell the control device what to do.
- ctrlqueue_delete(argument: int) int [source]
Deletes a control action from the DSS control queue by referencing the handle of the action (Argument).
- ctrlqueue_device_handle() int [source]
Gets the handle (user defined) to device that must act on the pending action.
- ctrlqueue_do_all_queue() int [source]
Forces the execution of all control actions stored at the control queue. Returns 0.
- ctrlqueue_num_actions() int [source]
Gets the number of actions on the current action list (that have been popped off the control queue by CheckControlActions).
- ctrlqueue_pop_action() int [source]
Pops next action off the action list and makes it the active action. Returns zero if none.
- ctrlqueue_push() int [source]
Pushes a control action onto the DSS control queue by time, action code, and device handle. Returns Control Queue handle.
- class py_dss_interface.models.CtrlQueue.CtrlQueue.CtrlQueueV(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the CtrlQueue Class where the values are Variants.
- The structure of the interface is as follows:
void CtrlQueueV(int32_t Parameter, , VARIANT *Argument);
This interface returns a Variant, the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
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
- class py_dss_interface.models.DSSElement.DSSElement.DSSElementI(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the DSSElement Class where the values are integers.
- The structure of the interface is as follows:
int32_t DSSElementI(int32_t Parameter, int32_t argument) ;
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- class py_dss_interface.models.DSSElement.DSSElement.DSSElementS(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the DSSElement Class where the values are Strings.
- The structure of the interface is as follows:
CStr DSSElementS(int32_t Parameter, CStr argument) ;
This interface returns a string, the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- class py_dss_interface.models.DSSElement.DSSElement.DSSElementV(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the DSSElement Class where the values are Variants.
- The structure of the interface is as follows:
void DSSElementV(int32_t Parameter VARIANT *Argument) ;
This interface returns a Variant, the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
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
- class py_dss_interface.models.DSSExecutive.DSSExecutive.DSSExecutiveI(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 DSSExecutiveI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.DSSExecutive.DSSExecutive.DSSExecutiveS(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 DSSExecutiveS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- executive_command_help(arg: str) str [source]
Gets help string for i-th command (specified in the argument as string).
DSSInterface
Created by eniocc at 11/10/2020
- class py_dss_interface.models.DSSInterface.DSSInterface.DSSInterface(obj_dss)[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
- class py_dss_interface.models.DSSInterface.DSSInterface.DSSInterfaceI(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 DSSI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.DSSInterface.DSSInterface.DSSInterfaceS(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 DSSS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.DSSInterface.DSSInterface.DSSInterfaceV(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:
void DSSV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
DSSProgress
Created by eniocc at 11/10/2020
- class py_dss_interface.models.DSSProgress.DSSProgress.DSSProgress(obj_dss)[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
- class py_dss_interface.models.DSSProgress.DSSProgress.DSSProgressI(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 DSSProgressI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.DSSProgress.DSSProgress.DSSProgressS(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
TThis interface can be used to read/write certain properties of the active DSS object.
- The structure of the interface is as follows:
CStr DSSProgressS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
DSSProperties
Created by eniocc at 11/10/2020
- class py_dss_interface.models.DSSProperties.DSSProperties.DSSProperties(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
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.
- dssproperties_description(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.
- dssproperties_name(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.
- dssproperties_read_value(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.
- dssproperties_write_value(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
- class py_dss_interface.models.Fuses.Fuses.FusesF(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:
double FusesF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- fuses_read_delay() float [source]
Gets the fixed delay time in seconds added to the fuse blowing time determined by the TCC curve. Default is 0.
- fuses_read_rated_current() float [source]
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.
- class py_dss_interface.models.Fuses.Fuses.FusesI(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 FusesI(int32_t Parameter, int32_t Argument);
This interface returns an integer number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- fuses_count() int [source]
Returns the number of Fuses objects currently defined in the active circuit.
- fuses_is_blown() int [source]
Returns the current state of the fuses. TRUE (1) if any on any phase is blown. Else FALSE (0).
- fuses_read_idx() int [source]
Gets the active fuse by index into the list of fuses. 1 based: 1..count.
- fuses_read_switched_term() int [source]
Gets the terminal number of the terminal containing the switch controlled by the fuse.
- fuses_write_idx(argument: int) int [source]
Sets the active fuse by index into the list of fuses. 1 based: 1..count.
- class py_dss_interface.models.Fuses.Fuses.FusesS(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 FusesS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- fuses_read_switched_obj() str [source]
Gets the full name of the circuit element switch that the fuse controls. Defaults to the MonitoredObj.
- fuses_read_tcc_curve() str [source]
Gets the name of the TCCcurve object that determines fuse blowing.
- fuses_write_monitored_obj(argument: str) str [source]
Sets the name of the Monitored Object by the active fuse.
- class py_dss_interface.models.Fuses.Fuses.FusesV(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:
void FusesV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
- fuses_all_names() List[str] [source]
Gets the variant array of string containing names of all fuses in the circuit.
- fuses_read_normal()[source]
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.
- fuses_read_state()[source]
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.
Generators
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Generators.Generators.Generators(obj_dss)[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.
- class py_dss_interface.models.Generators.Generators.GeneratorsF(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:
double GeneratorsF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- generators_read_kvar() float [source]
Gets the kvar output for the active generator, kW is updated for current power factor.
- generators_read_kw() float [source]
Gets the kW output for the active generator, kvar is updated for current power factor.
- generators_read_pf() float [source]
Gets the power factor (pos. = producing vars). Updates kvar based on present kW value.
- generators_write_kv(argument: float) float [source]
Sets the voltage base for the active generator, kV.
- generators_write_kvar(argument: float) float [source]
Sets the kvar output for the active generator, kW is updated for current power factor.
- generators_write_kw(argument: float) float [source]
Sets the kW output for the active generator, kvar is updated for current power factor.
- class py_dss_interface.models.Generators.Generators.GeneratorsI(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 GeneratorsI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- generators_read_forced_on() int [source]
Returns 1 if the generator is forced ON regardless of other dispatch criteria; otherwise, returns 0.
- generators_read_idx() int [source]
Gets the active generator by Index into generators list. 1..Count.
- generators_read_model() int [source]
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.
- generators_write_forced_on(argument: int) int [source]
Allows to force ON regardless of other dispatch criteria. To force ON put 1 in the argument, otherwise put 0.
- generators_write_idx(argument: int) int [source]
Sets the active generator (argument) by Index into generators list. 1..Count.
- generators_write_model(argument: int) int [source]
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.
- class py_dss_interface.models.Generators.Generators.GeneratorsS(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 GeneratorsS(int32_t Parameter, CStr Argument);
This interface returns a string as a result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.Generators.Generators.GeneratorsV(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:
void GeneratorsV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant as a result of the query according to the value of the variable Parameter, which can be one of the following.
ISources
Created by eniocc at 11/10/2020
- class py_dss_interface.models.ISources.ISources.ISources(obj_dss)[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.
- class py_dss_interface.models.ISources.ISources.ISourcesF(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:
double IsourcesF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.ISources.ISources.ISourcesI(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 IsourcesI(int32_t Parameter, int32_t Argument);
This interface returns an integer number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.ISources.ISources.ISourcesS(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 IsourcesS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.ISources.ISources.ISourcesV(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:
void IsourcesV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
LineCodes
Created by eniocc at 11/10/2020
- class py_dss_interface.models.LineCodes.LineCodes.LineCodes(obj_dss)[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:
- class py_dss_interface.models.LineCodes.LineCodes.LineCodesF(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the LineCode Class where the values are doubles.
- The structure of the interface is as follows:
double LineCodesF(int32_t Parameter, double argument)
This interface returns a floating point number, the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- linecodes_read_c0() float [source]
Gets the Zero-sequence capacitance in ohms per unit length for the active LineCode.
- linecodes_read_c1() float [source]
Gets the Positive-sequence capacitance in nF per unit length for the active LineCode.
- linecodes_read_emerg_amps() float [source]
Gets the Emergency ampere rating for the active LineCode.
- linecodes_read_r0() float [source]
Gets the Zero-sequence resistance in ohms per unit length for the active LineCode.
- linecodes_read_r1() float [source]
Gets the Positive-sequence resistance in ohms per unit length for the active LineCode.
- linecodes_read_x0() float [source]
Gets the Zero-sequence reactance in ohms per unit length for the active LineCode.
- linecodes_read_x1() float [source]
Gets the Positive-sequence reactance in ohms per unit length for the active LineCode.
- linecodes_write_c0(argument: float) float [source]
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.
- linecodes_write_c1(argument: float) float [source]
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.
- linecodes_write_emerg_amps(argument: float) float [source]
Sets the Emergency ampere rating for the active LineCode. This value must be specified in the argument as a double.
- linecodes_write_norm_amps(argument: float) float [source]
Sets the normal ampere rating for the active LineCode. This value must be specified in the argument as a double.
- linecodes_write_r0(argument: float) float [source]
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.
- linecodes_write_r1(argument: float) float [source]
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.
- class py_dss_interface.models.LineCodes.LineCodes.LineCodesI(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface implements the Lines (ILineCodes) interface of OpenDSS by declaring 4 procedures for accessing the different properties included in this interface:
- linecodes_first() int [source]
Sets the first element active. Returns 0 if no lines. Otherwise, index of the line element.
- linecodes_is_z1z0() int [source]
Gets the flag (Boolean 1/0) denoting whether the impedance data were entered in symmetrical components.
- linecodes_next() int [source]
Sets the next element active. Returns 0 if no lines. Otherwise, index of the line element.
- linecodes_read_phases() int [source]
Delivers the number of phases of the active LineCode as an integer.
- linecodes_write_phases(argument) int [source]
Sets the number of phases of the active LineCode. The units must be specified as an integer in the argument.
- linecodes_write_units(argument: int) int [source]
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;
- class py_dss_interface.models.LineCodes.LineCodes.LineCodesS(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the LineCode Class where the values are Strings.
- The structure of the interface is as follows:
CStr LineCodesS(int32_t Parameter, CStr argument)
This interface returns a string, the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.;
- class py_dss_interface.models.LineCodes.LineCodes.LineCodesV(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the LineCode Class where the values are Variants.
- The structure of the interface is as follows:
void LineCodesV(int32_t Parameter, , VARIANT *Argument);
This interface returns a Variant, the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- linecodes_all_names() str [source]
Gets the capacitance matrix in ohms per unit length of the active LineCode.
- linecodes_read_cmatrix() str [source]
Gets the capacitance matrix in ohms per unit length of the active LineCode.
- linecodes_read_rmatrix() str [source]
Gets the resistance matrix in ohms per unit length of the active LineCode.
- linecodes_read_xmatrix() str [source]
Gets the reactance matrix in ohms per unit length of the active LineCode.
- linecodes_write_cmatrix(argument: str) None [source]
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. :param argument: must be a string like that [383.948 |0 383.948 |0 0 383.948 ]
- linecodes_write_rmatrix(argument: str) None [source]
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. :param argument: must be a string like that [0.791721 | 0.318476 0.781649 | 0.28345, 0.318476, 0.791721]
Lines
Created by eniocc at 11/10/2020
- class py_dss_interface.models.Lines.Lines.Lines(obj_dss)[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.
- class py_dss_interface.models.Lines.Lines.LinesF(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Lines Class where the values are doubles.
- The structure of the interface is as follows:
double LinesF(int32_t Parameter, double argument)
This interface returns a floating point number, the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- lines_read_length() float [source]
Gets the length of line section in units compatible with the LineCode definition.
- lines_read_rg() float [source]
Gets the earth return value used to compute line impedances at power frequency.
- lines_read_season_rating() float [source]
Returns the rating for the current season (in Amps) if the SeasonalRatings option is active.
- lines_read_xg() float [source]
Gets the earth return reactance value used to compute line impedances at power frequency.
- lines_write_c0(argument: float) float [source]
Sets the zero sequence capacitance, nanofarads per unit length.
- lines_write_c1(argument: float) float [source]
Sets the positive sequence capacitance, nanofarads per unit length.
- lines_write_emerg_amps(argument: float) float [source]
Sets the emergency (maximum) ampere rating of Line.
- lines_write_length(argument: float) float [source]
Sets the length of line section in units compatible with the LineCode definition.
- lines_write_r0(argument: float) float [source]
Sets the zero sequence resistance, ohm per unit length.
- lines_write_r1(argument: float) float [source]
Sets the positive sequence resistance, ohm per unit length.
- lines_write_rg(argument: float) float [source]
Sets the earth return value used to compute line impedances at power frequency.
- lines_write_x0(argument: float) float [source]
Sets the zero sequence reactance, ohm per unit length.
- class py_dss_interface.models.Lines.Lines.LinesI(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Lines Class where the values are integers.
- The structure of the interface is as follows:
int32_t LinesI(int32_t Parameter, int32_t argument)
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- lines_first() int [source]
Sets the first element active. Returns 0 if no lines. Otherwise, index of the line element.
- lines_next() int [source]
Sets the next element active. Returns 0 if no lines. Otherwise, index of the line element.
- lines_parent() int [source]
Gets the parents of the active Line to be the active Line. Return 0 if no parent or action fails.
- class py_dss_interface.models.Lines.Lines.LinesS(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Lines Class where the values are Strings.
- The structure of the interface is as follows:
CStr LinesS(int32_t Parameter, CStr argument)
This interface returns a string, the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- class py_dss_interface.models.Lines.Lines.LinesV(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Lines Class where the values are Variants.
- The structure of the interface is as follows:
void LinesV(int32_t Parameter, , VARIANT *Argument);
This interface returns a Variant, the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- lines_read_cmatrix() str [source]
Gets the capacitance matrix (full), nanofarads per unit length. Variant array of doubles.
- lines_read_rmatrix()[source]
Gets the resistance matrix (full), ohms per unit length. Variant array of doubles.
- lines_read_xmatrix() List[float] [source]
Gets the reactance matrix (full), ohms per unit length. Variant array of doubles.
- lines_write_cmatrix(argument) int [source]
Sets the capacitance matrix (full), nanofarads per unit length. Variant array of doubles.
- lines_write_rmatrix(argument) str [source]
Sets the resistance matrix (full), ohms per unit length. Variant array of doubles.
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.
- class py_dss_interface.models.Loads.Loads.LoadsF(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Loads Class where the values are floating point numbers (double).
- The structure of the interface is as follows:
double DSSLoadsF(int32_t Parameter,double Argument);
This interface returns a Double (IEEE 754 64 bits), the variable “parameter” (Integer) is used to specify the property of the class to be used and the variable “argument” (double) can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- loads_read_allocation_factor() float [source]
Allows to read the AllocationFactor property of the active load. The parameter argument can be filled with a 0.
- loads_read_c_factor() float [source]
Allows to read the CFactor property of the active load. The parameter argument can be filled with a 0.
- loads_read_cvr_vars() float [source]
Allows to read the CVRvars property of the active load. The parameter argument can be filled with a 0.
- loads_read_cvr_watts() float [source]
Allows to read the CVRWatts property of the active load. The parameter argument can be filled with a 0.
- loads_read_kv() float [source]
Allows to read the kV property of the active load. The parameter argument can be filled with a 0.
- loads_read_kva() float [source]
Allows to read the kva property of the active load. The parameter argument can be filled with a 0.
- loads_read_kvar() float [source]
Allows to read the kvar property of the active load. The parameter argument can be filled with a 0.
- loads_read_kw() float [source]
Allows to read the kW property of the active load. The parameter argument can be filled with a 0.
- loads_read_kwh() float [source]
Allows to read the kWh property of the active load. The parameter argument can be filled with a 0.
- loads_read_kwh_days() float [source]
Allows to read the kWhdays property of the active load. The parameter argument can be filled with a 0.
- loads_read_pct_mean() float [source]
Allows to read the PctMean property of the active load. The parameter argument can be filled with a 0.
- loads_read_pct_series_rl() float [source]
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.
- loads_read_pct_std_dev() float [source]
Allows to read the PctStdDev property of the active load. The parameter argument can be filled with a 0.
- loads_read_pf() float [source]
Allows to read the pf property of the active load. The parameter argument can be filled with a 0.
- loads_read_r_neut() float [source]
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.
- loads_read_rel_weight() float [source]
Allows to read the RelWeight (relative weighting factor) property of the active load. The parameter argument can be filled with a 0.
- loads_read_vmax_pu() float [source]
Allows to read the VMaxpu property of the active load. The parameter argument can be filled with a 0.
- loads_read_vmin_emerg() float [source]
Allows to read the VMinemerg property of the active load. The parameter argument can be filled with a 0.
- loads_read_vmin_norm() float [source]
Allows to read the VMinnorm property of the active load. The parameter argument can be filled with a 0.
- loads_read_vmin_pu() float [source]
Allows to read the VMinpu property of the active load. The parameter argument can be filled with a 0.
- loads_read_x_neut() float [source]
Allows to read the Xneut property of the active load. The parameter argument can be filled with a 0.
- loads_read_xfkva() float [source]
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.
- loads_write_allocation_factor(argument) float [source]
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.
- loads_write_c_factor(argument: float) float [source]
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.
- loads_write_cvr_vars(argument) float [source]
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.
- loads_write_cvr_watts(argument) float [source]
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.
- loads_write_kv(argument) float [source]
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.
- loads_write_kva(argument) float [source]
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.
- loads_write_kvar(argument) float [source]
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.
- loads_write_kw(argument) float [source]
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.
- loads_write_kwh(argument) float [source]
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.
- loads_write_kwh_days(argument) float [source]
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.
- loads_write_pct_mean(argument) float [source]
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.
- loads_write_pct_series_rl(argument) float [source]
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.
- loads_write_pct_std_dev(argument) float [source]
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.
- loads_write_pf(argument) float [source]
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.
- loads_write_r_neut(argument) float [source]
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.
- loads_write_rel_weight(argument) float [source]
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.
- loads_write_vmax_pu(argument) float [source]
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.
- loads_write_vmin_emerg(argument) float [source]
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.
- loads_write_vmin_norm(argument) float [source]
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.
- loads_write_vmin_pu(argument) float [source]
Allows to write the VMinpu property of the active load. The parameter argument must contain the new value in VMinpu for the desired active load. The return value will be equal to 0.
- loads_write_x_neut(argument) float [source]
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.
- loads_write_xfkva(argument) float [source]
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.
- class py_dss_interface.models.Loads.Loads.LoadsI(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Loads Class where the values are integers.
- The structure of the interface is as follows:
int32_t DSSLoads(int32_t Parameter, int32_t argument)
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- loads_count() int [source]
Returns the number of load elements within the active circuit. The parameter argument can be filled with a 0.
- loads_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.
- loads_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.
- loads_read_class() int [source]
Allows to read the code number used to separate loads by class or group. The parameter argument can be filled with a 0.
- loads_read_idx() int [source]
Allows to read the index of the active load. The parameter argument can be filled with a 0.
- loads_read_is_delta() int [source]
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.
- loads_read_model() int [source]
Allows to read the model of the active load. The parameter argument can be filled with a 0.
- loads_read_num_cust() int [source]
Allows to read the number of customer of the active load. The parameter argument can be filled with a 0.
- loads_read_status() int [source]
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.
- loads_write_class(argument) int [source]
Allows to read the code number used to separate loads by class or group. The parameter argument can be filled with a 0.
- loads_write_idx(argument) int [source]
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.
- loads_write_is_delta(argument) int [source]
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.
- loads_write_model(argument) int [source]
Allows to write the model of the active load using the parameter argument. This parameter will return a 0.
- class py_dss_interface.models.Loads.Loads.LoadsS(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Loads Class where the values are strings.
- The structure of the interface is as follows:
CStr DSSLoadsS(int32_t Parameter, CStr Argument);
This interface returns a string, the variable “parameter” (Integer) is used to specify the property of the class to be used and the variable “argument” (string) can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
- loads_read_cvr_curve() str [source]
Allows to read the CVRCurve property of the active load. The parameter argument can be filled with an empty string.
- loads_read_daily() str [source]
Allows to read the daily property of the active load. The parameter argument can be filled with an empty string.
- loads_read_duty() str [source]
Allows to read the duty property of the active load. The parameter argument can be filled with an empty string.
- loads_read_growth() str [source]
Allows to read the Growth property of the active load. The parameter argument can be filled with an empty string.
- loads_read_name() str [source]
Allows to read the Name property of the active load. The parameter argument can be filled with an empty string.
- loads_read_spectrum() str [source]
Allows to read the Spectrum property of the active load. The parameter argument can be filled with an empty string.
- loads_read_yearly() str [source]
Allows to read the Yearly property of the active load. The parameter argument can be filled with an empty string.
- loads_write_cvr_curve(argument) str [source]
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.
- loads_write_daily(argument) str [source]
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.
- loads_write_duty(argument) str [source]
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.
- loads_write_growth(argument) str [source]
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.
- loads_write_name(argument) str [source]
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.
- class py_dss_interface.models.Loads.Loads.LoadsV(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Loads Class where the values are variants (the value can have different formats).
- The structure of the interface is as follows:
void DSSLoadsV(int32_t Parameter, VARIANT *Argument);
This interface returns a string, the variable “parameter” (Integer) is used to specify the property of the class to be used and the variable “argument” (Variant) is used to return the variant structure.
- loads_all_names()[source]
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.
- loads_read_zipv()[source]
Allows to read the array of 7 elements (doubles) for ZIP property of the active Load object.
- loads_write_zipv(argument)[source]
Allows to write the array of 7 elements (doubles) for ZIP property of the active Load object. :param argument: Array of 7 coefficients:
First 3 are ZIP weighting factors for real power (should sum to 1) Next 3 are ZIP weighting factors for reactive power (should sum to 1) Last 1 is cut-off voltage in p.u. of base kV; load is 0 below this cut-off No defaults; all coefficients must be specified if using model=8.
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: .
- class py_dss_interface.models.LoadShapes.LoadShapes.LoadShapesF(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:
double LoadShapeF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- loadshapes_read_p_base() float [source]
Gets the base for normalizing P curve. If left at zero, the peak value is used.
- loadshapes_read_q_base() float [source]
Gets the base for normalizing Q curve. If left at zero, the peak value is used.
- loadshapes_write_hr_interval(argument: float) float [source]
Sets the fixed interval time value, hours.
- loadshapes_write_min_interval(argument: float) float [source]
Sets the fixed interval time value, in minutes.
- loadshapes_write_p_base(argument: float) float [source]
Sets the base for normalizing P curve. If left at zero, the peak value is used.
- class py_dss_interface.models.LoadShapes.LoadShapes.LoadShapesI(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 LoadShapeI(int32_t Parameter, int32_t Argument);
This interface returns an integer number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- loadshapes_count() int [source]
Returns the number of LoadShape objects currently defined in LoadShape collection.
- loadshapes_first() int [source]
sets the first loadshape active and return integer index of the loadshape. Returns 0 if no more.
- loadshapes_next() int [source]
Sets the next loadshape active and return integer index of the loadshape. Returns 0 if no more.
- loadshapes_normalize() int [source]
Normalizes the P and Q curves based on either Pbase, Qbase or simply the peak value of the curve.
- class py_dss_interface.models.LoadShapes.LoadShapes.LoadShapesS(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 LoadShapeS(int32_t Parameter, CStr Argument);
This interface returns string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.LoadShapes.LoadShapes.LoadShapesV(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:
void LoadShapeV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
- loadshapes_all_names()[source]
Gets a variant array of strings containing names of all LoadShape objects currently defined.
- loadshapes_read_p_mult()[source]
Gets a variant array of doubles for the P multiplier in the LoadShape.
- loadshapes_read_q_mult()[source]
Gets a variant array of doubles for the Q multiplier in the LoadShape.
- loadshapes_read_time_array()[source]
Gets a time array in hours corresponding to P and Q multipliers when the Interval = 0.
- loadshapes_write_p_mult(argument)[source]
Sets a variant array of doubles for the P multiplier in the LoadShape.
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.
- class py_dss_interface.models.Meters.Meters.MetersF(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:
double MetersF(int32_t Parameter, double Argument);
This interface returns a floating point number (64 bits) according to the number sent in the variable “parameter”. The parameter can be one of the following.
- meters_avg_repair_time() float [source]
Returns the average Repair Time in this Section of the meter zone.
- meters_cust_interrupts() float [source]
Returns the total customer interruptions for this meter zone based on reliability calcs.
- meters_fault_rate_x_repair_hrs() float [source]
Returns the sum of Fault Rate Time Repair Hours in this section of the meter zone.
- meters_saidi() float [source]
Returns the SAIDI for this meter zone. Execute DoreliabilityCalc first.
- meters_saifi() float [source]
Returns SAIFI for this meter’s zone. Execute reliability calc method first.
- class py_dss_interface.models.Meters.Meters.MetersI(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 MetersI(int32_t Parameter, int32_t Argument);
This interface returns an integer according to the number sent in the variable “parameter”. The parameter can be one of the following.
- meters_close_all_di_files() int [source]
Closes all Demand Interval (DI) files. Necessary at the end of a run.
- meters_count_branches() int [source]
Returns the number of branches in active Energy Meter zone (same as sequencelist size).
- meters_count_end_elements() int [source]
Returns the number of zone end elements in the active meter zone.
- meters_di_files_are_open() int [source]
Returns a global flag (1=true, 0=false) to indicate if Demand Interval (DI) files have been properly opened.
- meters_do_reliability_calc() int [source]
Calculates SAIFI, etc. if the Argument is equal to 1 this parameter will assume restoration, otherwise it will not.
- meters_num_section_branches() int [source]
Returns the number of branches (lines) in the active section.
- meters_ocp_device_type() int [source]
Returns the type of OCP device: {1=fuse | 2+ recloser | 3= relay}.
- meters_read_metered_terminal() int [source]
Returns the number of metered terminal by the active Energy Meter.
- meters_read_sequence_index() int [source]
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.
- meters_sample_all() int [source]
Causes all Energy Meters to take a sample of the present state. Returns 0.
- meters_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.
- meters_save_all() int [source]
Save all Energy Meter buffers to their respective file streams. Returns 0.
- meters_sect_seq_idx() int [source]
Returns the Sequence Index of the branch at the head of this section.
- meters_set_active_section(argument) int [source]
Sets the designated section (argument) if the index is valid.
- meters_total_customers() int [source]
Returns the total number of customers in this zone (down line from the Energy Meter).
- class py_dss_interface.models.Meters.Meters.MetersS(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 MetersS(int32_t Parameter, CStr Argument);
This interface returns a string according to the number sent in the variable “parameter”. The parameter can be one of the following.
- meters_read_metered_element()[source]
Returns the name of the metered element (considering the active Energy Meter).
- class py_dss_interface.models.Meters.Meters.MetersV(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:
void MetersV(int32_t Parameter, VARIANT *Argument);
This interface returns a variant according to the number sent in the variable “parameter”. The parameter can be one of the following.
- meters_all_branches_in_zone()[source]
Returns a wide string list of all branches in zone of the active Energy Meter object.
- meters_read_alloc_factors()[source]
Returns an array of doubles: allocation factors for the active Meter.
- meters_read_calc_current()[source]
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.
- meters_register_values()[source]
Returns an array of values contained in the Meter registers for the active Meter.
- meters_write_alloc_factors(argument)[source]
Receives an array of doubles to set the phase allocation factors for the active Meter.
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.
- class py_dss_interface.models.Monitors.Monitors.MonitorsI(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 MonitorsI(int32_t Parameter, int32_t Argument);
This interface returns an integer according to the number sent in the variable “parameter”. The parameter can be one of the following.
- monitors_process() int [source]
Post-process monitor examples taken so far, e.g., Pst for mode = 4.
- monitors_sample_all() int [source]
Causes all Monitors to take a sample of the present state. Returns 0.
- monitors_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.
- monitors_save_all() int [source]
Save all Monitor buffers to their respective file streams. Returns 0.
- monitors_write_mode(argument) int [source]
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.
- class py_dss_interface.models.Monitors.Monitors.MonitorsS(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 MonitorsS(int32_t Parameter, CStr Argument);
This interface returns a string according to the number sent in the variable “parameter”. The parameter can be one of the following.
- monitors_read_element() str [source]
Returns the full name of element being monitored by the active Monitor.
- class py_dss_interface.models.Monitors.Monitors.MonitorsV(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:
void MonitorsV(int32_t Parameter, VARIANT *Argument);
This interface returns a variant according to the number sent in the variable “parameter”. The parameter can be one of the following.
- monitors_byte_stream()[source]
Returns a byte array containing monitor stream values. Make sure a “save” is done first (standard solution modes do this automatically).
- monitors_channel(argument) str [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.
- monitors_dbl_freq()[source]
Returns a variant array of doubles containing time values for harmonics mode solutions; empty for time mode solutions (use dblHour).
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.
- class py_dss_interface.models.Parallel.Parallel.ParallelI(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface allows to control parameters of the parallel computing suite of OpenDSS-PM where its value can be specified as an integer number.
- The structure of the interface is as follows:
int32_t ParalleI(int32_t Parameter, int32_t Argument);
This interface returns an integer number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- parallel_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.
- parallel_num_cores() int [source]
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/.
- parallel_read_active_parallel() int [source]
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.
- parallel_read_actor_cpu() int [source]
Gets the ID of the CPU assigned for the execution of the active actor.
- parallel_read_concatenate_reportsl() int [source]
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.
- parallel_wait() int [source]
Waits until all the actors are free and ready to receive a new command.
- parallel_write_active_actor(argument) int [source]
Sets the ID of the active actor; this number cannot be higher than the number of existing actors.
- parallel_write_active_parallel(argument) int [source]
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.
- parallel_write_actor_cpu(argument) int [source]
Sets the CPU for the execution of the active actor.
- parallel_write_concatenate_reportsl(argument) int [source]
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.
- class py_dss_interface.models.Parallel.Parallel.ParallelV(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:
void ParallelV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
- parallel_actor_progress()[source]
Returns an array of integers containing the progress in percentage for each active actor.
- parallel_actor_status()[source]
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.
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.
- parser_matrix()[source]
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.
- class py_dss_interface.models.Parser.Parser.ParserF(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:
double ParserF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.Parser.Parser.ParserI(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 ParserI(int32_t Parameter, int32_t Argument);
This interface returns an integer number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.Parser.Parser.ParserS(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 ParserS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- parser_next_param()[source]
Gets next token and return tag name (before = sign) if any. See Autoincrement.
- parser_read_begin_quote()[source]
Gets the string containing the characters for quoting in OpenDSS scripts. Matching pairs defined in EndQuote. Default is “([{.
- parser_read_cmd_string()[source]
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.
- parser_read_delimiters()[source]
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.
- parser_read_end_quote()[source]
Gets the string containing the characters, in order, that match the beginning quote characters in BeginQuote. Default is “)]}.
- parser_read_white_space()[source]
Gets the characters used for White space in the command string. Default in blank and Tab.
- parser_write_begin_quote(argument)[source]
Sets the string containing the characters for quoting in OpenDSS scripts. Matching pairs defined in EndQuote. Default is “([{.
- parser_write_cmd_string(argument)[source]
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.
- parser_write_delimiters(argument)[source]
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.
- class py_dss_interface.models.Parser.Parser.ParserV(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:
void ParserV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
- parser_matrix()[source]
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.
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.
- class py_dss_interface.models.PDElements.PDElements.PDElementsF(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:
double PDElementsF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- pdelements_accumulated_l() float [source]
Gets the accumulated failure rate for this branch on down line.
- pdelements_lambda() float [source]
Gets the failure rate for this branch. Faults per year including length of line.
- pdelements_read_fault_rate() float [source]
Gets the number of failures per year. For LINE elements: Number of failures per unit length per year.
- pdelements_read_pct_permanent() float [source]
Gets the percent of faults that are permanent (require repair). Otherwise, fault is assumed to be transient/temporary.
- pdelements_repair_time() float [source]
Gets the average time to repair a permanent fault on this branch, hours.
- pdelements_total_miles() float [source]
Gets the total miles of line from this element to the end of the zone. For recloser siting algorithm.
- class py_dss_interface.models.PDElements.PDElements.PDElementsI(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 PDElementsI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- pdelements_first() int [source]
Sets the first enabled PD element to be the active element. Returns 0 if none found.
- pdelements_from_terminal() int [source]
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.
- pdelements_is_shunt() int [source]
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.
- pdelements_next() int [source]
Sets the next enabled PD element to be the active element. Returns 0 if none found.
- pdelements_parent_pd_element() int [source]
Gets the parent PD element to be the active circuit element. Returns 0 if no more elements upline.
- class py_dss_interface.models.PDElements.PDElements.PDElementsS(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 PDElementsF(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
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.
- class py_dss_interface.models.PVSystems.PVSystems.PVSystemsF(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:
double PVSystemsF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- pvsystems_read_irradiance() float [source]
Gets the present value of the Irradiance property in W/sq-m.
- class py_dss_interface.models.PVSystems.PVSystems.PVSystemsI(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 PVSystemsI(int32_t Parameter, int32_t Argument);
This interface returns an integer number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.PVSystems.PVSystems.PVSystemsS(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 PVSystemsS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.PVSystems.PVSystems.PVSystemsV(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:
void PVSystemsV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
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.
- class py_dss_interface.models.Reclosers.Reclosers.ReclosersF(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:
double ReclosersF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- reclosers_read_ground_inst() float [source]
Gets the ground (3I0) instantaneous trip setting - curve multiplier or actual amps.
- reclosers_read_phase_inst() float [source]
Gets the phase instantaneous curve multiplier or actual amps.
- reclosers_write_ground_trip(argument) float [source]
Sets the ground (3I0) trip multiplier or actual amps.
- class py_dss_interface.models.Reclosers.Reclosers.ReclosersI(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 ReclosersI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- reclosers_close() int [source]
Close the switched object controlled by the recloser. Resets recloser to first operation.
- reclosers_first() int [source]
Sets first recloser to be active Circuit Element. Returns 0 if none.
- reclosers_read_idx() int [source]
Gets the active recloser by index into the recloser list. 1..Count.
- reclosers_read_monitored_term() int [source]
Gets the terminal number of Monitored Object for the Recloser.
- reclosers_read_switched_term() int [source]
Gets the terminal of the controlled device being switched by the Recloser.
- reclosers_write_idx(argument) int [source]
Sets the active recloser by index into the recloser list. 1..Count.
- class py_dss_interface.models.Reclosers.Reclosers.ReclosersS(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 ReclosersS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- reclosers_read_switched_obj()[source]
Gets the full name of the circuit element that is being switched by this Recloser.
- class py_dss_interface.models.Reclosers.Reclosers.ReclosersV(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:
void ReclosersV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
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.
- class py_dss_interface.models.RegControls.RegControls.RegControlsF(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:
double RegControlsF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- regcontrols_read_ct_primary() float [source]
Gets the CT primary ampere rating (secondary is 0.2 amperes).
- regcontrols_read_delay() float [source]
Gets the time delay [s] after arming before the first tap change. Control may reset before actually changing taps.
- regcontrols_read_forward_band() float [source]
Gets the regulation bandwidth in forward direction, centered on Vreg.
- regcontrols_read_forward_vreg() float [source]
Gets the target voltage in the forward direction, on PT secondary base.
- regcontrols_read_reverse_band() float [source]
Gets the bandwidth in reverse direction, centered on reverse Vreg.
- regcontrols_read_reverse_vreg() float [source]
Gets the target voltage in the reverse direction, on PT secondary base.
- regcontrols_read_tap_delay() float [source]
Gets the time delay [s] for subsequent tap changes in a set. Control may reset before actually changing taps.
- regcontrols_read_voltage_limit() float [source]
Gets the first house voltage limit on PT secondary base. Setting to 0 disables this function.
- regcontrols_write_ct_primary(argument) float [source]
Sets the CT primary ampere rating (secondary is 0.2 amperes).
- regcontrols_write_delay(argument) float [source]
Sets the time delay [s] after arming before the first tap change. Control may reset before actually changing taps.
- regcontrols_write_forward_band(argument) float [source]
Sets the regulation bandwidth in forward direction, centered on Vreg.
- regcontrols_write_forward_vreg(argument) float [source]
Sets the target voltage in the forward direction, on PT secondary base.
- regcontrols_write_pt_ratio(argument) float [source]
Sets the PT ratio for voltage control settings.
- regcontrols_write_reverse_band(argument) float [source]
Sets the bandwidth in reverse direction, centered on reverse Vreg.
- regcontrols_write_reverse_vreg(argument) float [source]
Sets the target voltage in the reverse direction, on PT secondary base.
- class py_dss_interface.models.RegControls.RegControls.RegControlsI(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 RegControlsI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- regcontrols_read_is_inverse_time() int [source]
Gets the inverse time feature. Time delay is inversely adjusted, proportional to the amount of voltage outside the regulator band.
- regcontrols_read_is_reversible() int [source]
Gets the setting in the reverse direction, usually not applicable to substation transformers.
- regcontrols_read_max_tap_change() int [source]
Gets the maximum tap change per iteration in STATIC solution mode. 1 is more realistic, 16 is the default for faster solution.
- regcontrols_write_is_inverse_time(argument) int [source]
Sets the inverse time feature. Time delay is inversely adjusted, proportional to the amount of voltage outside the regulator band.
- regcontrols_write_is_reversible(argument) int [source]
Sets the different settings for the reverse direction (see Manual for details), usually not applicable to substation transformers.
- regcontrols_write_max_tap_change(argument) int [source]
Sets the maximum tap change per iteration in STATIC solution mode. 1 is more realistic, 16 is the default for faster solution.
- class py_dss_interface.models.RegControls.RegControls.RegControlsS(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 RegControlsS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- regcontrols_read_monitored_bus()[source]
Gets the name of the remote regulated bus, in lieu of LDC settings.
- class py_dss_interface.models.RegControls.RegControls.RegControlsV(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:
void RegControlsV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
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.
- class py_dss_interface.models.Relays.Relays.RelaysI(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 RelaysI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- relays_read_monitored_term() int [source]
Gets the number of terminal of monitored element that this relay is monitoring.
- relays_read_switched_term() int [source]
Gets the number of terminal of the switched object that will be opened when the relay trips.
- relays_write_idx(argument) int [source]
Sets the active relay by index into the Relay list. 1..Count.
- class py_dss_interface.models.Relays.Relays.RelaysS(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 RelaysS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- relays_read_switched_obj()[source]
Gets the full name of element that will switched when relay trips.
- class py_dss_interface.models.Relays.Relays.RelaysV(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:
void RelaysV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
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.
- class py_dss_interface.models.Sensors.Sensors.SensorsF(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:
double SensorsF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- sensors_read_kv_base() float [source]
Gets the voltage base for the sensor measurements. LL for 2 and 3 - phase sensors, LN for 1-phase sensors.
- sensors_read_pct_error() float [source]
Gets the assumed percent error in the Sensor measurement. Default is 1.
- sensors_read_weight() float [source]
Gets the weighting factor for this sensor measurement with respect to the other sensors. Default is 1.
- sensors_write_kv_base(argument) float [source]
Sets the voltage base for the sensor measurements. LL for 2 and 3 - phase sensors, LN for 1-phase sensors.
- class py_dss_interface.models.Sensors.Sensors.SensorsI(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 SensorsI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- sensors_read_is_delta() int [source]
Returns 1 if the sensor is connected in delta; otherwise, returns 0.
- sensors_read_metered_terminal() int [source]
Gets the number of the measured terminal in the measured element.
- sensors_read_reverse_delta() int [source]
Returns 1 if voltage measurements are 1-3, 3-2, 2-1; otherwise 0.
- sensors_write_is_delta(argument) int [source]
Allows to set 1 if the sensor is connected in delta; otherwise, set 0 (argument).
- class py_dss_interface.models.Sensors.Sensors.SensorsS(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 SensorsS(int32_t Parameter, CStr Argument); This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.Sensors.Sensors.SensorsV(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:
void SensorsV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
- sensors_read_currents()[source]
Gets an array of doubles for the line current measurements; don’t use with KWS and KVARS.
- sensors_read_kvars()[source]
Gets an array of doubles for Q measurements; overwrites currents with a new estimate using KWS.
- sensors_read_kws()[source]
Gets an array of doubles for P measurements; overwrites currents with a new estimate using KVARS.
- sensors_write_currents(argument)[source]
Sets an array of doubles for the line current measurements; don’t use with KWS and KVARS.
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.
- class py_dss_interface.models.Settings.Settings.SettingsF(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:
double SettingsF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- settings_allocation_factors() float [source]
Sets all load allocation factors for all loads defined by XFKVA property to this value.
- settings_read_emerg_vmax_pu() float [source]
Gets the per unit maximum voltage for Emergency conditions.
- settings_read_emerg_vmin_pu() float [source]
Gets the per unit minimum voltage for Emergency conditions.
- settings_read_loss_weight() float [source]
Gets the weighting factor applied to Loss register values.
- settings_read_norm_vmax_pu() float [source]
Gets the per unit maximum voltage for Normal conditions.
- settings_read_norm_vmin_pu() float [source]
Gets the per unit minimum voltage for Normal conditions.
- settings_write_emerg_vmax_pu(argument) float [source]
Sets the per unit maximum voltage for Emergency conditions.
- settings_write_emerg_vmin_pu(argument) float [source]
Sets the per unit minimum voltage for Emergency conditions.
- settings_write_loss_weight(argument) float [source]
Sets the weighting factor applied to Loss register values.
- settings_write_norm_vmax_pu(argument) float [source]
Sets the per unit maximum voltage for Normal conditions.
- class py_dss_interface.models.Settings.Settings.SettingsI(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 SettingsI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- settings_read_allow_duplicates() int [source]
Gets if OpenDSS allows duplicate names of objects: {1 allow, 0 not allow}.
- settings_read_ckt_model() int [source]
Gets {dssMultiphase* | dssPositiveSeq} Indicate if the circuit model is positive sequence.
- settings_read_trapezoidal() int [source]
Gets {True (1) | False (0)} value of trapezoidal integration flag in Energy Meters.
- settings_read_zone_lock() int [source]
Gets the status of Lock zones on energy meters to prevent rebuilding if a circuit change occurs: {1= true, 0= False}.
- settings_write_allow_duplicates(argument) int [source]
Sets if OpenDSS allows duplicate names of objects: {1 allow, 0 not allow}.
- settings_write_ckt_model(argument) int [source]
Sets {dssMultiphase* | dssPositiveSeq} Indicate if the circuit model is positive sequence.
- class py_dss_interface.models.Settings.Settings.SettingsS(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 SettingsS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- settings_read_auto_bus_list()[source]
Gets the list of Buses or (File=xxxxx) syntax for the AutoAdd solution mode.
- settings_read_price_curve()[source]
Gets the name of LoadShape object that serves as the source of price signal data for yearly simulations, etc.
- class py_dss_interface.models.Settings.Settings.SettingsV(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:
void SettingsV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
- settings_read_loss_regs()[source]
Gets the array of Integers defining Energy Meter registers to use for computing Losses.
- settings_read_ue_regs()[source]
Gets the array of Integers defining Energy Meter registers to use for computing UE.
- settings_read_voltage_bases()[source]
Gets the array of doubles defining the legal voltage bases in kV L-L.
- settings_write_loss_regs(argument)[source]
Sets the array of Integers defining Energy Meter registers to use for computing Losses.
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.
- class py_dss_interface.models.Solution.Solution.SolutionF(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:
double SolutionF(int32_t Parameter, double Argument);
This interface returns a floating point number according to the number sent in the variable “parameter”. The parameter can be one of the following.
- solution_process_time() float [source]
Retrieves the time required (microseconds) to perform the latest solution time step, this time does not include the time required for sampling meters/monitors.
- solution_process_time_step() float [source]
Retrieves the time required (microseconds) to perform the latest solution time step including the time required for sampling meters/monitors.
- solution_read_gen_mult() float [source]
Returns the default multiplier applied to generators (like LoadMult).
- solution_read_load_mult() float [source]
Returns the default load multiplier applied to all non-fixed loads.
- solution_read_total_time() float [source]
Retrieves the accumulated time required (microseconds) to perform the simulation.
- solution_write_cap_kvar(argument) float [source]
Sets the capacitor kvar for adding in AutoAdd mode.
- solution_write_dbl_hour(argument) float [source]
Sets the hour as a double, including fractional part.
- solution_write_gen_mult(argument) float [source]
Sets the default multiplier applied to generators (like LoadMult).
- solution_write_load_mult(argument) float [source]
Sets the default load multiplier applied to all non-fixed loads.
- class py_dss_interface.models.Solution.Solution.SolutionI(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 SolutionI(int32_t Parameter, int32_t Argument);
This interface returns an integer according to the number sent in the variable “parameter”. The parameter can be one of the following.
- solution_build_y_matrix() int [source]
Forces building of the System Y matrix according to the argument: {1= series elements only | 2= Whole Y matrix}.
- solution_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.
- solution_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.
- solution_check_controls() int [source]
Performs the normal process for sampling and executing Control Actions and Fault Status and rebuilds Y if necessary.
- solution_check_fault_status() int [source]
Executes status check on all fault objects defined in the circuit. Returns 0.
- solution_do_control_actions() int [source]
Pops control actions off the control queue and dispatches to the proper control element.
- solution_finish_time_step() int [source]
Calls cleanup, sample monitors, and increment time at end of time step.
- solution_init_snap() int [source]
Initializes some variables for snap shot power flow. SolveSnap does this automatically.
- solution_most_iterations_done() int [source]
Returns the max number of iterations required to converge at any control iteration of the most recent solution..
- solution_read_add_type() int [source]
Returns the type of device to add in AutoAdd Mode: {dssGen (default)|dssCap}.
- solution_read_algorithm() int [source]
Returns the base solution algorithm: {dssNormalSolve | dssNewtonSolve}.
- solution_read_control_actions_done() int [source]
Indicates that the control actions are done: {1 done, 0 not done}.
- solution_read_control_iterations() int [source]
Returns the current value of the control iteration counter.
- solution_read_control_mode() int [source]
Returns the mode for control devices: {dssStatic (default) | dssEvent | dssTime}.
- solution_read_converged() int [source]
Indicates whether the circuit solution converged (1 converged | 0 not converged).
- solution_read_load_model() int [source]
Returns the Load Model: {dssPowerFlow (default)|dssAdmittance}.
- solution_read_max_control_iterations() int [source]
Returns the maximum allowable control iterations.
- solution_read_max_iterations() int [source]
Returns the Maximum number of iterations used to solve the circuit.
- solution_read_number() int [source]
Returns the number of solutions to perform for MonteCarlo and time series simulations.
- solution_read_random() int [source]
Returns the randomization mode for random variables “Gaussian” o “Uniform”.
- solution_sample_control_devices() int [source]
Executes a sampling of all intrinsic control devices, which push control actions into the control queue.
- solution_sample_do_control_actions() int [source]
Sample controls and then process the control queue for present control mode and dispatch control actions. Returns 0.
- solution_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.
- solution_solve_direct() int [source]
Executes a direct solution from the system Y matrix, ignoring compensation currents of loads, generators (includes Yprim only).
- solution_solve_no_control() int [source]
Is similar to SolveSnap except no control actions are checked or executed.
- solution_solve_plus_control() int [source]
Executes a power flow solution (SolveNoControl) plus executes a CheckControlActions that executes any pending control actions.
- solution_solve_power_flow() int [source]
Solves using present power flow method. Iterative solution rather than direct solution.
- solution_system_y_changed() int [source]
Indicates if elements of the System Y have been changed by recent activity. If changed returns 1; otherwise 0.
- solution_total_iterations() int [source]
Returns the total iterations including control iterations for most recent solution.
- solution_write_add_type(argument) int [source]
Modifies the type of device to add in AutoAdd Mode: {dssGen (default)|dssCap}.
- solution_write_algorithm(argument) int [source]
Modifies the base solution algorithm: {dssNormalSolve | dssNewtonSolve}.
- solution_write_control_actions_done(argument) int [source]
Modifies the flag to indicate that the control actions are done: {1 done, 0 not done}.
- solution_write_control_iterations(argument) int [source]
Modifies the current value of the control iteration counter.
- solution_write_control_mode(argument) int [source]
Modifies the mode for control devices: {dssStatic (default) | dssEvent | dssTime}.
- solution_write_converged(argument) int [source]
Modifies the converged flag (1 converged | 0 not converged).
- solution_write_load_model(argument) int [source]
Modifies the Load Model: {dssPowerFlow (default)|dssAdmittance}.
- solution_write_max_control_iterations(argument) int [source]
Modifies the maximum allowable control iterations.
- solution_write_max_iterations(argument) int [source]
Modifies the Maximum number of iterations used to solve the circuit.
- solution_write_number(argument) int [source]
Modifies the number of solutions to perform for MonteCarlo and time series simulations.
- class py_dss_interface.models.Solution.Solution.SolutionS(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 SolutionS(int32_t Parameter, CStr Argument);
This interface returns a string according to the number sent in the variable “parameter”. The parameter can be one of the following.
- solution_read_default_daily()[source]
Returns the default daily load shape (defaults to “Default”).
- solution_read_default_yearly()[source]
Returns the default yearly load shape (defaults to “Default”).
- solution_write_default_daily(argument)[source]
Sets the default daily load shape (defaults to “Default”).
- class py_dss_interface.models.Solution.Solution.SolutionV(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:
void SolutionV(int32_t Parameter, VARIANT *Argument);
This interface returns a variant according to the number sent in the variable “parameter”. The parameter can be one of the following.
- solution_bus_levels()[source]
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.
- solution_inc_matrix_cols()[source]
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.
- solution_inc_matrix_rows()[source]
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..
- solution_laplacian()[source]
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)..
- solution_nc_matrix()[source]
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..
SwtControls
Created by eniocc at 11/10/2020
- class py_dss_interface.models.SwtControls.SwtControls.SwtControlsF(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:
double SwtControlsF(int32_t Parameter, double Argument);
This interface returns a floating point number (64 bits) with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.SwtControls.SwtControls.SwtControlsI(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 SwtControlsI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- swtcontrols_read_action() int [source]
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.
- swtcontrols_read_switched_term() int [source]
Gets the terminal number where the switch is located on the SwitchedObj.
- swtcontrols_write_action(argument) int [source]
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).
- class py_dss_interface.models.SwtControls.SwtControls.SwtControlsS(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 SwtControlsS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.SwtControls.SwtControls.SwtControlsV(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:
void SwtControlsV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
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.
- class py_dss_interface.models.Topology.Topology.TopologyI(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 TopologyI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- topology_backward_branch() int [source]
Moves back toward the source, return index of new active branch or 0 if no more.
- topology_first_load() int [source]
Sets as active load the first load at the active branch, return index or 0 if none.
- topology_forward_branch() int [source]
Moves forward in the tree, return index of new active branch or 0 if no more.
- topology_next_load() int [source]
Sets as active load the next load at the active branch, return index or 0 if none.
- class py_dss_interface.models.Topology.Topology.TopologyS(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 TopologyS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.Topology.Topology.TopologyV(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:
void TopologyV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
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.
- class py_dss_interface.models.Transformers.Transformers.TransformersF(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Transformers Class where the values are doubles.
- The structure of the interface is as follows:
double TransformersF(int32_t Parameter, double argument) ;
This interface returns a floating point number (64 bits), the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- transformers_read_kv() float [source]
Gets the active winding kV rating. Phase-phase for 2 or 3 phases, actual winding kV 1 phase transformer.
- transformers_read_kva() float [source]
Gets the active winding kVA rating. On winding 1, this also determines normal and emergency current ratings for all windings.
- transformers_read_r_neut() float [source]
Gets the active winding neutral resistance [ohms] for wye connections. Set less than zero ungrounded wye.
- transformers_read_x_neut() float [source]
Gets the active winding neutral reactance [ohms] for wye connections.
- transformers_read_xhl() float [source]
Gets the percent reactance between windings 1 and 2, on winding 1 kVA base. Use for 2 winding or 3 winding transformers.
- transformers_read_xht() float [source]
Gets the percent reactance between windings 1 and 3, on winding 1 kVA base. Use for 3 winding transformers only.
- transformers_read_xlt() float [source]
Gets he percent reactance between windings 2 and 3, on winding 1 kVA base. Use for 3 winding transformers only.
- transformers_write_kv(argument) float [source]
Sets the active winding kV rating. Phase-phase for 2 or 3 phases, actual winding kV 1 phase transformer.
- transformers_write_kva(argument) float [source]
Sets the active winding kVA rating. On winding 1, this also determines normal and emergency current ratings for all windings.
- transformers_write_max_tap(argument) float [source]
Sets the active winding maximum tap in per-unit.
- transformers_write_min_tap(argument) float [source]
Sets the active winding minimum tap in per-unit.
- transformers_write_r_neut(argument) float [source]
Sets the active winding neutral resistance [ohms] for wye connections. Set less than zero ungrounded wye.
- transformers_write_x_neut(argument) float [source]
Sets the active winding neutral reactance [ohms] for wye connections.
- transformers_write_xhl(argument) float [source]
Sets the percent reactance between windings 1 and 2, on winding 1 kVA base. Use for 2 winding or 3 winding transformers.
- class py_dss_interface.models.Transformers.Transformers.TransformersI(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Transformers Class where the values are integers.
- The structure of the interface is as follows:
int32_t TransformersI(int32_t Parameter, int32_t argument) ;
This interface returns an integer (signed 32 bits), the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- transformers_read_is_delta() int [source]
Gets the information about if the active winding is delta (1) or wye (0) connection.
- transformers_read_num_taps() int [source]
Gets the active winding number of tap steps between MinTap and MaxTap.
- transformers_read_num_windings() int [source]
Gets the number of windings on this transformer. Allocates memory; set or change this property first.
- transformers_read_wdg() int [source]
Gets the active winding number from 1..NumWindings. Update this before reading or setting a sequence of winding properties (R, Tap, kV, kVA, etc.).
- transformers_write_is_delta(argument) int [source]
Sets the information about if the active winding is delta (1) or wye (0) connection.
- transformers_write_num_taps(argument) int [source]
Sets the active winding number of tap steps between MinTap and MaxTap.
- class py_dss_interface.models.Transformers.Transformers.TransformersS(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Transformers Class where the values are Strings.
- The structure of the interface is as follows:
CStr TransformersS(int32_t Parameter, CStr argument) ;
This interface returns a string, the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- transformers_read_xfmr_code()[source]
Gets the name of an XfrmCode that supplies electrical parameters for this transformer.
- class py_dss_interface.models.Transformers.Transformers.TransformersV(obj_dss)[source]
Bases:
py_dss_interface.models.Base.Base
This interface can be used to read/modify the properties of the Transformers Class where the values are Variants.
- The structure of the interface is as follows:
void TransformersV(int32_t Parameter, VARIANT *Argument) ;
This interface returns a Variant, the variable “parameter” is used to specify the property of the class to be used and the variable “argument” can be used to modify the value of the property when necessary. Reading and writing properties are separated and require a different parameter number to be executed.
The properties (parameter) are integer numbers and are described as follows.
- transformers_all_Names()[source]
Gets a variant array of strings with all Transformer names in the active circuit.
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.
- class py_dss_interface.models.VSources.VSources.VSourcesF(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:
double VSourcesF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.VSources.VSources.VSourcesI(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 VSourcesI(int32_t Parameter, int32_t Argument);
This interface returns an integer number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.VSources.VSources.VSourcesS(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 VSourcesS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.VSources.VSources.VSourcesV(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:
void VSourcesV(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
XYCurves
Created by eniocc at 11/10/2020
- class py_dss_interface.models.XYCurves.XYCurves.XYCurves(obj_dss)[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.
- class py_dss_interface.models.XYCurves.XYCurves.XYCurvesF(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:
double XYCurvesF(int32_t Parameter, double Argument);
This interface returns a floating point number with the result of the query according to the value of the variable Parameter, which can be one of the following.
- xycurves_write_x_scale(argument) float [source]
Sets the factor to scale X values from original curve.
- xycurves_write_x_shift(argument) float [source]
Sets the amount to shift X value from original curve.
- class py_dss_interface.models.XYCurves.XYCurves.XYCurvesI(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 XYCurvesI(int32_t Parameter, int32_t Argument);
This interface returns an integer with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.XYCurves.XYCurves.XYCurvesS(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 XYCurvesS(int32_t Parameter, CStr Argument);
This interface returns a string with the result of the query according to the value of the variable Parameter, which can be one of the following.
- class py_dss_interface.models.XYCurves.XYCurves.XYCurvesV(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:
void XYCurvesS(int32_t Parameter, VARIANT *Argument);
This interface returns a Variant with the result of the query according to the value of the variable Parameter, which can be one of the following.
- xycurves_read_x_array()[source]
Gets the X values as a variant array of doubles. Set Npts to max number expected if setting.
- xycurves_read_y_array()[source]
Gets the Y values as a variant array of doubles. Set Npts to max number expected if setting..