PowerGridSimulator#

class wattson.powergrid.simulator.power_grid_simulator.PowerGridSimulator(grid_model_class: ~typing.Type[~powerowl.layers.powergrid.power_grid_model.PowerGridModel] = <class 'powerowl.simulators.pandapower.pandapower_grid_model.PandaPowerGridModel'>, **kwargs)#

Bases: PhysicalSimulator

Methods

__init__

disable_export

enable_export

get_noise_manager

get_simulation_control_clients

Returns a set of node identifiers that the simulation control server waits for to be connected.

handle_simulation_control_query

Handles the given WattsonQuery and provides an optional response.

handles_simulation_query_type

Checks whether the physical simulator handles specific SimulationControlQueries.

load_from_grid_model

load_scenario

Configures this simulator based on the scenario configuration in the given path.

queue_iteration_required

start

Starts the simulator / emulator.

stop

Stops the simulator / emulator.

Attributes

grid_model

__init__(grid_model_class: ~typing.Type[~powerowl.layers.powergrid.power_grid_model.PowerGridModel] = <class 'powerowl.simulators.pandapower.pandapower_grid_model.PandaPowerGridModel'>, **kwargs)#
get_simulation_control_clients() Set[str]#

Returns a set of node identifiers that the simulation control server waits for to be connected.

handle_simulation_control_query(query: WattsonQuery) WattsonResponse | None#

Handles the given WattsonQuery and provides an optional response. If the query type is not supported, this should raise an InvalidSimulationControlQueryException.

Parameters:

query (WattsonQuery) –

handles_simulation_query_type(query: WattsonQuery | Type[WattsonQuery]) bool#

Checks whether the physical simulator handles specific SimulationControlQueries.

Parameters:

query (Union[WattsonQuery, Type[WattsonQuery]]) – The query instance or class to be checked.

Returns:

Whether this simulator can handle this query type

Return type:

bool

load_scenario(scenario_path: Path)#

Configures this simulator based on the scenario configuration in the given path.

Parameters:

scenario_path (Path) – The path where the scenario configuration is stored.

start()#

Starts the simulator / emulator. :return:

stop()#

Stops the simulator / emulator. :return: