cellsium.simulation package

Simulation package contains the simulation/simulator-related classes.

class cellsium.simulation.BaseSimulator

Bases: object

add(cell: object) None

Add a cell to the simulation.

Parameters:

cell – Cell

Returns:

None

add_boundary(coordinates: ndarray) None

Add a boundary to the simulation.

Parameters:

coordinates – Coordinates of the boundary

Returns:

None

clear() None

Clear the (world of the) simulation.

Returns:

None

remove(cell) None

Remove a cell from the simulation.

Parameters:

cell – Cell

Returns:

None

step(timestep: float) None

Advance the simulation by a timestep.

Parameters:

timestep – Time passed in seconds

Returns:

None

cellsium.simulation.simulator module

Simulator base classes.

class cellsium.simulation.simulator.Simulation

Bases: object

Simulation represents the simulation state at a certain timepoint, i.e. a World and a time.

class cellsium.simulation.simulator.Simulator

Bases: BaseSimulator

Simulator class, a class serving as interface to World and sub-simulators (such as physical placement), as well as the caller of each cells step function.

add(cell: object) None

Add a cell to the simulation.

Parameters:

cell – Cell

Returns:

None

add_boundary(coordinates: ndarray) None

Add a boundary to the simulation.

Parameters:

coordinates – Coordinates of the boundary

Returns:

None

clear() None

Clear the (world of the) simulation.

Returns:

None

remove(cell: object) None

Remove a cell from the simulation.

Parameters:

cell – Cell

Returns:

None

step(timestep: float = 0.0) Timestep

Advance the simulation by a timestep.

Parameters:

timestep – Time passed in seconds

Returns:

None

class cellsium.simulation.simulator.Timestep(timestep: float, simulation: Simulation, simulator: Simulator)

Bases: object

Timestep is an auxiliary class combining a certain timepoint, simulation and simulator.

property hours: float

The hours passed within this timestep.

Returns:

Hours

simulation
simulator
property time: float

Total simulation time passed in seconds.

Returns:

Seconds

property time_hours: float

Total simulation time passed in hours.

Returns:

Hours

timestep
property world: World
class cellsium.simulation.simulator.World

Bases: object

The World class contains the cells and, if present, the boundaries.

add(cell: object) None

Adds a cell to the World.

Parameters:

cell – Cell

Returns:

None

add_boundary(coordinates: ndarray) None

Add a boundary to the simulation.

Parameters:

coordinates – Coordinates of the boundary.

Returns:

None

clear() None

Resets the World.

Returns:

None

commit() None

Commits a step. Cells to be added, and cells to be removed, will only be applied once commit is called.

Returns:

None

copy() World

Creates a copy of thw World.

Returns:

Copy of the World

remove(cell: object) None

Removes a cell from the world.

Parameters:

cell – Cell

Returns:

None