The Vivarium Engine
The engine houses the SimulationContext
– the key vivarium
object
for running and interacting with simulations. It is the top level manager
for all state information in vivarium
. By intention, it exposes a very
simple interface for managing the
simulation lifecycle.
Also included here is the simulation Builder
, which is the main
interface that components use to interact with the simulation framework. You
can read more about how the builder works and what services is exposes
here.
Finally, there are a handful of wrapper methods that allow a user or user tools to easily setup and run a simulation.
- class vivarium.framework.engine.SimulationContext(model_specification=None, components=None, configuration=None, plugin_configuration=None, sim_name=None, logging_verbosity=1)[source]
- Parameters:
- class vivarium.framework.engine.Builder(configuration, plugin_manager)[source]
Toolbox for constructing and configuring simulation components.
This is the access point for components through which they are able to utilize a variety of interfaces to interact with the simulation framework.
Notes
A Builder should never be created directly. It will automatically be created during the initialization of a
SimulationContext
- Parameters:
configuration (LayeredConfigTree)
plugin_manager (PluginManager)
- configuration
Provides access to the configuration
- lookup
Provides access to simulant-specific data via the lookup table abstraction.
- value
Provides access to computed simulant attribute values via the value pipeline system.
- population
Provides access to simulant state table via the population system.
- randomness
Provides access to the randomness system.
-
time:
TimeInterface
Provides access to the simulation’s clock.
- components
Provides access to the component management system, which maintains a reference to all managers and components in the simulation.
- lifecycle
Provides access to the life-cycle system, which manages the simulation’s execution life-cycle.
- data
Provides access to the simulation’s input data housed in the data artifact.