Simulator#
- class wattson.cosimulation.simulators.simulator.Simulator#
Bases:
WattsonQueryHandler
A Simulator handles the simulation or emulation of one or multiple aspects of the co-simulation. Wattson distinguishes between network and physical simulators, where the default option for the network is an emulation.
Methods
If set, returns the ConfigurationStore used by this simulator
Returns a set of node identifiers that the simulation control server waits for to be connected.
get_simulator_type
Returns the working directory of this simulator.
Configures this simulator based on the scenario configuration in the given path.
send_notification
Sets the ConfigurationStore for this Simulator to use
set_controller
Sets the working directory for this simulator.
Starts the simulator / emulator.
Stops the simulator / emulator.
Attributes
wattson_time
- __init__()#
- get_configuration_store() ConfigurationStore | None #
If set, returns the ConfigurationStore used by this simulator
- abstract get_simulation_control_clients() Set[str] #
Returns a set of node identifiers that the simulation control server waits for to be connected.
- get_working_directory() Path #
Returns the working directory of this simulator. If none has been set, a FileNotFoundError is raised. :return: The current working directory of this simulator.
- abstract 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.
- set_configuration_store(configuration_store: ConfigurationStore | None)#
Sets the ConfigurationStore for this Simulator to use
- Parameters:
configuration_store (Optional[ConfigurationStore]) –
- set_working_directory(working_directory: Path)#
Sets the working directory for this simulator. This is not (necessarily) the python working directory, but a directory for the simulator to use for, e.g., storing artifacts.
- Parameters:
working_directory (Path) – The directory to use
- abstract start()#
Starts the simulator / emulator. :return:
- abstract stop()#
Stops the simulator / emulator. :return: