ecoli.processes.partition

Partitioning Processes

This bundle of processes includes Requester, Evolver, and PartitionedProcess. PartitionedProcess is the inherited base class for all Processes that can be partitioned; these processes provide calculate_request or evolve_state methods, rather than the usual Process next_update.

A PartitionedProcess can be passed into a Requester and Evolver, which call its calculate_request and evolve_state methods in coordination with an Allocator process, which reads the requests and allocates molecular counts for the evolve_state.

class ecoli.processes.partition.Evolver(parameters=None)[source]

Bases: Step

Evolver Step

Accepts a PartitionedProcess as an input, and runs in coordination with an Requester that uses the same PartitionedProcess.

defaults: Dict[str, Any]
{'process': None}
next_update(timestep, states)[source]
ports_schema()[source]
update_condition(timestep, states)[source]

See update_condition().

class ecoli.processes.partition.PartitionedProcess(parameters=None)[source]

Bases: Process

Partitioned Process Base Class

This is the base class for all processes whose updates can be partitioned.

abstract calculate_request(timestep, states)[source]
abstract evolve_state(timestep, states)[source]
next_update(timestep, states)[source]
abstract ports_schema()[source]
class ecoli.processes.partition.Requester(parameters=None)[source]

Bases: Step

Requester Step

Accepts a PartitionedProcess as an input, and runs in coordination with an Evolver that uses the same PartitionedProcess.

defaults: Dict[str, Any]
{'process': None}
next_update(timestep, states)[source]
ports_schema()[source]
update_condition(timestep, states)[source]

Implements variable timestepping for partitioned processes

Vivarium cycles through all :py:class:~vivarium.core.process.Step` instances every time a Process instance updates the simulation state. When that happens, Vivarium will only call the next_update() method of this Requester if update_condition returns True.

Each process has access to a process-specific next_update_time store and the global_time store. If the next update time is less than or equal to the global time, the process runs. If the next update time is ever earlier than the global time, this usually indicates that the global clock process is runnnig with too large a timestep, preventing accurate timekeeping.