VeraGridEngine.Devices.Parents package

Submodules

VeraGridEngine.Devices.Parents.branch_parent module

class VeraGridEngine.Devices.Parents.branch_parent.BranchParent(name: str, idtag: str | None, code: str, bus_from: Bus | None, bus_to: Bus | None, active: bool, reducible: bool, design_rate: float, rate: float, contingency_factor: float, protection_rating_factor: float, contingency_enabled: bool, monitor_loading: bool, mttf: float, mttr: float, build_status: BuildStatus, capex: float, opex: float, cost: float, temp_base: float, temp_oper: float, alpha: float, device_type: DeviceType, color: str | None = None)[source]

Bases: DynamicDevice

This class serves to represent the basic branch All other branches inherit from this one

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes', 'bus_from', 'bus_to')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'active': 'active_prof', 'contingency_factor': 'contingency_factor_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'temp_oper': 'temp_oper_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'Cost': prop:Cost, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'build_status': prop:build_status, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'contingency_factor': prop:contingency_factor, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'group': prop:group, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'protection_rating_factor': prop:protection_rating_factor, 'rate': prop:rate, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper}
property Cost: float

Get Cost.

Returns:

float

property Cost_prof: ProfileFloat

Cost profile :return: Profile

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha)
property Vf: float

Get the voltage β€œfrom” (kV) :return: get the nominal voltage from

property Vt: float

Get the voltage β€œto” (kV) :return: get the nominal voltage to

property active: bool

Get active.

Returns:

bool

property active_prof: ProfileBool

Cost profile :return: Profile

property alpha: float

Get alpha.

Returns:

float

build_status
property bus_from: Bus

Bus :return: Bus

property bus_from_pos: int

Get bus_from_pos.

Returns:

int

property bus_to: Bus

Bus :return: Bus

property bus_to_pos: int

Get bus_to_pos.

Returns:

int

property capex: float

Get capex.

Returns:

float

color
contingency_enabled: bool
property contingency_factor

Rate (MVA) :return:

property contingency_factor_prof: ProfileFloat

Cost profile :return: Profile

convertible_to_vsc()[source]

Is this line convertible to VSC? :return:

property design_rate

Rate (MVA) :return:

get_Cost_at(t: int | None) float[source]
Parameters:

t

Returns:

get_active_at(t: int | None) float[source]
Parameters:

t

Returns:

get_bus_pos(bus: Bus) int[source]

Get the bus specified position :param bus: :return:

get_buses_sorted_by_voltage()[source]

Get the sorted buses :return: HV bus, LV bus

get_contingency_factor_at(t: int | None) float[source]
Parameters:

t

Returns:

get_coordinates()[source]

Get the line defining coordinates

get_from_and_to_objects() Tuple[CONNECTION_TYPE, CONNECTION_TYPE, bool][source]

Get the from and to connection objects of the branch :return: Object from, Object to, is it ok?

get_max_bus_nominal_voltage()[source]

GEt the maximum nominal voltage :return:

get_min_bus_nominal_voltage()[source]

Get the minimum nominal voltage :return:

get_protection_rating_factor_at(t: int | None) float[source]
Parameters:

t

Returns:

get_rate_at(t: int | None) float[source]
Parameters:

t

Returns:

get_sorted_buses_voltages()[source]

Get the sorted bus voltages :return: high voltage, low voltage

get_substation_from() Substation | None[source]

Try to get the substation at the From side :return: Union[Substation, None]

get_substation_to() Substation | None[source]

Try to get the substation at the To side :return: Union[Substation, None]

get_temp_oper_at(t: int | None) float[source]
Parameters:

t

Returns:

get_virtual_taps() Tuple[float, float][source]

Get the branch virtual taps

The virtual taps generate when a line nominal voltage ate the two connection buses differ

Returns:

tap_f (float, 1.0): Virtual tap at the from side tap_t (float, 1.0): Virtual tap at the to side

get_voltage_level_from() VoltageLevel | None[source]

Try to get the voltage level at the From side :return: Union[VoltageLevel, None]

get_voltage_level_to() VoltageLevel | None[source]

Try to get the voltage level at the To side :return: Union[VoltageLevel, None]

get_weight() float[source]

Get a weight of this line for graph purposes :return: weight value

group: BranchGroup | None
property monitor_loading: bool

Get monitor_loading.

Returns:

bool

property mttf: float

Get mttf.

Returns:

float

property mttr: float

Get mttr.

Returns:

float

property opex: float

Get opex.

Returns:

float

property protection_rating_factor

Rate (MVA) :return:

property protection_rating_factor_prof: ProfileFloat

Cost profile :return: Profile

property rate

Rate (MVA) :return:

property rate_prof: ProfileFloat

Cost profile :return: Profile

reassign_bus(old_bus: Bus, new_bus: Bus)[source]

Re-assign a bus :param old_bus: bus where this branch is supposedly connected (either from or to) :param new_bus: new bus to connect to

property reducible: bool

Get reducible.

Returns:

bool

should_this_be_a_transformer(branch_connection_voltage_tolerance: float = 0.1, logger: Logger | None = None) bool[source]

Check if this line should be a transformer :param branch_connection_voltage_tolerance: :param logger: Logger :return: should this be a transformer?

property temp_base: float

Get temp_base.

Returns:

float

property temp_oper: float

Get temp_oper.

Returns:

float

property temp_oper_prof: ProfileFloat

Cost profile :return: Profile

VeraGridEngine.Devices.Parents.controllable_branch_parent module

class VeraGridEngine.Devices.Parents.controllable_branch_parent.ControllableBranchParent(bus_from: Bus | None, bus_to: Bus | None, name: str, idtag: str | None, code: str, active: bool, reducible: bool, design_rate: float, rate: float, r: float, x: float, g: float, b: float, tap_module: float, tap_module_max: float, tap_module_min: float, tap_phase: float, tap_phase_max: float, tap_phase_min: float, tolerance: float, vset: float, Pset: float, Qset: float, regulation_branch: BranchParent | None, regulation_bus: Bus | None, temp_base: float, temp_oper: float, alpha: float, tap_module_control_mode: TapModuleControl, tap_phase_control_mode: TapPhaseControl, contingency_factor: float, protection_rating_factor: float, contingency_enabled: bool, monitor_loading: bool, r0: float, x0: float, g0: float, b0: float, r2: float, x2: float, g2: float, b2: float, cost: float, mttf: float, mttr: float, capex: float, opex: float, build_status: BuildStatus, device_type: DeviceType, tc_total_positions: int = 5, tc_neutral_position: int = 2, tc_normal_position: int = 2, tc_dV: float = 0.01, tc_asymmetry_angle=90, tc_type: TapChangerTypes = NoRegulation)[source]

Bases: BranchParent

property B: float

Get B.

Returns:

float

property B0: float

Get B0.

Returns:

float

property B2: float

Get B2.

Returns:

float

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes', 'bus_from', 'bus_to', 'tap_changer')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'Pset': 'Pset_prof', 'Qset': 'Qset_prof', 'active': 'active_prof', 'contingency_factor': 'contingency_factor_prof', 'protection_rating_factor': 'protection_rating_factor_prof', 'rate': 'rate_prof', 'tap_module': 'tap_module_prof', 'tap_module_control_mode': 'tap_module_control_mode_prof', 'tap_phase': 'tap_phase_prof', 'tap_phase_control_mode': 'tap_phase_control_mode_prof', 'temp_oper': 'temp_oper_prof', 'vset': 'vset_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:G, prop:B, prop:R0, prop:X0, prop:G0, prop:B0, prop:R2, prop:X2, prop:G2, prop:B2, prop:tolerance, prop:tap_changer, prop:tap_module, prop:tap_module_max, prop:tap_module_min, prop:tap_module_control_mode, prop:vset, prop:Qset, prop:regulation_bus, prop:tap_phase, prop:tap_phase_max, prop:tap_phase_min, prop:tap_phase_control_mode, prop:Pset)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus_from, prop:bus_to, prop:active, prop:reducible, prop:design_rate, prop:rate, prop:contingency_factor, prop:protection_rating_factor, prop:monitor_loading, prop:mttf, prop:mttr, prop:Cost, prop:capex, prop:opex, prop:group, prop:color, prop:bus_from_pos, prop:bus_to_pos, prop:temp_base, prop:temp_oper, prop:alpha, prop:R, prop:X, prop:G, prop:B, prop:R0, prop:X0, prop:G0, prop:B0, prop:R2, prop:X2, prop:G2, prop:B2, prop:tolerance, prop:tap_changer, prop:tap_module, prop:tap_module_max, prop:tap_module_min, prop:tap_module_control_mode, prop:vset, prop:Qset, prop:regulation_bus, prop:tap_phase, prop:tap_phase_max, prop:tap_phase_min, prop:tap_phase_control_mode, prop:Pset)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'B': prop:B, 'B0': prop:B0, 'B2': prop:B2, 'Cost': prop:Cost, 'G': prop:G, 'G0': prop:G0, 'G2': prop:G2, 'Pset': prop:Pset, 'Qset': prop:Qset, 'R': prop:R, 'R0': prop:R0, 'R2': prop:R2, 'X': prop:X, 'X0': prop:X0, 'X2': prop:X2, 'action': prop:action, 'active': prop:active, 'alpha': prop:alpha, 'build_status': prop:build_status, 'bus_from': prop:bus_from, 'bus_from_pos': prop:bus_from_pos, 'bus_to': prop:bus_to, 'bus_to_pos': prop:bus_to_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'contingency_factor': prop:contingency_factor, 'decommissioned_date': prop:decommissioned_date, 'design_rate': prop:design_rate, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'group': prop:group, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'monitor_loading': prop:monitor_loading, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'protection_rating_factor': prop:protection_rating_factor, 'rate': prop:rate, 'rdfid': prop:rdfid, 'reducible': prop:reducible, 'regulation_bus': prop:regulation_bus, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'tap_changer': prop:tap_changer, 'tap_module': prop:tap_module, 'tap_module_control_mode': prop:tap_module_control_mode, 'tap_module_max': prop:tap_module_max, 'tap_module_min': prop:tap_module_min, 'tap_phase': prop:tap_phase, 'tap_phase_control_mode': prop:tap_phase_control_mode, 'tap_phase_max': prop:tap_phase_max, 'tap_phase_min': prop:tap_phase_min, 'temp_base': prop:temp_base, 'temp_oper': prop:temp_oper, 'tolerance': prop:tolerance, 'vset': prop:vset}
property G: float

Get G.

Returns:

float

property G0: float

Get G0.

Returns:

float

property G2: float

Get G2.

Returns:

float

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:R, prop:X, prop:G, prop:B, prop:R0, prop:X0, prop:G0, prop:B0, prop:R2, prop:X2, prop:G2, prop:B2, prop:tolerance, prop:tap_changer, prop:tap_module, prop:tap_module_max, prop:tap_module_min, prop:tap_module_control_mode, prop:vset, prop:Qset, prop:regulation_bus, prop:tap_phase, prop:tap_phase_max, prop:tap_phase_min, prop:tap_phase_control_mode, prop:Pset)
property Pset: float

Get Pset.

Returns:

float

property Pset_prof: ProfileFloat

vset profile :return: Profile

property Qset: float

Get Qset.

Returns:

float

property Qset_prof: ProfileFloat

vset profile :return: Profile

property R: float

Get R.

Returns:

float

property R0: float

Get R0.

Returns:

float

property R2: float

Get R2.

Returns:

float

property R_corrected

Returns a temperature corrected resistance based on a formula provided by: NFPA 70-2005, National Electrical Code, Table 8, footnote #2; and https://en.wikipedia.org/wiki/Electrical_resistivity_and_conductivity#Linear_approximation (version of 2019-01-03 at 15:20 EST).

property X: float

Get X.

Returns:

float

property X0: float

Get X0.

Returns:

float

property X2: float

Get X2.

Returns:

float

apply_tap_changer(tap_changer: TapChanger)[source]

Apply a new tap changer

Argument:

tap_changer (VeraGridEngine.Devices.branch.TapChanger): Tap changer object

change_base(Sbase_old: float, Sbase_new: float)[source]

Change the impedance base :param Sbase_old: old base (MVA) :param Sbase_new: new base (MVA)

flip()[source]

Change the terminals’ positions

get_Pset_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Qset_at(t: int | None) float[source]
Parameters:

t

Returns:

get_tap_module_at(t: int | None) float[source]
Parameters:

t

Returns:

get_tap_module_control_mode_at(t: int | None) TapModuleControl[source]
Parameters:

t

Returns:

get_tap_phase_at(t: int | None) float[source]
Parameters:

t

Returns:

get_tap_phase_control_mode_at(t: int | None) TapPhaseControl[source]
Parameters:

t

Returns:

get_vset_at(t: int | None) float[source]
Parameters:

t

Returns:

get_weight()[source]

Get a weight for the graphs :return: sqrt(r^2 + x^2)

regulation_branch: BranchParent | None
regulation_bus: Bus | None
regulation_cn
set_tap_controls(tap_phase_control_mode: TapPhaseControl, tap_module_control_mode: TapModuleControl)[source]

Set both tap controls :param tap_phase_control_mode: TapPhaseControl :param tap_module_control_mode: TapModuleControl

property tap_changer: TapChanger

Cost profile :return: Profile

tap_down()[source]

Move the tap changer one position up

property tap_module: float

Get tap_module.

Returns:

float

property tap_module_control_mode: TapModuleControl

Get the tap module control mode :return: TapPhaseControl

property tap_module_control_mode_prof: ProfileEnum

_tap_module_control_mode_prof profile :return: Profile

property tap_module_max
Returns:

property tap_module_min
Returns:

property tap_module_prof: ProfileFloat

Cost profile :return: Profile

property tap_phase: float

Get tap_phase.

Returns:

float

property tap_phase_control_mode: TapPhaseControl

Get the tap phase control mode :return: TapPhaseControl

property tap_phase_control_mode_prof: ProfileEnum

tap_phase_control_mode_prof profile :return: Profile

property tap_phase_max
Returns:

property tap_phase_min
Returns:

property tap_phase_prof: ProfileFloat

Cost profile :return: Profile

tap_up()[source]

Move the tap changer one position up

property tolerance: float

Get tolerance.

Returns:

float

property vset: float

Get vset.

Returns:

float

property vset_prof: ProfileFloat

vset profile :return: Profile

VeraGridEngine.Devices.Parents.dynamic_bus_parent module

class VeraGridEngine.Devices.Parents.dynamic_bus_parent.DynamicBusDevice(name: str, idtag: str | None, code: str, device_type: DeviceType, build_status: BuildStatus = Commissioned)[source]

Bases: PhysicalDevice

Parent class for devices with dynamic models

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'action': prop:action, 'build_status': prop:build_status, 'code': prop:code, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'emt_model': prop:emt_model, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'name': prop:name, 'owners': prop:owners, 'rdfid': prop:rdfid, 'rms_model': prop:rms_model}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:rms_model, prop:emt_model)
add_pending_emt_device(device: Any) None[source]

Store one single-bus device whose EMT model must wait for a bus shell.

Parameters:

device – Device waiting for one EMT bus shell.

Returns:

None.

property emt_model: Block

Get the EMT model

get_pending_emt_devices() List[Any][source]

Return the devices waiting for deferred EMT bus connection.

Returns:

Copy of the pending EMT device list.

remove_pending_emt_device(device: Any) None[source]

Remove one single-bus device from the pending EMT connection queue.

Parameters:

device – Device that no longer needs deferred EMT bus connection.

Returns:

None.

property rms_model: Block

Get the RMS model

set_var_factory(val: VarFactory) None[source]

Store the shared variable factory used by RMS and EMT symbolic blocks.

Parameters:

val – Shared variable factory.

Returns:

None.

VeraGridEngine.Devices.Parents.dynamic_parent module

class VeraGridEngine.Devices.Parents.dynamic_parent.DynamicDevice(name: str, idtag: str | None, code: str, device_type: DeviceType, build_status: BuildStatus = Commissioned)[source]

Bases: PhysicalDevice

Parent class for devices with dynamic models

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'action': prop:action, 'build_status': prop:build_status, 'code': prop:code, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'name': prop:name, 'owners': prop:owners, 'rdfid': prop:rdfid, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config)
property emt_fmu_import_config: str

Get the serialized EMT FMU Co-Simulation configuration.

Returns:

Serialized configuration text.

property emt_fmu_me_import_config: str

Get the serialized EMT FMU Model Exchange configuration.

Returns:

Serialized configuration text.

property emt_fmu_template: FmuTemplate | None

Get the reusable FMU template assigned to the EMT domain.

Returns:

EMT FMU template when available.

property emt_model: Block

Get the EMT model

property emt_template: EmtModelTemplate | None

Get the EMT template

property rms_fmu_import_config: str

Get the serialized RMS FMU Co-Simulation configuration.

Returns:

Serialized configuration text.

property rms_fmu_me_import_config: str

Get the serialized RMS FMU Model Exchange configuration.

Returns:

Serialized configuration text.

property rms_fmu_template: FmuTemplate | None

Get the reusable FMU template assigned to the RMS domain.

Returns:

RMS FMU template when available.

property rms_model: Block

Get the RMS model

property rms_template: RmsModelTemplate | None

Get the RMS model

set_var_factory(val: VarFactory) None[source]

Store the shared variable factory used by RMS and EMT symbolic blocks.

Parameters:

val – Shared variable factory.

Returns:

None.

VeraGridEngine.Devices.Parents.editable_device module

class VeraGridEngine.Devices.Parents.editable_device.EditableDevice(name: str, idtag: str | None, code: str, device_type: DeviceType, comment: str = '', rdfid: str = '')[source]

Bases: object

This is the main device class from which all inherit

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'action': prop:action, 'code': prop:code, 'comment': prop:comment, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes)
action: ActionType
property auto_update_enabled
Returns:

property code: str

code getter :return: string, hopefully an UUIDv4

comment: str
compare(other: Any, logger: Logger, detailed_profile_comparison=False, nt=0) Tuple[ActionType, List[GCProp]][source]

Compare two objects :param other: other device :param logger: Logger :param detailed_profile_comparison: Compare profiles? :param nt: number of time steps (get it from the circuit) :return: ActionType

copy(forced_new_idtag: bool = False)[source]

Create a deep copy of this object

create_profile(magnitude, index: DatetimeIndex)[source]

Create power profile based on index :param magnitude: name of the property :param index: pandas time index

create_profiles(index)[source]

Create the load object default profiles Args: :param index: pandas time index

delete_profiles()[source]

Delete the object profiles (set all to None)

device_type: DeviceType
diff_changes
disable_auto_updates()[source]
Returns:

enable_auto_updates()[source]
Returns:

ensure_profiles_exist(index: DatetimeIndex, set_profile_default_as_snapshot: bool = False)[source]

It might be that when loading the VeraGrid Model has properties that the file has not. Those properties must be initialized as well :param index: Time series index (timestamps) :param set_profile_default_as_snapshot: set the bool default profile value as the snapshot

flatten_idtag()[source]

Remove useless underscore (_) and dash (-) :return:

generate_uuid()[source]

Generate new UUID for the idtag property

get_all_diff_changes_dict() Dict[str, bool][source]

Get the dictionary of all diff changes :return:

get_association_properties() Tuple[List[GCProp], List[int]][source]

Return the list of properties that contain associate another type :return: list of GCProp, list of indices

get_diff_change_selected(property_name: str) bool[source]

Query merge-selection state for one property in this instance. :param property_name: Property name :return: True if selected for merge

get_headers() List[source]

Return a list of headers

get_number_of_properties() int[source]

Return the number of registered properties :return: int

get_profile(magnitude: str) ProfileFloat | ProfileInt | ProfileBool | ProfileDevice | ProfileEnum | None[source]

Get the profile of a property name :param magnitude: name of the property :return: Profile object

get_profile_by_prop(prop: GCProp) ProfileFloat | ProfileInt | ProfileBool | ProfileDevice | ProfileEnum | None[source]

Get the profile of a property name :param prop: GCProp :return: Profile object

get_properties_containing_object(obj: EditableDevice) Tuple[List[GCProp], List[int]][source]

Return the list of properties that contain a certain object :param obj: :return: list of GCProp, list of indices

get_property_by_idx(property_idx: int) GCProp[source]

Return the stored object value from the property index :param property_idx: Property index :return: GCProp

get_property_by_name(prop_name: str) GCProp[source]
Parameters:

prop_name

Returns:

get_property_name_replacements_dict() Dict[str, str][source]

Get dictionary of old names related to their current name This is useful for retro compatibility :return: {old_name: new_name} dict

get_property_value(prop: GCProp, t_idx: None | int) Any[source]

Return the stored object value from the property index :param prop: GCProp :param t_idx: Time index, None for Snapshot values :return: Whatever value is there

get_property_value_by_idx(property_idx: int, t_idx: None | int) Any[source]

Return the stored object value from the property index :param property_idx: Property index :param t_idx: Time index, None for Snapshot values :return: Whatever value is there

get_rdfid() str[source]

Convert the idtag to RDFID :return: UUID converted to RDFID

get_save_data() List[str | float | int | bool | object][source]

Return the data that matches the edit_headers :return: list with data

get_snapshot_value(prop: GCProp) Any[source]

Return the stored object value from the property index :param prop: GCProp :return: Whatever value is there

get_snapshot_value_by_name(name) Any[source]

Return the stored object value from the property index :param name: snapshot property name :return: Whatever value is there

get_uuid() str[source]

If the idtag property looks like a UUID, it adds the dashes :return: UUID with dashes

get_value(prop: GCProp, t_idx: None | int) Any[source]

Return value regardless of the property index :param prop: GCProp :param t_idx: time index :return: Some value

static hex2rgb(hexcode: int) Tuple[int, ...][source]

Convert hexadecimal string to rgb tuple :param hexcode: hexadecimal string :return: (R, G, B)

property idtag: str

idtag getter :return: string, hopefully an UUIDv4

iter_properties_selected_to_merge()[source]

Iterate over properties selected to be merged for this instance. :return: Generator[GCProp, None, None]

property name: str

Name of the object

new_idtag()[source]

Generate a new IdTag

property non_editable_properties: Tuple[str, ...]

Class-level non-editable property names exposed as read-only instance view. :return: Tuple[str, …]

property properties_with_profile: Dict[str, str]

Class-level property/profile map exposed as read-only instance view. :return: Dict[str, str]

property property_list: Tuple[GCProp, ...]

Class-level property list exposed as read-only instance view. :return: Tuple of GCProp

property rdfid: str
rebind_device_references(objects_by_idtag: Dict[str, Any], props: List[GCProp] | None = None) None[source]

Rebind direct device-pointer properties to equivalent objects from a target lookup.

This is useful when an object has been copied from another circuit and its pointer properties still reference objects from that old circuit instance.

Parameters:
  • objects_by_idtag – idtag -> target object lookup

  • props – Optional subset of properties to process. If omitted, all registered properties are considered.

register(key: str, tpe: Type[int] | Type[bool] | Type[float] | Type[str] | DeviceType | SubObjectType | Type[HvdcControlType] | Type[BuildStatus] | Type[WindingsConnection] | Type[TapModuleControl] | Type[TapPhaseControl] | Type[ActionType] | Type[AvailableTransferMode] | Type[ContingencyMethod] | Type[CpfParametrization] | Type[CpfStopAt] | Type[InvestmentEvaluationMethod] | Type[InvestmentsEvaluationObjectives] | Type[NodalCapacityMethod] | Type[ShuntControlMode] | Type[SolverType] | Type[TimeGrouping] | Type[ZonalGrouping] | Type[MIPSolvers] | Type[AcOpfMode] | Type[BranchImpedanceMode] | Type[FaultType] | Type[TapChangerTypes] | Type[VoltageLevelTypes] | Type[ContingencyOperationTypes] | Type[BranchGroupTypes] | Type[ConverterControlType] | Type[WindingType] | Type[MethodShortCircuit] | Type[PhasesShortCircuit] | Type[DeviceType] | Type[ShuntConnectionType] | Type[BusGraphicType] | Type[SwitchGraphicType] | Type[DynamicIntegrationMethod] | Type[RmsInitializationMethod] | Type[OpfDispatchMode] | Type[EmtLineTypes] | Type[EmtSolverTypes] | Type[EmtProblemTypes] | Type[EmtInitializationMethod] | Type[RmsProblemTypes] | Type[SmallSignalEmtBuildTypes] | Type[EraSvdSolverType] | Type[FmuTemplateDomain] | Type[FmuTemplateMode] | Type[PlotSimulationType] | Type[DynamicEventTransitionType] | Type[DynamicPlotMode] | Type[DynamicPlotEntryKind] | Type[DynamicPlotEntryRole], units: str = '', definition: str = '', profile_name: str = '', display: bool = True, editable: bool = True, old_names: List[str] = None, is_color: bool = False, is_date: bool = False)[source]

Runtime registration is intentionally disabled. :param key: key (this is the displayed name) :param units: string with the declared units :param tpe: type of the attribute [Type[int], Type[bool], Type[float], Type[str], DeviceType, Type[BuildStatus]] :param definition: Definition of the property :param profile_name: name of the profile property (if any) :param display: display this property? :param editable: is this editable? :param old_names: List of old names :param is_color: is this a color property? :param is_date: Is this a date property?

property registered_properties: Dict[str, GCProp]

Class-level registered properties exposed as read-only instance view. :return: Dict[str, GCProp]

replace_objects(old_object: Any, new_obj: Any, logger: Logger) None[source]

Replace object in this objects’ properties :param old_object: object to replace :param new_obj: object used to replace the old one :param logger: Logger to record what happened

resample_profiles(indices: ndarray[tuple[Any, ...], dtype[int64]])[source]

re-sample the object profiles (set all to None)

resize_profiles(index, time_frame: TimeFrame)[source]

Resize the profiles in this object :param index: pandas time index :param time_frame: Time frame to use (Short term, Long term)

static rgb2hex(r: int, g: int, b: int) str[source]

Convert R, G, B to hexadecimal tuple :param r: Red amount (0, 255) :param g: Green amount (0, 255) :param b: Blue amount (0, 255) :return: Hexadecimal string

rnd_color() str[source]

Generate random colour :return: hex string

selected_to_merge
set_diff_change(property_name: str, selected: bool) None[source]

Set merge-selection state for one property in this instance. :param property_name: Property name :param selected: Should this property be merged :return: None

set_profile(prop: GCProp, arr: ProfileFloat | ProfileInt | ProfileBool | ProfileDevice | ProfileEnum | ndarray) None[source]

Set the profile from eithr an array or an actual profile object :param prop: GCProp instance :param arr: Profile object or numpy array object

set_profile_array(magnitude, arr: ProfileFloat | ProfileInt | ProfileBool | ProfileDevice | ProfileEnum | ndarray) None[source]

Set the profile from either an array or an actual profile object :param magnitude: snapshot magnitude :param arr: Profile object or numpy array object

set_profile_values(t)[source]

Set the profile values at t :param t: time index (integer)

set_property_value(prop: GCProp, value: Any, t_idx: None | int)[source]

Return the stored object value from the property index :param prop: GCProp :param value: any value is there :param t_idx: Time index, None for Snapshot values :return: Whatever value is there

set_snapshot_value(property_name, value: Any) None[source]

Set the value of a snapshot property :param property_name: name of the property :param value: Any

set_value(prop: GCProp, t_idx: None | int, value: Any) None[source]

Return value regardless of the property index :param prop: GCProp :param t_idx: time index :param value: Some value

property type_name: str

Name of the device type :return: name of the type (str)

class VeraGridEngine.Devices.Parents.editable_device.EditableDeviceMeta(name, bases, namespace)[source]

Bases: type

Metaclass that pre-builds inherited class schema declarations.

class VeraGridEngine.Devices.Parents.editable_device.GCProp(prop_name: str | None = None, units: str = '', tpe: Type[int] | Type[bool] | Type[float] | Type[str] | DeviceType | SubObjectType | Type[HvdcControlType] | Type[BuildStatus] | Type[WindingsConnection] | Type[TapModuleControl] | Type[TapPhaseControl] | Type[ActionType] | Type[AvailableTransferMode] | Type[ContingencyMethod] | Type[CpfParametrization] | Type[CpfStopAt] | Type[InvestmentEvaluationMethod] | Type[InvestmentsEvaluationObjectives] | Type[NodalCapacityMethod] | Type[ShuntControlMode] | Type[SolverType] | Type[TimeGrouping] | Type[ZonalGrouping] | Type[MIPSolvers] | Type[AcOpfMode] | Type[BranchImpedanceMode] | Type[FaultType] | Type[TapChangerTypes] | Type[VoltageLevelTypes] | Type[ContingencyOperationTypes] | Type[BranchGroupTypes] | Type[ConverterControlType] | Type[WindingType] | Type[MethodShortCircuit] | Type[PhasesShortCircuit] | Type[DeviceType] | Type[ShuntConnectionType] | Type[BusGraphicType] | Type[SwitchGraphicType] | Type[DynamicIntegrationMethod] | Type[RmsInitializationMethod] | Type[OpfDispatchMode] | Type[EmtLineTypes] | Type[EmtSolverTypes] | Type[EmtProblemTypes] | Type[EmtInitializationMethod] | Type[RmsProblemTypes] | Type[SmallSignalEmtBuildTypes] | Type[EraSvdSolverType] | Type[FmuTemplateDomain] | Type[FmuTemplateMode] | Type[PlotSimulationType] | Type[DynamicEventTransitionType] | Type[DynamicPlotMode] | Type[DynamicPlotEntryKind] | Type[DynamicPlotEntryRole] | None = None, definition: str = '', profile_name: str = '', display: bool = True, editable: bool = True, old_names: List[str] | Tuple[str, ...] | None = None, is_color: bool = False, is_date: bool = False, key: str | None = None, cat: List[PrpCat] | None = None)[source]

Bases: object

VeraGrid property, this class must remain immutable

property category: List[PrpCat]

List of categories :return: List[PropertyCategory]

property definition: str

Property definition. :return: str

property display: bool

Display flag. :return: bool

property editable: bool

Editable flag. :return: bool

get_class_name() str[source]

Convert the class name to a string :return: str

get_dict() Dict[str, str][source]

Get the values of this property as a dictionary :return: Dict[name, value]

has_profile() bool[source]

Check if this property has an associated profile :return:

property is_color: bool

Color flag. :return: bool

property is_date: bool

Date flag. :return: bool

property name: str

Property name. :return: str

property old_names: Tuple[str, ...]

Compatibility aliases. :return: Tuple[str, …]

property profile_name: str

Linked profile name. :return: str

property tpe: Type[int] | Type[bool] | Type[float] | Type[str] | DeviceType | SubObjectType | Type[HvdcControlType] | Type[BuildStatus] | Type[WindingsConnection] | Type[TapModuleControl] | Type[TapPhaseControl] | Type[ActionType] | Type[AvailableTransferMode] | Type[ContingencyMethod] | Type[CpfParametrization] | Type[CpfStopAt] | Type[InvestmentEvaluationMethod] | Type[InvestmentsEvaluationObjectives] | Type[NodalCapacityMethod] | Type[ShuntControlMode] | Type[SolverType] | Type[TimeGrouping] | Type[ZonalGrouping] | Type[MIPSolvers] | Type[AcOpfMode] | Type[BranchImpedanceMode] | Type[FaultType] | Type[TapChangerTypes] | Type[VoltageLevelTypes] | Type[ContingencyOperationTypes] | Type[BranchGroupTypes] | Type[ConverterControlType] | Type[WindingType] | Type[MethodShortCircuit] | Type[PhasesShortCircuit] | Type[DeviceType] | Type[ShuntConnectionType] | Type[BusGraphicType] | Type[SwitchGraphicType] | Type[DynamicIntegrationMethod] | Type[RmsInitializationMethod] | Type[OpfDispatchMode] | Type[EmtLineTypes] | Type[EmtSolverTypes] | Type[EmtProblemTypes] | Type[EmtInitializationMethod] | Type[RmsProblemTypes] | Type[SmallSignalEmtBuildTypes] | Type[EraSvdSolverType] | Type[FmuTemplateDomain] | Type[FmuTemplateMode] | Type[PlotSimulationType] | Type[DynamicEventTransitionType] | Type[DynamicPlotMode] | Type[DynamicPlotEntryKind] | Type[DynamicPlotEntryRole]

Property type. :return: GCPROP_TYPES

property units: str

Property units. :return: str

class VeraGridEngine.Devices.Parents.editable_device.PropertyChanges[source]

Bases: object

copy()[source]
get(property_name: str) bool[source]

Query merge-selection state for one property in this instance. :param property_name: Property name :return: True if selected for merge

parse(data: Dict[str, bool])[source]
set(property_name: str, selected: bool) None[source]

Set merge-selection state for one property in this instance. :param property_name: Property name :param selected: Should this property be merged :return: None

to_dict()[source]
VeraGridEngine.Devices.Parents.editable_device.get_action_symbol(action: ActionType)[source]
Parameters:

action

Returns:

VeraGridEngine.Devices.Parents.editable_device.get_at(snapshot_val: Type[int] | Type[bool] | Type[float] | Type[str] | DeviceType | SubObjectType | Type[HvdcControlType] | Type[BuildStatus] | Type[WindingsConnection] | Type[TapModuleControl] | Type[TapPhaseControl] | Type[ActionType] | Type[AvailableTransferMode] | Type[ContingencyMethod] | Type[CpfParametrization] | Type[CpfStopAt] | Type[InvestmentEvaluationMethod] | Type[InvestmentsEvaluationObjectives] | Type[NodalCapacityMethod] | Type[ShuntControlMode] | Type[SolverType] | Type[TimeGrouping] | Type[ZonalGrouping] | Type[MIPSolvers] | Type[AcOpfMode] | Type[BranchImpedanceMode] | Type[FaultType] | Type[TapChangerTypes] | Type[VoltageLevelTypes] | Type[ContingencyOperationTypes] | Type[BranchGroupTypes] | Type[ConverterControlType] | Type[WindingType] | Type[MethodShortCircuit] | Type[PhasesShortCircuit] | Type[DeviceType] | Type[ShuntConnectionType] | Type[BusGraphicType] | Type[SwitchGraphicType] | Type[DynamicIntegrationMethod] | Type[RmsInitializationMethod] | Type[OpfDispatchMode] | Type[EmtLineTypes] | Type[EmtSolverTypes] | Type[EmtProblemTypes] | Type[EmtInitializationMethod] | Type[RmsProblemTypes] | Type[SmallSignalEmtBuildTypes] | Type[EraSvdSolverType] | Type[FmuTemplateDomain] | Type[FmuTemplateMode] | Type[PlotSimulationType] | Type[DynamicEventTransitionType] | Type[DynamicPlotMode] | Type[DynamicPlotEntryKind] | Type[DynamicPlotEntryRole] | float | int, profile: ProfileFloat | ProfileInt | ProfileBool | ProfileDevice | ProfileEnum, t: int | None) Type[int] | Type[bool] | Type[float] | Type[str] | DeviceType | SubObjectType | Type[HvdcControlType] | Type[BuildStatus] | Type[WindingsConnection] | Type[TapModuleControl] | Type[TapPhaseControl] | Type[ActionType] | Type[AvailableTransferMode] | Type[ContingencyMethod] | Type[CpfParametrization] | Type[CpfStopAt] | Type[InvestmentEvaluationMethod] | Type[InvestmentsEvaluationObjectives] | Type[NodalCapacityMethod] | Type[ShuntControlMode] | Type[SolverType] | Type[TimeGrouping] | Type[ZonalGrouping] | Type[MIPSolvers] | Type[AcOpfMode] | Type[BranchImpedanceMode] | Type[FaultType] | Type[TapChangerTypes] | Type[VoltageLevelTypes] | Type[ContingencyOperationTypes] | Type[BranchGroupTypes] | Type[ConverterControlType] | Type[WindingType] | Type[MethodShortCircuit] | Type[PhasesShortCircuit] | Type[DeviceType] | Type[ShuntConnectionType] | Type[BusGraphicType] | Type[SwitchGraphicType] | Type[DynamicIntegrationMethod] | Type[RmsInitializationMethod] | Type[OpfDispatchMode] | Type[EmtLineTypes] | Type[EmtSolverTypes] | Type[EmtProblemTypes] | Type[EmtInitializationMethod] | Type[RmsProblemTypes] | Type[SmallSignalEmtBuildTypes] | Type[EraSvdSolverType] | Type[FmuTemplateDomain] | Type[FmuTemplateMode] | Type[PlotSimulationType] | Type[DynamicEventTransitionType] | Type[DynamicPlotMode] | Type[DynamicPlotEntryKind] | Type[DynamicPlotEntryRole] | float | int[source]

Get a GCPROP_TYPES value from a snapshot or a profile :param snapshot_val: snapshot value :param profile: Associated profile :param t: time index (None for snapshot) :return: Value

VeraGridEngine.Devices.Parents.editable_device.parse_idtag(val: str | None) str[source]

idtag setter :param val: any string or None

VeraGridEngine.Devices.Parents.editable_device.smart_compare(a, b, atol=1e-10)[source]

Compares two Python objects with tolerance for numerical values.

If both inputs are numeric (int, float, complex, or NumPy numbers), the function uses np.isclose() to compare them. For all other types, it falls back to standard equality comparison (==).

a :First object to compare. b :Second object to compare. :return: bool

VeraGridEngine.Devices.Parents.editable_device.uuid2idtag(val: str)[source]

Remove the useless characters and format as a proper 32-char UID :param val: value that looks like a UUID :return: proper UUID

VeraGridEngine.Devices.Parents.injection_parent module

class VeraGridEngine.Devices.Parents.injection_parent.InjectionParent(name: str, idtag: str | None, code: str, bus: Bus | None, active: bool, Cost: float, mttf: float, mttr: float, capex: float, opex: float, build_status: BuildStatus, device_type: DeviceType, longitude=0.0, latitude=0.0, color: str | None = None)[source]

Bases: DynamicDevice

Parent class for Injections

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes', 'bus')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'active': 'active_prof', 'shift_key': 'shift_key_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus, prop:active, prop:color, prop:mttf, prop:mttr, prop:capex, prop:opex, prop:Cost, prop:facility, prop:technologies, prop:scalable, prop:shift_key, prop:longitude, prop:latitude, prop:use_kw, prop:conn, prop:bus_pos)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus, prop:active, prop:color, prop:mttf, prop:mttr, prop:capex, prop:opex, prop:Cost, prop:facility, prop:technologies, prop:scalable, prop:shift_key, prop:longitude, prop:latitude, prop:use_kw, prop:conn, prop:bus_pos)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'Cost': prop:Cost, 'action': prop:action, 'active': prop:active, 'build_status': prop:build_status, 'bus': prop:bus, 'bus_pos': prop:bus_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'conn': prop:conn, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'facility': prop:facility, 'idtag': prop:idtag, 'latitude': prop:latitude, 'longitude': prop:longitude, 'modelling_authority': prop:modelling_authority, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'rdfid': prop:rdfid, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'scalable': prop:scalable, 'shift_key': prop:shift_key, 'technologies': prop:technologies, 'use_kw': prop:use_kw}
property Cost: float

Get Cost.

Returns:

float

property Cost_prof: ProfileFloat

Cost profile :return: Profile

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:bus, prop:active, prop:color, prop:mttf, prop:mttr, prop:capex, prop:opex, prop:Cost, prop:facility, prop:technologies, prop:scalable, prop:shift_key, prop:longitude, prop:latitude, prop:use_kw, prop:conn, prop:bus_pos)
property active: bool

Get active.

Returns:

bool

property active_prof: ProfileBool

Cost profile :return: Profile

associate_technology(tech: Technology, val=1.0)[source]

Associate a technology with this injection device :param tech: :param val: :return:

property bus: Bus | None

Bus :return: Bus

property bus_pos: int

Get bus_pos.

Returns:

int

property capex: float

Get capex.

Returns:

float

color
color_by_main_owner()[source]

Set the color of the dominant owner

color_by_main_technology()[source]

Set the color of the dominant technology

property conn: ShuntConnectionType
Returns:

facility: Facility | None
get_Cost_at(t: int | None) float[source]
Parameters:

t

Returns:

get_S_with_sign() complex[source]
Returns:

get_Sprof_with_sign() ndarray[tuple[Any, ...], dtype[complex128]][source]
Returns:

get_active_at(t: int | None) float[source]
Parameters:

t

Returns:

get_bus_pos(bus: Bus | None = None) int[source]

Get the bus position NOTE: don’t remove the void bus argument :param bus: Bus :return: bus_pos

get_first_technology() Technology | None[source]

Get the first technology available :return: Technology

get_shift_key_at(t: int | None) float[source]
Parameters:

t

Returns:

property latitude: float

Get latitude.

Returns:

float

property longitude: float

Get longitude.

Returns:

float

property mttf: float

Get mttf.

Returns:

float

property mttr: float

Get mttr.

Returns:

float

property opex: float

Get opex.

Returns:

float

property scalable: bool

Get scalable.

Returns:

bool

property shift_key: float

Get shift_key.

Returns:

float

property shift_key_prof: ProfileFloat

Cost profile :return: Profile

property tech_list: List[ALL_DEV_TYPES]

Bus :return: Bus

technologies: Associations
try_to_find_coordinates() Tuple[float, float][source]

Get the latitude and :return: longitude, latitude

property use_kw
Returns:

VeraGridEngine.Devices.Parents.load_parent module

class VeraGridEngine.Devices.Parents.load_parent.LoadParent(name: str, idtag: str | None, code: str, bus: Bus | None, active: bool, P: float, P1: float, P2: float, P3: float, Q: float, Q1: float, Q2: float, Q3: float, Cost: float, mttf: float, mttr: float, capex: float, opex: float, build_status: BuildStatus, device_type: DeviceType)[source]

Bases: InjectionParent

Template for objects that behave like loads

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes', 'bus')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Cost': 'Cost_prof', 'P': 'P_prof', 'Pa': 'Pa_prof', 'Pb': 'Pb_prof', 'Pc': 'Pc_prof', 'Q': 'Q_prof', 'Qa': 'Qa_prof', 'Qb': 'Qb_prof', 'Qc': 'Qc_prof', 'active': 'active_prof', 'shift_key': 'shift_key_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus, prop:active, prop:color, prop:mttf, prop:mttr, prop:capex, prop:opex, prop:Cost, prop:facility, prop:technologies, prop:scalable, prop:shift_key, prop:longitude, prop:latitude, prop:use_kw, prop:conn, prop:bus_pos, prop:P, prop:Pa, prop:Pb, prop:Pc, prop:Q, prop:Qa, prop:Qb, prop:Qc)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus, prop:active, prop:color, prop:mttf, prop:mttr, prop:capex, prop:opex, prop:Cost, prop:facility, prop:technologies, prop:scalable, prop:shift_key, prop:longitude, prop:latitude, prop:use_kw, prop:conn, prop:bus_pos, prop:P, prop:Pa, prop:Pb, prop:Pc, prop:Q, prop:Qa, prop:Qb, prop:Qc)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'Cost': prop:Cost, 'P': prop:P, 'Pa': prop:Pa, 'Pb': prop:Pb, 'Pc': prop:Pc, 'Q': prop:Q, 'Qa': prop:Qa, 'Qb': prop:Qb, 'Qc': prop:Qc, 'action': prop:action, 'active': prop:active, 'build_status': prop:build_status, 'bus': prop:bus, 'bus_pos': prop:bus_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'conn': prop:conn, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'facility': prop:facility, 'idtag': prop:idtag, 'latitude': prop:latitude, 'longitude': prop:longitude, 'modelling_authority': prop:modelling_authority, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'rdfid': prop:rdfid, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'scalable': prop:scalable, 'shift_key': prop:shift_key, 'technologies': prop:technologies, 'use_kw': prop:use_kw}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:P, prop:Pa, prop:Pb, prop:Pc, prop:Q, prop:Qa, prop:Qb, prop:Qc)
property P: float

Get P.

Returns:

float

property P_prof: ProfileFloat

Cost profile :return: Profile

property Pa: float

Get Pa.

Returns:

float

property Pa_prof: ProfileFloat

Cost profile :return: Profile

property Pb: float

Get Pb.

Returns:

float

property Pb_prof: ProfileFloat

Cost profile :return: Profile

property Pc: float

Get Pc.

Returns:

float

property Pc_prof: ProfileFloat

Cost profile :return: Profile

property Q: float

Get Q.

Returns:

float

property Q_prof: ProfileFloat

Cost profile :return: Profile

property Qa: float

Get Qa.

Returns:

float

property Qa_prof: ProfileFloat

Cost profile :return: Profile

property Qb: float

Get Qb.

Returns:

float

property Qb_prof: ProfileFloat

Cost profile :return: Profile

property Qc: float

Get Qc.

Returns:

float

property Qc_prof: ProfileFloat

Cost profile :return: Profile

get_P_at(t: int | None) float[source]

Get power at time t :param t: :return:

get_Pa_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Pb_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Pc_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Pf_at(t: int | None) float[source]

Get power factor :param t: :return:

get_Q_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Qa_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Qb_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Qc_at(t: int | None) float[source]
Parameters:

t

Returns:

get_S_at(t: int | None) complex[source]
Parameters:

t

Returns:

get_S_with_sign() complex[source]
Returns:

get_Sa_at(t: int | None) complex[source]
Parameters:

t

Returns:

get_Sb_at(t: int | None) complex[source]
Parameters:

t

Returns:

get_Sc_at(t: int | None) complex[source]
Parameters:

t

Returns:

get_Sprof_with_sign() ndarray[tuple[Any, ...], dtype[complex128]][source]
Returns:

plot_profiles(time=None, show_fig=True)[source]

Plot the time series results of this object :param time: array of time values :param show_fig: Show the figure?

split_sequence_load_in_3_phase(share_a=1.0, share_b=1.0, share_c=1.0)[source]

Initializes the 3-phase properties using the positive sequence ones

VeraGridEngine.Devices.Parents.physical_device module

class VeraGridEngine.Devices.Parents.physical_device.PhysicalDevice(name: str, idtag: str | None, code: str, device_type: DeviceType, build_status: BuildStatus, commissioned_date: float = 0, decommissioned_date: float = 0)[source]

Bases: EditableDevice

Parent class for Injections, Branches, Buses and other physical devices

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'action': prop:action, 'build_status': prop:build_status, 'code': prop:code, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'modelling_authority': prop:modelling_authority, 'name': prop:name, 'owners': prop:owners, 'rdfid': prop:rdfid}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners)
associate_owner(owner: Owner, val=1.0)[source]

Associate a technology with this injection device :param owner: :param val: :return:

build_status
property commissioned_date: float
Returns:

property decommissioned_date: float
Returns:

get_commissioned_date_as_date() datetime[source]

Get the commissioned date as datetime :return:

get_decommissioned_date_as_date() datetime[source]

Get the commissioned date as datetime :return:

modelling_authority: ModellingAuthority | None
owners: Associations
property owners_list: List[ALL_DEV_TYPES]

Bus :return: Bus

set_commissioned_year(year: int, month=1, day=1)[source]

Helper function to set the commissioning date of the asset :param year: Year :param month: month number :param day: day number

set_decommissioned_year(year: int, month=1, day=1)[source]

Helper function to set the decommissioning date of the asset :param year: Year :param month: month number :param day: day number

VeraGridEngine.Devices.Parents.pointer_device_parent module

class VeraGridEngine.Devices.Parents.pointer_device_parent.PointerDeviceParent(idtag: str | None, device: InjectionParent | BranchParent | None, name: str, code: str, comment: str, device_type: DeviceType)[source]

Bases: EditableDevice

Investment

CLASS_NON_EDITABLE_PROPERTIES = ('idtag', 'diff_changes', 'device_idtag', 'tpe', 'device_name')
CLASS_PROPERTIES_WITH_PROFILE = {}
CLASS_PROPERTY_DECLARATIONS = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name)
CLASS_PROPERTY_LIST = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:device_idtag, prop:tpe, prop:device_name)
CLASS_REGISTERED_PROPERTIES = {'action': prop:action, 'code': prop:code, 'comment': prop:comment, 'device_idtag': prop:device_idtag, 'device_name': prop:device_name, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'name': prop:name, 'rdfid': prop:rdfid, 'tpe': prop:tpe}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:device_idtag, prop:tpe, prop:device_name)
copy(forced_new_idtag: bool = False) PointerDeviceParent[source]

Overload to handle the copy of the device pointer :param forced_new_idtag: :return: PointerDeviceParent

property device: InjectionParent | BranchParent | None

device getter :return:

property device_idtag: str

Group of investments :return:

property device_name: str
Returns:

rebind_device_references(objects_by_idtag, props=None) None[source]

Rebind the pointed device to an equivalent object from a target lookup.

Parameters:
  • objects_by_idtag – idtag -> target object lookup.

  • props – Optional subset of registered properties to process.

set_device(elm: InjectionParent | BranchParent | None)[source]

Set the device :param elm: Device to be pointed

property tpe: DeviceType

Display the group category :return:

VeraGridEngine.Devices.Parents.shunt_parent module

class VeraGridEngine.Devices.Parents.shunt_parent.ShuntParent(name: str, idtag: str | None, code: str, bus: Bus | None, active: bool, G: float, G1: float, G2: float, G3: float, B: float, B1: float, B2: float, B3: float, G0: float, B0: float, Cost: float, mttf: float, mttr: float, capex: float, opex: float, build_status: BuildStatus, device_type: DeviceType)[source]

Bases: InjectionParent

Template for objects that behave like shunts

property B: float

Get B.

Returns:

float

property B0: float

Get B0.

Returns:

float

property B0_prof: ProfileFloat

Cost profile :return: Profile

property B_prof: ProfileFloat

Cost profile :return: Profile

property Ba: float

Get Ba.

Returns:

float

property Ba_prof: ProfileFloat

Cost profile :return: Profile

property Bb: float

Get Bb.

Returns:

float

property Bb_prof: ProfileFloat

Cost profile :return: Profile

property Bc: float

Get Bc.

Returns:

float

property Bc_prof: ProfileFloat

Cost profile :return: Profile

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes', 'bus', 'ysh')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'B': 'B_prof', 'B0': 'B0_prof', 'Ba': 'Ba_prof', 'Bb': 'Bb_prof', 'Bc': 'Bc_prof', 'Cost': 'Cost_prof', 'G': 'G_prof', 'G0': 'G0_prof', 'Ga': 'Ga_prof', 'Gb': 'Gb_prof', 'Gc': 'Gc_prof', 'active': 'active_prof', 'shift_key': 'shift_key_prof'}
CLASS_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus, prop:active, prop:color, prop:mttf, prop:mttr, prop:capex, prop:opex, prop:Cost, prop:facility, prop:technologies, prop:scalable, prop:shift_key, prop:longitude, prop:latitude, prop:use_kw, prop:conn, prop:bus_pos, prop:G, prop:G0, prop:Ga, prop:Gb, prop:Gc, prop:B, prop:B0, prop:Ba, prop:Bb, prop:Bc, prop:ysh)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:modelling_authority, prop:commissioned_date, prop:decommissioned_date, prop:build_status, prop:owners, prop:rms_model, prop:emt_model, prop:rms_template, prop:emt_template, prop:rms_fmu_template, prop:emt_fmu_template, prop:rms_fmu_import_config, prop:emt_fmu_import_config, prop:rms_fmu_me_import_config, prop:emt_fmu_me_import_config, prop:bus, prop:active, prop:color, prop:mttf, prop:mttr, prop:capex, prop:opex, prop:Cost, prop:facility, prop:technologies, prop:scalable, prop:shift_key, prop:longitude, prop:latitude, prop:use_kw, prop:conn, prop:bus_pos, prop:G, prop:G0, prop:Ga, prop:Gb, prop:Gc, prop:B, prop:B0, prop:Ba, prop:Bb, prop:Bc, prop:ysh)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'B': prop:B, 'B0': prop:B0, 'Ba': prop:Ba, 'Bb': prop:Bb, 'Bc': prop:Bc, 'Cost': prop:Cost, 'G': prop:G, 'G0': prop:G0, 'Ga': prop:Ga, 'Gb': prop:Gb, 'Gc': prop:Gc, 'action': prop:action, 'active': prop:active, 'build_status': prop:build_status, 'bus': prop:bus, 'bus_pos': prop:bus_pos, 'capex': prop:capex, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'conn': prop:conn, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'emt_fmu_import_config': prop:emt_fmu_import_config, 'emt_fmu_me_import_config': prop:emt_fmu_me_import_config, 'emt_fmu_template': prop:emt_fmu_template, 'emt_model': prop:emt_model, 'emt_template': prop:emt_template, 'facility': prop:facility, 'idtag': prop:idtag, 'latitude': prop:latitude, 'longitude': prop:longitude, 'modelling_authority': prop:modelling_authority, 'mttf': prop:mttf, 'mttr': prop:mttr, 'name': prop:name, 'opex': prop:opex, 'owners': prop:owners, 'rdfid': prop:rdfid, 'rms_fmu_import_config': prop:rms_fmu_import_config, 'rms_fmu_me_import_config': prop:rms_fmu_me_import_config, 'rms_fmu_template': prop:rms_fmu_template, 'rms_model': prop:rms_model, 'rms_template': prop:rms_template, 'scalable': prop:scalable, 'shift_key': prop:shift_key, 'technologies': prop:technologies, 'use_kw': prop:use_kw, 'ysh': prop:ysh}
property G: float

Get G.

Returns:

float

property G0: float

Get G0.

Returns:

float

property G0_prof: ProfileFloat

Cost profile :return: Profile

property G_prof: ProfileFloat

Cost profile :return: Profile

property Ga: float

Get Ga.

Returns:

float

property Ga_prof: ProfileFloat

Cost profile :return: Profile

property Gb: float

Get Gb.

Returns:

float

property Gb_prof: ProfileFloat

Cost profile :return: Profile

property Gc: float

Get Gc.

Returns:

float

property Gc_prof: ProfileFloat

Cost profile :return: Profile

LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:G, prop:G0, prop:Ga, prop:Gb, prop:Gc, prop:B, prop:B0, prop:Ba, prop:Bb, prop:Bc, prop:ysh)
fill_3_phase_from_sequence()[source]

Fill the admittance :return:

get_B0_at(t: int | None) float[source]
Parameters:

t

Returns:

get_B_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Ba_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Bb_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Bc_at(t: int | None) float[source]
Parameters:

t

Returns:

get_G0_at(t: int | None) float[source]
Parameters:

t

Returns:

get_G_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Ga_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Gb_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Gc_at(t: int | None) float[source]
Parameters:

t

Returns:

get_Y_at(t: int | None) complex[source]
Parameters:

t

Returns:

get_Ya_at(t: int | None) complex[source]
Parameters:

t

Returns:

get_Yb_at(t: int | None) complex[source]
Parameters:

t

Returns:

get_Yc_at(t: int | None) complex[source]
Parameters:

t

Returns:

plot_profiles(time=None, show_fig=True)[source]

Plot the time series results of this object :param time: array of time values :param show_fig: Show the figure?

property ysh: AdmittanceMatrix

Shunt admittance matrix (4x4) :return:

Module contents