fern.simulation.algorithm
Class GillespieSimple
java.lang.Object
fern.simulation.Simulator
fern.simulation.algorithm.GillespieSimple
public class GillespieSimple
- extends Simulator
Implementation of Gillespie's Direct method. It is a simple
Monte-Carlo algorithm which draws from a from Gillspie derived distribution
a reaction that will fire and a time at which the reaction will fire.
For reference see Daniel T. Gillespie., A General Method for Numerically Simulating
the Stochastic Time Evolution of Coupled Chemical Reactions, J.Comp.Phys. 22, 403 (1976)
- Author:
- Florian Erhard
Methods inherited from class fern.simulation.Simulator |
addObserver, getAmount, getNet, getNextThetaEvent, getPropensity, getPropensityCalculator, getTime, getVolume, initialize, isInterpolateTheta, registerNewTheta, setAmount, setInterpolateTheta, setVolume, start, start |
GillespieSimple
public GillespieSimple(Network net)
reinitialize
public void reinitialize()
- Description copied from class:
Simulator
- Reset propensities when a event has been executed.
- Specified by:
reinitialize
in class Simulator
performStep
public void performStep(SimulationController control)
- Description copied from class:
Simulator
- Performs one simulation step. Between steps the terminating condition is checked.
The simulators controller is passed, if an extending class wants to check it
within one step. Implementing algorithms cannot be sure that the propensities
are correct at the beginning of a step (e.g. if the volume changed). They should
override
Simulator.setAmount(int, long)
and Simulator.setVolume(double)
if they need correct values!
- Specified by:
performStep
in class Simulator
- Parameters:
control
- the simulators controller
getName
public String getName()
- Description copied from class:
Simulator
- Gets the name of the algorithm.
- Specified by:
getName
in class Simulator
- Returns:
- name of the algorithm