Crate sosa

Crate sosa 

Source
Expand description

The stochastic simulation algorithm (SSA) with a Monte-Carlo generating method.

§Example

sosa allows using the SSA with agents that carry some individual proprieties evolving over time.

Consider for example human cells which reproduce asexually and are thought to acquire new point mutations in their genome upon cell division. We could be interested in tracking the evolution in the number of mutations over time, as cells reproduce. Moreover, cells can reproduce at different rates on average, e.g. cells carrying special mutations can reproduce faster compared to other cells. In this case, we can use sosa to perform SSA and at the same time track those mutations over time taking into account the different proliferation rates.

Note that if we are just interested in tracking the number of individuals over time, without taking into consideration the indiviual proprities of the agents, then rebop should be used instead of sosa.

Structs§

CurrentState
The current state of a Markov process.
IterTime
NextReaction
The next reaction sampled by the SSA.
Options
ReactionRates
The rate of a reaction is the average number of occurrence of that reaction in a time-unit.

Enums§

SimState
Whether to stop or continue the simulation.
StopReason

Traits§

AdvanceStep
Perform an iteration of the SSA.

Functions§

exprand
Generates a random waiting time using the exponential waiting time with parameter lambda of Poisson StochasticProcess.
simulate
The main loop running one realisation of a stochastic process with NB_REACTIONS possible REACTIONs.
write2file
Write vector of float into new file with a precision of 4 decimals. Write NAN if the slice to write to file is empty.

Type Aliases§

NbIndividuals
Number of individuals present in the system.