VeraGridEngine.Devices.Substation package

Submodules

VeraGridEngine.Devices.Substation.bus module

class VeraGridEngine.Devices.Substation.bus.Bus(name='Bus', idtag=None, code='', Vnom=10, vmin=0.9, vmax=1.1, angle_min=-6.28, angle_max=6.28, xpos=0, ypos=0, height=0, width=0, active=True, is_slack=False, is_dc=False, is_internal=False, is_grounded=False, area: Area = None, zone: Zone = None, substation: Substation = None, voltage_level: VoltageLevel = None, country: Country = None, longitude=0.0, latitude=0.0, Vm0=1, Va0=0, graphic_type: BusGraphicType = BusBar, bus_bar: BusBar | None = None, build_status: BuildStatus = Commissioned, color: str | None = None)[source]

Bases: DynamicBusDevice

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes', 'x', 'y', 'h', 'w')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'Vmax': 'Vmax_prof', 'Vmin': 'Vmin_prof', 'active': 'active_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:active, prop:is_slack, prop:is_dc, prop:is_grounded, prop:graphic_type, prop:Vnom, prop:Vm0, prop:Va0, prop:Vmin, prop:Vmax, prop:Vm_cost, prop:angle_min, prop:angle_max, prop:angle_cost, prop:x, prop:y, prop:h, prop:w, prop:country, prop:area, prop:zone, prop:substation, prop:voltage_level, prop:bus_bar, prop:longitude, prop:latitude, prop:color)
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:active, prop:is_slack, prop:is_dc, prop:is_grounded, prop:graphic_type, prop:Vnom, prop:Vm0, prop:Va0, prop:Vmin, prop:Vmax, prop:Vm_cost, prop:angle_min, prop:angle_max, prop:angle_cost, prop:x, prop:y, prop:h, prop:w, prop:country, prop:area, prop:zone, prop:substation, prop:voltage_level, prop:bus_bar, prop:longitude, prop:latitude, prop:color)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'Va0': prop:Va0, 'Vm0': prop:Vm0, 'Vm_cost': prop:Vm_cost, 'Vmax': prop:Vmax, 'Vmin': prop:Vmin, 'Vnom': prop:Vnom, 'action': prop:action, 'active': prop:active, 'angle_cost': prop:angle_cost, 'angle_max': prop:angle_max, 'angle_min': prop:angle_min, 'area': prop:area, 'build_status': prop:build_status, 'bus_bar': prop:bus_bar, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'country': prop:country, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'emt_model': prop:emt_model, 'graphic_type': prop:graphic_type, 'h': prop:h, 'idtag': prop:idtag, 'is_dc': prop:is_dc, 'is_grounded': prop:is_grounded, 'is_slack': prop:is_slack, 'latitude': prop:latitude, 'longitude': prop:longitude, 'modelling_authority': prop:modelling_authority, 'name': prop:name, 'owners': prop:owners, 'rdfid': prop:rdfid, 'rms_model': prop:rms_model, 'substation': prop:substation, 'voltage_level': prop:voltage_level, 'w': prop:w, 'x': prop:x, 'y': prop:y, 'zone': prop:zone}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:active, prop:is_slack, prop:is_dc, prop:is_grounded, prop:graphic_type, prop:Vnom, prop:Vm0, prop:Va0, prop:Vmin, prop:Vmax, prop:Vm_cost, prop:angle_min, prop:angle_max, prop:angle_cost, prop:x, prop:y, prop:h, prop:w, prop:country, prop:area, prop:zone, prop:substation, prop:voltage_level, prop:bus_bar, prop:longitude, prop:latitude, prop:color)
Qmax_sum
Qmin_sum
property Va0: float

Get Va0.

Returns:

float

property Vm0: float

Get Vm0.

Returns:

float

property Vm_cost: float

Get Vm_cost.

Returns:

float

property Vmax: float

Get Vmax.

Returns:

float

property Vmax_prof: ProfileFloat

Pmin profile :return: Profile

property Vmin: float

Get Vmin.

Returns:

float

property Vmin_prof: ProfileFloat

Pmin profile :return: Profile

property Vnom: float

Get Vnom.

Returns:

float

property active: bool

Get active.

Returns:

bool

property active_prof: ProfileBool

Cost profile :return: Profile

property angle_cost: float

Get angle_cost.

Returns:

float

property angle_max: float

Get angle_max.

Returns:

float

property angle_min: float

Get angle_min.

Returns:

float

area: Area | None
property bus_bar: BusBar | None

Get the BusBar

color
country: Country | None
determine_bus_type() BusMode[source]

Infer the bus type from the devices attached to it @return: BusMode

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

t

Returns:

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

t

Returns:

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

t

Returns:

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

Get tuple of the bus coordinates (longitude, latitude)

get_voltage_guess(use_stored_guess=False) complex[source]

Determine the voltage initial guess :param use_stored_guess: use the stored guess or get one from the devices :return: voltage guess

graphic_type: BusGraphicType
property h: float

Get h.

Returns:

float

property internal: bool

Is the bus internal?

property is_dc: bool

Get is_dc.

Returns:

bool

property is_grounded: bool

Get is_grounded.

Returns:

bool

property is_slack: bool

Get is_slack.

Returns:

bool

property latitude: float

Get latitude.

Returns:

float

property longitude: float

Get longitude.

Returns:

float

plot_profiles(time_profile, ax_load=None, ax_voltage=None, time_series_driver=None, my_index=0)[source]

plot the profiles of this bus :param time_profile: Master profile of time steps (stored in the MultiCircuit) :param time_series_driver: time series driver :param ax_load: Load axis, if not provided one will be created :param ax_voltage: Voltage axis, if not provided one will be created :param my_index: index of this object in the time series results

substation: Substation | None
try_to_find_coordinates()[source]

Try to find the bus coordinates

property voltage_level: VoltageLevel | None

voltage_level getter :return: Union[VoltageLevel, None]

property w: float

Get w.

Returns:

float

property x: float

Get x.

Returns:

float

property y: float

Get y.

Returns:

float

zone: Zone | None

VeraGridEngine.Devices.Substation.busbar module

class VeraGridEngine.Devices.Substation.busbar.BusBar(name='BusBar', idtag: None | str = None, code: str = '', voltage_level: VoltageLevel | None = None, build_status: BuildStatus = Commissioned)[source]

Bases: PhysicalDevice

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:voltage_level)
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:voltage_level)
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, 'voltage_level': prop:voltage_level}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:voltage_level,)
property voltage_level: VoltageLevel | None

Connectivity node getter :return: ConnectivityNode

VeraGridEngine.Devices.Substation.substation module

class VeraGridEngine.Devices.Substation.substation.Substation(name='Substation', idtag: str | None = None, code='', latitude=0.0, longitude=0.0, area: Area | None = None, zone: Zone | None = None, country: Country | None = None, community: Community | None = None, region: Region | None = None, municipality: Municipality | None = None, address: str = '', irradiation: float = 0.0, temperature: float = 0.0, wind_speed: float = 0.0, terrain_roughness: float = 0.2, color: str | None = '#3d7d95', build_status: BuildStatus = Commissioned)[source]

Bases: PhysicalDevice

CLASS_NON_EDITABLE_PROPERTIES: Tuple[str, ...] = ('idtag', 'diff_changes')
CLASS_PROPERTIES_WITH_PROFILE: Dict[str, str] = {'irradiation': 'irradiation_prof', 'temperature': 'temperature_prof', 'wind_speed': 'wind_speed_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:longitude, prop:latitude, prop:color, prop:area, prop:zone, prop:country, prop:community, prop:region, prop:municipality, prop:address, prop:irradiation, prop:temperature, prop:wind_speed, prop:terrain_roughness)
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:longitude, prop:latitude, prop:color, prop:area, prop:zone, prop:country, prop:community, prop:region, prop:municipality, prop:address, prop:irradiation, prop:temperature, prop:wind_speed, prop:terrain_roughness)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'action': prop:action, 'address': prop:address, 'area': prop:area, 'build_status': prop:build_status, 'code': prop:code, 'color': prop:color, 'comment': prop:comment, 'commissioned_date': prop:commissioned_date, 'community': prop:community, 'country': prop:country, 'decommissioned_date': prop:decommissioned_date, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'irradiation': prop:irradiation, 'latitude': prop:latitude, 'longitude': prop:longitude, 'modelling_authority': prop:modelling_authority, 'municipality': prop:municipality, 'name': prop:name, 'owners': prop:owners, 'rdfid': prop:rdfid, 'region': prop:region, 'temperature': prop:temperature, 'terrain_roughness': prop:terrain_roughness, 'wind_speed': prop:wind_speed, 'zone': prop:zone}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:longitude, prop:latitude, prop:color, prop:area, prop:zone, prop:country, prop:community, prop:region, prop:municipality, prop:address, prop:irradiation, prop:temperature, prop:wind_speed, prop:terrain_roughness)
address: str
property area: Area | None

area getter :return: Union[Area, None]

color
property commissioned_date: int
Returns:

property community: Community | None

community getter :return: Union[Community, None]

property country: Country | None

country getter :return: Union[Country, None]

property decommissioned_date: int
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:

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

t

Returns:

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

t

Returns:

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

t

Returns:

property irradiation: float

Get irradiation.

Returns:

float

property irradiation_prof: ProfileFloat

Irradiation profile :return: Profile

property latitude: float

Get latitude.

Returns:

float

property longitude: float

Get longitude.

Returns:

float

modelling_authority: ModellingAuthority | None
property municipality: Municipality | None

municipality getter :return: Union[Municipality, None]

property region: Region | None

region getter :return: Union[Region, None]

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

property temperature: float

Get temperature.

Returns:

float

property temperature_prof: ProfileFloat

Temperature profile :return: Profile

property terrain_roughness: float

Get terrain_roughness.

Returns:

float

property wind_speed: float

Get wind_speed.

Returns:

float

property wind_speed_prof: ProfileFloat

wind_speed_prof profile :return: Profile

property zone: Zone | None

zone getter :return: Union[Zone, None]

VeraGridEngine.Devices.Substation.voltage_level module

class VeraGridEngine.Devices.Substation.voltage_level.VoltageLevel(name='VoltageLevel', idtag: str | None = None, code: str = '', Vnom: float = 1.0, substation: None | Substation = None, build_status: BuildStatus = Commissioned)[source]

Bases: PhysicalDevice

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:Vnom, prop:substation)
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:Vnom, prop:substation)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'Vnom': prop:Vnom, '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, 'substation': prop:substation}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:Vnom, prop:substation)
property Vnom: float

Get Vnom.

Returns:

float

substation: None | Substation

VeraGridEngine.Devices.Substation.voltage_level_template module

class VeraGridEngine.Devices.Substation.voltage_level_template.VoltageLevelTemplate(name='', code='', idtag: str | None = None, device_type=Generic Area, voltage: float = 10, n_bays: int = 1)[source]

Bases: EditableDevice

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:vl_type, prop:voltage, prop:n_bays, prop:add_disconnectors)
CLASS_PROPERTY_LIST: Tuple[GCProp, ...] = (prop:idtag, prop:name, prop:code, prop:rdfid, prop:action, prop:comment, prop:diff_changes, prop:vl_type, prop:voltage, prop:n_bays, prop:add_disconnectors)
CLASS_REGISTERED_PROPERTIES: Dict[str, GCProp] = {'action': prop:action, 'add_disconnectors': prop:add_disconnectors, 'code': prop:code, 'comment': prop:comment, 'diff_changes': prop:diff_changes, 'idtag': prop:idtag, 'n_bays': prop:n_bays, 'name': prop:name, 'rdfid': prop:rdfid, 'vl_type': prop:vl_type, 'voltage': prop:voltage}
LOCAL_PROPERTY_DECLARATIONS: Tuple[GCProp, ...] = (prop:vl_type, prop:voltage, prop:n_bays, prop:add_disconnectors)
action: ActionType
property add_disconnectors: bool

Get add_disconnectors.

Returns:

bool

comment: str
device_type: DeviceType
diff_changes
property n_bays: int

Get n_bays.

Returns:

int

selected_to_merge
property voltage: float

Get voltage.

Returns:

float

Module contents