starling_sim.model_simulator
Module Contents
Classes
The simulator runs a simulation model |
Functions
|
Realises the initialisation, setup, run and output of the simulation |
Attributes
- starling_sim.model_simulator.models_dict
- starling_sim.model_simulator.model_codes
- class starling_sim.model_simulator.ModelSimulator(model)
The simulator runs a simulation model
- init_simulator_from_parameters
- get_model_class
- setup_simulation()
Prepares the simulation model for running
- run_simulation()
Call the run method of the simulation model
- generate_output()
Generates an output of the simulation at its current state
- static init_simulator_from_parameters(simulation_scenario, pkg)
Returns a simulator initialised according to the model code contained in the given parameters
- Parameters:
simulation_scenario – SimulationParameters containing “code”
pkg – name of the source package
- Returns:
ModelSimulator object
- static get_model_class(model_code, pkg)
Get the Model class of the simulation model.
- Parameters:
model_code – model code
pkg – name of the source package
- Returns:
SimulationModel subclass
- starling_sim.model_simulator.launch_simulation(scenario_path, pkg)
Realises the initialisation, setup, run and output of the simulation using the given parameters file. Displays log of execution times
- Parameters:
scenario_path – path to scenario folder
pkg – name of the source package