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§
- Current
State - The current state of a Markov process.
- Iter
Time - Next
Reaction - The next reaction sampled by the SSA.
- Options
- Reaction
Rates - 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.
- Stop
Reason
Traits§
- Advance
Step - Perform an iteration of the SSA.
Functions§
- exprand
- Generates a random waiting time using the exponential waiting time with
parameter
lambdaof Poisson StochasticProcess. - simulate
- The main loop running one realisation of a stochastic process with
NB_REACTIONSpossibleREACTIONs. - 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.