vivarium.core.process module¶
Process and Compartment Classes¶
-
class
vivarium.core.process.
Generator
(config)[source]¶ Bases:
object
Generator parent class
All compartment classes must inherit from this class.
-
defaults
= {}¶
-
generate
(config=None, path=())[source]¶ Generate processes and topology dictionaries for the compartment
- Parameters
- Returns
Dictionary with two keys:
processes
, which has a value of a processes dictionary, andtopology
, which has a value of a topology dictionary. Both are suitable to be passed to the constructor forvivarium.core.experiment.Experiment
.- Return type
-
generate_processes
(config)[source]¶ Generate processes dictionary
Every subclass must override this method.
-
-
class
vivarium.core.process.
Process
(parameters=None)[source]¶ Bases:
vivarium.core.process.Generator
-
defaults
= {}¶
-
local_timestep
()[source]¶ Returns the favored timestep for this process. Meant to be overridden in subclasses, unless 1.0 is a happy value.
-
next_update
(timestep, states)[source]¶ Find the next update given the current states this process cares about. This is the main function a new process would override.
-
ports_schema
()[source]¶ ports_schema returns a dictionary that declares which states are expected by the processes, and how each state will behave.
- state keys can be assigned properties through schema_keys declared in Store:
‘_default’ ‘_updater’ ‘_divider’ ‘_value’ ‘_properties’ ‘_emit’ ‘_serializer’
-