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:
DynamicDeviceThis 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_pos: intο
Get
bus_from_pos.- Returns:
int
- 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
- property design_rateο
Rate (MVA) :return:
- 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_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_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]
- 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)
- get_tap_module_control_mode_at(t: int | None) TapModuleControl[source]ο
- Parameters:
t
- Returns:
- get_tap_phase_control_mode_at(t: int | None) TapPhaseControl[source]ο
- Parameters:
t
- Returns:
- regulation_branch: BranchParent | 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
- 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
- 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:
PhysicalDeviceParent 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}ο
- 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.
- 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.
- 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:
PhysicalDeviceParent 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_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_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:
objectThis 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
- 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
- device_type: DeviceTypeο
- diff_changesο
- 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
- 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_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_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_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
- 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
- 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_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:
typeMetaclass 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:
objectVeraGrid property, this class must remain immutable
- property definition: strο
Property definition. :return: str
- property display: boolο
Display flag. :return: bool
- property editable: boolο
Editable flag. :return: bool
- get_dict() Dict[str, str][source]ο
Get the values of this property as a dictionary :return: Dict[name, value]
- 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- 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
- 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.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:
DynamicDeviceParent 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_pos: intο
Get
bus_pos.- Returns:
int
- property capex: floatο
Get
capex.- Returns:
float
- colorο
- property conn: ShuntConnectionTypeο
- 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
- 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:
InjectionParentTemplate 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
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:
EditableDeviceParent 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_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
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:
EditableDeviceInvestment
- 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:
InjectionParentTemplate 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)ο
- 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: