libmuscle.runner module
A simple runner for Python-only models.
Starting instances is out of scope for MUSCLE3, but is also very useful for testing and prototyping. So we have a little bit of support for it in this module.
- libmuscle.runner.run_simulation(configuration: Document, implementations: Dict[str, Callable]) None[source]
Runs a simulation with the given configuration and instances.
The yMMSL document must contain a complete configuration.
This function will start the necessary instances described in the configuration. To do so, it needs the corresponding implementations, which are given as a dictionary mapping the implementation name to a Python function (or any callable).
- Parameters:
configuration – A description of the model and settings, either v0.1 or v0.2.
instances – A dictionary of instances to run.