VeraGridEngine.Compilers.Gslv.Devices package

Submodules

VeraGridEngine.Compilers.Gslv.Devices.areas module

VeraGridEngine.Compilers.Gslv.Devices.areas.add_areas(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[Area, Area][source]

Add GSLV Areas :param circuit: VeraGrid circuit :param gslv_grid: GSLV Circuit :return: Dictionary [VeraGrid area] -> GSLV Area

VeraGridEngine.Compilers.Gslv.Devices.areas.convert_area(area: Area) → Area[source]
Parameters:

area

Returns:

VeraGridEngine.Compilers.Gslv.Devices.associations module

VeraGridEngine.Compilers.Gslv.Devices.associations.add_emission_gases(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[EmissionGas, EmissionGas][source]

Add every VeraGrid emission gas to the target GSLV grid.

Parameters:
  • circuit – VeraGrid circuit.

  • gslv_grid – GSLV circuit.

Returns:

VeraGrid-to-GSLV emission gas lookup.

VeraGridEngine.Compilers.Gslv.Devices.associations.add_fuels(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[Fuel, Fuel][source]

Add every VeraGrid fuel to the target GSLV grid.

Parameters:
  • circuit – VeraGrid circuit.

  • gslv_grid – GSLV circuit.

Returns:

VeraGrid-to-GSLV fuel lookup.

VeraGridEngine.Compilers.Gslv.Devices.associations.add_technologies(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[Technology, Technology][source]

Add every VeraGrid technology to the target GSLV grid.

Parameters:
  • circuit – VeraGrid circuit.

  • gslv_grid – GSLV circuit.

Returns:

VeraGrid-to-GSLV technology lookup.

VeraGridEngine.Compilers.Gslv.Devices.associations.convert_emission_gas(elm: EmissionGas) → EmissionGas[source]

Convert one VeraGrid emission gas into one GSLV emission gas.

Parameters:

elm – VeraGrid emission gas.

Returns:

GSLV emission gas.

VeraGridEngine.Compilers.Gslv.Devices.associations.convert_fuel(elm: Fuel) → Fuel[source]

Convert one VeraGrid fuel into one GSLV fuel.

Parameters:

elm – VeraGrid fuel.

Returns:

GSLV fuel.

VeraGridEngine.Compilers.Gslv.Devices.associations.convert_technology(elm: Technology) → Technology[source]

Convert one VeraGrid technology into one GSLV technology.

Parameters:

elm – VeraGrid technology.

Returns:

GSLV technology.

VeraGridEngine.Compilers.Gslv.Devices.batteries module

VeraGridEngine.Compilers.Gslv.Devices.batteries.add_battery_data(circuit: MultiCircuit, gslv_grid: pg.MultiCircuit, bus_dict: Dict[str, 'pg.Bus'], facility_dict: Dict[Facility, 'pg.Facility'], market_unit_dict: Dict[MarketUnit, 'pg.MarketUnit'], technology_dict: Dict[Technology, 'pg.Technology'], fuel_dict: Dict[Fuel, 'pg.Fuel'], emission_gas_dict: Dict[EmissionGas, 'pg.EmissionGas'], time_series: bool, n_time: int = 1, time_indices: IntVec | None = None, opf_results: OptimalPowerFlowResults | None = None, add_three_phase_data: bool = False) → None[source]

Add every VeraGrid battery to the target GSLV grid.

Parameters:
  • circuit – VeraGrid circuit.

  • gslv_grid – GSLV circuit.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • market_unit_dict – VeraGrid-to-GSLV market-unit lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • fuel_dict – VeraGrid-to-GSLV fuel lookup.

  • emission_gas_dict – VeraGrid-to-GSLV emission gas lookup.

  • time_series – Whether the export is time-series based.

  • n_time – Number of exported time steps.

  • time_indices – Optional time-series selection.

  • opf_results – Optional OPF results.

  • add_three_phase_data – Export sequence impedances needed by three-phase studies.

Returns:

None.

VeraGridEngine.Compilers.Gslv.Devices.batteries.battery_control_mode(elm: Battery) → GeneratorControlMode[source]

Convert one VeraGrid battery control mode to pygslv.

Parameters:

elm – VeraGrid battery.

Returns:

Equivalent pygslv control mode.

VeraGridEngine.Compilers.Gslv.Devices.batteries.convert_battery(k: int, elm: Battery, bus_dict: Dict[str, 'pg.Bus'], facility_dict: Dict[Facility, 'pg.Facility'], market_unit_dict: Dict[MarketUnit, 'pg.MarketUnit'], technology_dict: Dict[Technology, 'pg.Technology'], fuel_dict: Dict[Fuel, 'pg.Fuel'], emission_gas_dict: Dict[EmissionGas, 'pg.EmissionGas'], n_time: int, use_time_series: bool, time_indices: IntVec | None = None, opf_results: OptimalPowerFlowResults | None = None, add_three_phase_data: bool = False) → pg.Battery[source]

Convert one VeraGrid battery into one GSLV battery.

Parameters:
  • k – Battery index.

  • elm – VeraGrid battery.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • market_unit_dict – VeraGrid-to-GSLV market-unit lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • fuel_dict – VeraGrid-to-GSLV fuel lookup.

  • emission_gas_dict – VeraGrid-to-GSLV emission gas lookup.

  • n_time – Number of exported time steps.

  • use_time_series – Whether the export is time-series based.

  • time_indices – Optional time-series selection.

  • opf_results – Optional OPF results.

  • add_three_phase_data – Export sequence impedances needed by three-phase studies.

Returns:

GSLV battery.

VeraGridEngine.Compilers.Gslv.Devices.branch_groups module

VeraGridEngine.Compilers.Gslv.Devices.branch_groups.add_branch_groups(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[BranchGroup, BranchGroup][source]

Add GSLV countries :param circuit: VeraGrid circuit :param gslv_grid: GSLV Circuit :return: Dictionary [VeraGrid country] -> GSLV country

VeraGridEngine.Compilers.Gslv.Devices.branch_groups.convert_branch_group(country: BranchGroup) → BranchGroup[source]
Parameters:

country

Returns:

VeraGridEngine.Compilers.Gslv.Devices.buses module

VeraGridEngine.Compilers.Gslv.Devices.buses.add_buses(circuit: MultiCircuit, gslv_grid: MultiCircuit, area_dict: Dict[Area, Area], zone_dict: Dict[Zone, Zone], substation_dict: Dict[Substation, Substation], voltage_level_dict: Dict[VoltageLevel, VoltageLevel], country_dict: Dict[Country, Country], use_time_series: bool, n_time: int = 1, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None) → Dict[str, Bus][source]

Convert the buses to GSLV buses :param circuit: VeraGrid circuit :param gslv_grid: GSLV circuit :param use_time_series: compile the time series from VeraGrid? otherwise, just the snapshot :param n_time: number of time steps :param time_indices: Array of time indices :param area_dict: Area object translation dictionary :param zone_dict: Zone object translation dictionary :param substation_dict: Substation object translation dictionary :param voltage_level_dict: Voltage level object translation dictionary :param country_dict: Country object translation dictionary :return: bus dictionary buses[uuid] -> Bus

VeraGridEngine.Compilers.Gslv.Devices.buses.convert_bus(elm: Bus, n_time: int, area_dict: Dict[Area, Area], zone_dict: Dict[Zone, Zone], substation_dict: Dict[Substation, Substation], voltage_level_dict: Dict[VoltageLevel, VoltageLevel], country_dict: Dict[Country, Country], time_indices: ndarray[tuple[Any, ...], dtype[int64]], use_time_series: bool) → Bus[source]
Parameters:
  • elm

  • n_time

  • area_dict

  • zone_dict

  • substation_dict

  • voltage_level_dict

  • country_dict

  • time_indices

  • use_time_series

Returns:

VeraGridEngine.Compilers.Gslv.Devices.contingencies module

VeraGridEngine.Compilers.Gslv.Devices.contingencies.add_contingencies(circuit: MultiCircuit, gslv_grid: MultiCircuit, n_time: int, groups_dict: Dict[ContingencyGroup, ContingencyGroup])[source]

Add GSLV ContingenciesGroup :param circuit: VeraGrid circuit :param gslv_grid: GSLV Circuit :param n_time: number of time steps :param groups_dict: Contingency groups dictionary :return: Dictionary [VeraGrid ContingenciesGroup] -> GSLV ContingenciesGroup

VeraGridEngine.Compilers.Gslv.Devices.contingencies.add_contingency_groups(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[ContingencyGroup, ContingencyGroup][source]

Add GSLV ContingenciesGroup :param circuit: VeraGrid circuit :param gslv_grid: GSLV Circuit :return: Dictionary [VeraGrid ContingenciesGroup] -> GSLV ContingenciesGroup

VeraGridEngine.Compilers.Gslv.Devices.contingencies.convert_contingencies(elm: Contingency, n_time: int, groups_dict: Dict[ContingencyGroup, ContingencyGroup]) → Contingency[source]
Parameters:
  • elm

  • n_time

  • groups_dict

Returns:

VeraGridEngine.Compilers.Gslv.Devices.contingencies.convert_contingency_groups(elm: ContingencyGroup) → ContingencyGroup[source]
Parameters:

elm

Returns:

VeraGridEngine.Compilers.Gslv.Devices.controllable_shunts module

VeraGridEngine.Compilers.Gslv.Devices.controllable_shunts.add_controllable_shunts(circuit: MultiCircuit, gslv_grid: MultiCircuit, bus_dict: Dict[str, Bus], facility_dict: Dict[Facility, Facility], technology_dict: Dict[Technology, Technology], time_series: bool, n_time: int = 1, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None, add_three_phase_data: bool = False) → None[source]

Add every VeraGrid controllable shunt to the target GSLV grid.

Parameters:
  • circuit – VeraGrid circuit.

  • gslv_grid – GSLV circuit.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • time_series – Whether the export is time-series based.

  • n_time – Number of exported time steps.

  • time_indices – Optional time-series selection.

  • add_three_phase_data – Export explicit three-phase fields when available.

Returns:

None.

VeraGridEngine.Compilers.Gslv.Devices.controllable_shunts.convert_controllable_shunt(elm: ControllableShunt, bus_dict: Dict[str, Bus], facility_dict: Dict[Facility, Facility], technology_dict: Dict[Technology, Technology], n_time: int, use_time_series: bool, shunt_control_mode_dict: Dict[ShuntControlMode, ShuntControlMode], time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None, add_three_phase_data: bool = False) → ControllableShunt[source]

Convert one VeraGrid controllable shunt into one GSLV controllable shunt.

Parameters:
  • elm – VeraGrid controllable shunt.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • n_time – Number of exported time steps.

  • use_time_series – Whether the export is time-series based.

  • shunt_control_mode_dict – Shunt-control enum translator.

  • time_indices – Optional time-series selection.

  • add_three_phase_data – Export explicit three-phase fields when available.

Returns:

GSLV controllable shunt.

VeraGridEngine.Compilers.Gslv.Devices.countries module

VeraGridEngine.Compilers.Gslv.Devices.countries.add_countries(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[Country, Country][source]

Add GSLV countries :param circuit: VeraGrid circuit :param gslv_grid: GSLV Circuit :return: Dictionary [VeraGrid country] -> GSLV country

VeraGridEngine.Compilers.Gslv.Devices.countries.convert_country(country: Country) → Country[source]
Parameters:

country

Returns:

VeraGridEngine.Compilers.Gslv.Devices.dc_lines module

VeraGridEngine.Compilers.Gslv.Devices.dc_lines.add_dc_lines(circuit: MultiCircuit, gslv_grid: MultiCircuit, bus_dict: Dict[str, Bus], time_series: bool, n_time: int = 1, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None)[source]
Parameters:
  • circuit – VeraGrid circuit

  • gslv_grid – GSLV circuit

  • time_series – compile the time series from VeraGrid? otherwise just the snapshot

  • bus_dict – dictionary of bus id to GSLV bus object

  • n_time – number of time steps

  • time_indices – Array of time indices

VeraGridEngine.Compilers.Gslv.Devices.dc_lines.convert_dc_line(elm: DcLine, bus_dict: Dict[str, Bus], n_time: int, use_time_series: bool, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None) → DcLine[source]
Parameters:
  • elm

  • bus_dict

  • n_time

  • use_time_series

  • time_indices

Returns:

VeraGridEngine.Compilers.Gslv.Devices.facilities module

VeraGridEngine.Compilers.Gslv.Devices.facilities.add_facilities(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[Facility, Facility][source]
Parameters:
  • circuit

  • gslv_grid

Returns:

VeraGridEngine.Compilers.Gslv.Devices.facilities.convert_facility(elm: Facility) → Facility[source]
Parameters:

elm

Returns:

VeraGridEngine.Compilers.Gslv.Devices.generators module

VeraGridEngine.Compilers.Gslv.Devices.generators.add_generators(circuit: MultiCircuit, gslv_grid: pg.MultiCircuit, bus_dict: Dict[str, 'pg.Bus'], facility_dict: Dict[Facility, 'pg.Facility'], market_unit_dict: Dict[MarketUnit, 'pg.MarketUnit'], technology_dict: Dict[Technology, 'pg.Technology'], fuel_dict: Dict[Fuel, 'pg.Fuel'], emission_gas_dict: Dict[EmissionGas, 'pg.EmissionGas'], time_series: bool, n_time: int = 1, time_indices: IntVec | None = None, opf_results: OptimalPowerFlowResults | None = None, add_three_phase_data: bool = False) → None[source]

Add every VeraGrid generator to the target GSLV grid.

Parameters:
  • circuit – VeraGrid circuit.

  • gslv_grid – GSLV circuit.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • market_unit_dict – VeraGrid-to-GSLV market-unit lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • fuel_dict – VeraGrid-to-GSLV fuel lookup.

  • emission_gas_dict – VeraGrid-to-GSLV emission gas lookup.

  • time_series – Whether the export is time-series based.

  • n_time – Number of exported time steps.

  • time_indices – Optional time-series selection.

  • opf_results – Optional OPF results.

  • add_three_phase_data – Export sequence impedances needed by three-phase studies.

Returns:

None.

VeraGridEngine.Compilers.Gslv.Devices.generators.convert_generator(k: int, elm: Generator, bus_dict: Dict[str, 'pg.Bus'], facility_dict: Dict[Facility, 'pg.Facility'], market_unit_dict: Dict[MarketUnit, 'pg.MarketUnit'], technology_dict: Dict[Technology, 'pg.Technology'], fuel_dict: Dict[Fuel, 'pg.Fuel'], emission_gas_dict: Dict[EmissionGas, 'pg.EmissionGas'], n_time: int, use_time_series: bool, time_indices: IntVec | None = None, opf_results: OptimalPowerFlowResults | None = None, add_three_phase_data: bool = False) → pg.Generator[source]

Convert one VeraGrid generator into one GSLV generator.

Parameters:
  • k – Generator index.

  • elm – VeraGrid generator.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • market_unit_dict – VeraGrid-to-GSLV market-unit lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • fuel_dict – VeraGrid-to-GSLV fuel lookup.

  • emission_gas_dict – VeraGrid-to-GSLV emission gas lookup.

  • n_time – Number of exported time steps.

  • use_time_series – Whether the export is time-series based.

  • time_indices – Optional time-series selection.

  • opf_results – Optional OPF results.

  • add_three_phase_data – Export sequence impedances needed by three-phase studies.

Returns:

GSLV generator.

VeraGridEngine.Compilers.Gslv.Devices.generators.generator_control_mode(elm: Generator) → GeneratorControlMode[source]

Convert one VeraGrid generator control mode to pygslv.

Parameters:

elm – VeraGrid generator.

Returns:

Equivalent pygslv control mode.

VeraGridEngine.Compilers.Gslv.Devices.generators.generator_tpe(elm: Generator) → str[source]

Get the selected technology label for a VeraGrid generator.

Parameters:

elm – VeraGrid generator.

Returns:

Name of the strongest technology association, or Other.

VeraGridEngine.Compilers.Gslv.Devices.hvdc_line module

VeraGridEngine.Compilers.Gslv.Devices.hvdc_line.add_hvdcs(circuit: MultiCircuit, gslv_grid: MultiCircuit, bus_dict: Dict[str, Bus], time_series: bool, n_time: int = 1, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None) → None[source]

Add every VeraGrid HVDC line to the target GSLV grid.

Parameters:
  • circuit – VeraGrid circuit.

  • gslv_grid – GSLV circuit.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • time_series – Whether the export is time-series based.

  • n_time – Number of exported time steps.

  • time_indices – Optional time-series selection.

Returns:

None.

VeraGridEngine.Compilers.Gslv.Devices.hvdc_line.convert_hvdc_line(elm: HvdcLine, bus_dict: Dict[str, Bus], n_time: int, use_time_series: bool, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None) → HvdcLine[source]

Convert one VeraGrid HVDC line into one GSLV HVDC line.

Parameters:
  • elm – VeraGrid HVDC line.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • n_time – Number of exported time steps.

  • use_time_series – Whether the export is time-series based.

  • time_indices – Optional time-series selection.

Returns:

GSLV HVDC line.

VeraGridEngine.Compilers.Gslv.Devices.investments module

VeraGridEngine.Compilers.Gslv.Devices.investments.add_investment_groups(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[InvestmentsGroup, InvestmentGroup][source]
Parameters:
  • circuit

  • gslv_grid

Returns:

VeraGridEngine.Compilers.Gslv.Devices.investments.add_investments(circuit: MultiCircuit, gslv_grid: MultiCircuit, groups_dict: Dict[InvestmentsGroup, InvestmentGroup])[source]
Parameters:
  • circuit

  • gslv_grid

  • groups_dict

Returns:

VeraGridEngine.Compilers.Gslv.Devices.investments.convert_investment(elm: Investment, groups_dict: Dict[InvestmentsGroup, InvestmentGroup]) → Investment[source]
Parameters:
  • elm

  • groups_dict

Returns:

VeraGridEngine.Compilers.Gslv.Devices.investments.convert_investment_group(elm: InvestmentsGroup) → InvestmentGroup[source]
Parameters:

elm

Returns:

VeraGridEngine.Compilers.Gslv.Devices.lines module

VeraGridEngine.Compilers.Gslv.Devices.lines.add_lines(circuit: MultiCircuit, gslv_grid: MultiCircuit, bus_dict: Dict[str, Bus], branch_groups_dict: Dict[BranchGroup, BranchGroup], time_series: bool, n_time: int = 1, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None, add_three_phase_data: bool = False) → None[source]
Parameters:
  • circuit – VeraGrid circuit

  • gslv_grid – GSLV circuit

  • time_series – compile the time series from VeraGrid? otherwise just the snapshot

  • bus_dict – dictionary of bus id to GSLV bus object

  • branch_groups_dict – dictionary of converted branch groups

  • n_time – number of time steps

  • time_indices – Array of time indices

  • add_three_phase_data – Export sequence parameters needed by three-phase studies.

Returns:

None.

VeraGridEngine.Compilers.Gslv.Devices.lines.convert_line(elm: Line, n_time: int, bus_dict: Dict[str, Bus], branch_groups_dict: Dict[BranchGroup, BranchGroup], use_time_series: bool, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None, add_three_phase_data: bool = False) → Line[source]

Convert one VeraGrid line into one GSLV line.

Parameters:
  • elm – VeraGrid line.

  • n_time – Number of exported time steps.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • branch_groups_dict – Branch-group lookup.

  • use_time_series – Whether the export is time-series based.

  • time_indices – Optional time-series selection.

  • add_three_phase_data – Export sequence parameters needed by three-phase studies.

Returns:

GSLV line.

VeraGridEngine.Compilers.Gslv.Devices.loads module

VeraGridEngine.Compilers.Gslv.Devices.loads.add_loads(circuit: MultiCircuit, gslv_grid: pg.MultiCircuit, bus_dict: Dict[str, 'pg.Bus'], facility_dict: Dict[Facility, 'pg.Facility'], technology_dict: Dict[Technology, 'pg.Technology'], use_time_series: bool, n_time: int = 1, time_indices: IntVec | None = None, opf_results: OptimalPowerFlowResults | None = None, add_three_phase_data: bool = False) → None[source]

Add every VeraGrid load to the target GSLV grid.

Parameters:
  • circuit – VeraGrid circuit.

  • gslv_grid – GSLV circuit.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • use_time_series – Whether the export is time-series based.

  • n_time – Number of exported time steps.

  • time_indices – Optional time-series selection.

  • opf_results – Optional OPF results.

  • add_three_phase_data – Export explicit three-phase fields when available.

Returns:

None.

VeraGridEngine.Compilers.Gslv.Devices.loads.convert_load(k: int, elm: Load, bus_dict: Dict[str, 'pg.Bus'], facility_dict: Dict[Facility, 'pg.Facility'], technology_dict: Dict[Technology, 'pg.Technology'], n_time: int, use_time_series: bool, time_indices: IntVec | None = None, opf_results: OptimalPowerFlowResults | None = None, add_three_phase_data: bool = False) → pg.Load[source]

Convert one VeraGrid load into one GSLV load.

Parameters:
  • k – Load index.

  • elm – VeraGrid load.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • n_time – Number of exported time steps.

  • use_time_series – Whether the export is time-series based.

  • time_indices – Optional time-series selection.

  • opf_results – Optional OPF results.

  • add_three_phase_data – Export explicit three-phase fields when available.

Returns:

GSLV load.

VeraGridEngine.Compilers.Gslv.Devices.market_units module

VeraGridEngine.Compilers.Gslv.Devices.market_units.add_market_units(circuit: MultiCircuit) → Dict[MarketUnit, MarketUnit][source]

Add every VeraGrid market unit to the target GSLV grid.

Parameters:

circuit – VeraGrid circuit.

Returns:

VeraGrid-to-GSLV market-unit lookup.

VeraGridEngine.Compilers.Gslv.Devices.market_units.convert_market_unit(elm: MarketUnit) → MarketUnit[source]

Convert one VeraGrid market unit into one GSLV market unit.

Parameters:

elm – VeraGrid market unit.

Returns:

GSLV market unit.

VeraGridEngine.Compilers.Gslv.Devices.modelling_authorities module

VeraGridEngine.Compilers.Gslv.Devices.modelling_authorities.add_modelling_authorities(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[ModellingAuthority, ModellingAuthority][source]
Parameters:
  • circuit

  • gslv_grid

Returns:

VeraGridEngine.Compilers.Gslv.Devices.modelling_authorities.convert_modelling_authority(elm: ModellingAuthority) → ModellingAuthority[source]
Parameters:

elm

Returns:

VeraGridEngine.Compilers.Gslv.Devices.municipalities module

VeraGridEngine.Compilers.Gslv.Devices.municipalities.add_municipalities(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[Country, Country][source]

Add GSLV countries :param circuit: VeraGrid circuit :param gslv_grid: GSLV Circuit :return: Dictionary [VeraGrid country] -> GSLV country

VeraGridEngine.Compilers.Gslv.Devices.municipalities.convert_municipality(country: Municipality) → Municipality[source]
Parameters:

country

Returns:

VeraGridEngine.Compilers.Gslv.Devices.regions module

VeraGridEngine.Compilers.Gslv.Devices.regions.add_regions(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[Country, Country][source]

Add GSLV countries :param circuit: VeraGrid circuit :param gslv_grid: GSLV Circuit :return: Dictionary [VeraGrid country] -> GSLV country

VeraGridEngine.Compilers.Gslv.Devices.regions.convert_region(country: Region) → Region[source]
Parameters:

country

Returns:

VeraGridEngine.Compilers.Gslv.Devices.shunts module

VeraGridEngine.Compilers.Gslv.Devices.shunts.add_shunts(circuit: MultiCircuit, gslv_grid: MultiCircuit, bus_dict: Dict[str, Bus], facility_dict: Dict[Facility, Facility], technology_dict: Dict[Technology, Technology], time_series: bool, n_time: int = 1, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None, add_three_phase_data: bool = False) → None[source]

Add every VeraGrid shunt to the target GSLV grid.

Parameters:
  • circuit – VeraGrid circuit.

  • gslv_grid – GSLV circuit.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • time_series – Whether the export is time-series based.

  • n_time – Number of exported time steps.

  • time_indices – Optional time-series selection.

  • add_three_phase_data – Export explicit three-phase fields when available.

Returns:

None.

VeraGridEngine.Compilers.Gslv.Devices.shunts.convert_shunt(elm: Shunt, bus_dict: Dict[str, Bus], facility_dict: Dict[Facility, Facility], technology_dict: Dict[Technology, Technology], n_time: int, use_time_series: bool, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None, add_three_phase_data: bool = False) → Shunt[source]

Convert one VeraGrid shunt into one GSLV shunt.

Parameters:
  • elm – VeraGrid shunt.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • n_time – Number of exported time steps.

  • use_time_series – Whether the export is time-series based.

  • time_indices – Optional time-series selection.

  • add_three_phase_data – Export explicit three-phase fields when available.

Returns:

GSLV shunt.

VeraGridEngine.Compilers.Gslv.Devices.static_generators module

VeraGridEngine.Compilers.Gslv.Devices.static_generators.add_static_generators(circuit: MultiCircuit, gslv_grid: MultiCircuit, bus_dict: Dict[str, Bus], facility_dict: Dict[Facility, Facility], technology_dict: Dict[Technology, Technology], time_series: bool, n_time: int = 1, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None) → None[source]

Add every VeraGrid static generator to the target GSLV grid.

Parameters:
  • circuit – VeraGrid circuit.

  • gslv_grid – GSLV circuit.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • time_series – Whether the export is time-series based.

  • n_time – Number of exported time steps.

  • time_indices – Optional time-series selection.

Returns:

None.

VeraGridEngine.Compilers.Gslv.Devices.static_generators.convert_static_generator(elm: StaticGenerator, bus_dict: Dict[str, Bus], facility_dict: Dict[Facility, Facility], technology_dict: Dict[Technology, Technology], n_time: int, use_time_series: bool, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None) → StaticGenerator[source]

Convert one VeraGrid static generator into one GSLV static generator.

Parameters:
  • elm – VeraGrid static generator.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • facility_dict – VeraGrid-to-GSLV facility lookup.

  • technology_dict – VeraGrid-to-GSLV technology lookup.

  • n_time – Number of exported time steps.

  • use_time_series – Whether the export is time-series based.

  • time_indices – Optional time-series selection.

Returns:

GSLV static generator.

VeraGridEngine.Compilers.Gslv.Devices.substations module

VeraGridEngine.Compilers.Gslv.Devices.substations.add_substations(circuit: MultiCircuit, gslv_grid: MultiCircuit, n_time: int) → Dict[Substation, Substation][source]

Add GSLV substations :param circuit: VeraGrid circuit :param gslv_grid: GSLV Circuit :param n_time: number of time steps :return: Dictionary [VeraGrid Zone] -> GSLV Zone

VeraGridEngine.Compilers.Gslv.Devices.substations.convert_substation(se: Substation, n_time: int) → Substation[source]
Parameters:
  • se

  • n_time

Returns:

VeraGridEngine.Compilers.Gslv.Devices.transformers module

VeraGridEngine.Compilers.Gslv.Devices.transformers.add_transformers(circuit: MultiCircuit, gslv_grid: MultiCircuit, bus_dict: Dict[str, Bus], branch_groups_dict: Dict[BranchGroup, BranchGroup], time_series: bool, n_time: int = 1, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None, override_controls: bool = False, add_three_phase_data: bool = False) → None[source]
Parameters:
  • circuit – VeraGrid circuit

  • gslv_grid – GSLV circuit

  • time_series – compile the time series from VeraGrid? otherwise just the snapshot

  • bus_dict – dictionary of bus id to GSLV bus object

  • branch_groups_dict – dictionary of branch grous converetd

  • n_time – number of time steps

  • time_indices – Array of time indices

  • override_controls – If true the controls are set to Fix

  • add_three_phase_data – Export sequence parameters and winding connections.

Returns:

None.

VeraGridEngine.Compilers.Gslv.Devices.transformers.convert_transformer(elm: Transformer2W, bus_dict: Dict[str, Bus], branch_groups_dict: Dict[BranchGroup, BranchGroup], n_time: int, use_time_series: bool, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None, override_controls: bool, add_three_phase_data: bool = False) → Transformer2W[source]

Convert one VeraGrid two-winding transformer into one GSLV transformer.

Parameters:
  • elm – VeraGrid transformer.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • branch_groups_dict – Branch-group lookup.

  • n_time – Number of exported time steps.

  • use_time_series – Whether the export is time-series based.

  • time_indices – Optional time-series selection.

  • override_controls – Whether transformer control modes must be forced to fixed.

  • add_three_phase_data – Export sequence parameters and winding connections.

Returns:

GSLV transformer.

VeraGridEngine.Compilers.Gslv.Devices.transformers3w module

VeraGridEngine.Compilers.Gslv.Devices.transformers3w.add_transformers3w(circuit: MultiCircuit, gslv_grid: MultiCircuit, bus_dict: Dict[str, Bus], time_series: bool, n_time=1, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None, override_controls=False)[source]
Parameters:
  • circuit – VeraGrid circuit

  • gslv_grid – GSLV circuit

  • time_series – compile the time series from VeraGrid? otherwise just the snapshot

  • bus_dict – dictionary of bus id to GSLV bus object

  • n_time – number of time steps

  • time_indices – Array of time indices

  • override_controls – If true the controls are set to Fix

VeraGridEngine.Compilers.Gslv.Devices.transformers3w.convert_transformer3w(elm: Transformer3W, bus_dict: Dict[str, Bus], n_time: int, use_time_series: bool, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None, override_controls: bool) → Transformer3W[source]
Parameters:
  • elm

  • bus_dict

  • n_time

  • use_time_series

  • time_indices

  • override_controls

Returns:

VeraGridEngine.Compilers.Gslv.Devices.voltage_levels module

VeraGridEngine.Compilers.Gslv.Devices.voltage_levels.add_voltage_levels(circuit: MultiCircuit, gslv_grid: MultiCircuit, substations_dict: Dict[Substation, Substation]) → Dict[VoltageLevel, VoltageLevel][source]

Add GSLV substations :param circuit: VeraGrid circuit :param gslv_grid: GSLV Circuit :param substations_dict: substations mapping dictionary :return: Dictionary [VeraGrid Zone] -> GSLV Zone

VeraGridEngine.Compilers.Gslv.Devices.voltage_levels.convert_voltage_level(elm: VoltageLevel, substations_dict: Dict[Substation, Substation]) → VoltageLevel[source]
Parameters:
  • elm

  • substations_dict

Returns:

VeraGridEngine.Compilers.Gslv.Devices.vsc module

VeraGridEngine.Compilers.Gslv.Devices.vsc.add_vscs(circuit: MultiCircuit, gslv_grid: MultiCircuit, bus_dict: Dict[str, Bus], time_series: bool, n_time: int = 1, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None = None) → None[source]

Add every VeraGrid VSC to the target GSLV grid.

Parameters:
  • circuit – VeraGrid circuit.

  • gslv_grid – GSLV circuit.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • time_series – Whether the export is time-series based.

  • n_time – Number of exported time steps.

  • time_indices – Optional time-series selection.

Returns:

None.

VeraGridEngine.Compilers.Gslv.Devices.vsc.convert_vsc(elm: VSC, bus_dict: Dict[str, Bus], n_time: int, use_time_series: bool, time_indices: ndarray[tuple[Any, ...], dtype[int64]] | None) → Vsc[source]

Convert one VeraGrid VSC into one GSLV VSC.

Parameters:
  • elm – VeraGrid VSC.

  • bus_dict – Bus lookup by VeraGrid id tag.

  • n_time – Number of exported time steps.

  • use_time_series – Whether the export is time-series based.

  • time_indices – Optional time-series selection.

Returns:

GSLV VSC.

VeraGridEngine.Compilers.Gslv.Devices.vsc.convert_vsc_bus_reference(elm: Bus | BranchParent | None, bus_dict: Dict[str, Bus]) → Bus | None[source]

Convert an optional VeraGrid bus reference to a GSLV bus reference.

Parameters:
  • elm – VeraGrid bus reference.

  • bus_dict – GSLV bus lookup by VeraGrid idtag.

Returns:

Matching GSLV bus or None.

VeraGridEngine.Compilers.Gslv.Devices.zones module

VeraGridEngine.Compilers.Gslv.Devices.zones.add_zones(circuit: MultiCircuit, gslv_grid: MultiCircuit) → Dict[Zone, Zone][source]

Add GSLV Zones :param circuit: VeraGrid circuit :param gslv_grid: GSLV Circuit :return: Dictionary [VeraGrid Zone] -> GSLV Zone

VeraGridEngine.Compilers.Gslv.Devices.zones.convert_zone(zone: Zone) → Zone[source]
Parameters:

zone

Returns:

Module contents