public class GillespieEnhanced extends Simulator
Take care with the option efficientlyAdaptSum: if it is true, it is possible that the sum become numerically unstable and the simulation fails, but especially for sparse networks it should be much more efficient.
For references see Daniel T. Gillespie., A General Method for Numerically Simulating the Stochastic Time Evolution of Coupled Chemical Reactions, J.Comp.Phys. 22, 403 (1976) and M.A.Gibson and J.Bruck, Efficient Exact Stochastic Simulation of Chemical Systems with Many Species and Many Channels, J.Phys.Chem.A., Vol 104, no 9, 2000
GillespieSimple,
DependencyGraphSimulator.FireType| Constructor and Description |
|---|
GillespieEnhanced(Network net) |
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Gets the name of the algorithm.
|
void |
initialize()
Initializes the algorithm:
set t=0reset the
AmountManagerrecalculate the propensities
Gets called at the very beginning of start |
boolean |
isEfficientlyAdaptSum() |
void |
performStep(SimulationController control)
Performs one simulation step.
|
void |
reinitialize()
Reset propensities when a event has been executed.
|
void |
setAmount(int species,
long amount)
Sets the amount of the given species.
|
void |
setEfficientlyAdaptSum(boolean efficientlyAdaptSum) |
void |
setVolume(double volume)
Sets the volume of the reaction network.
|
addObserver, getAmount, getNet, getNextThetaEvent, getPropensity, getPropensityCalculator, getTime, getVolume, initializePropensities, isInterpolateTheta, postRun, preRun, registerNewTheta, run, setInterpolateTheta, setStochasticSeed, start, startpublic GillespieEnhanced(Network net)
public void initialize()
SimulatorAmountManagerstartinitialize in class Simulatorpublic void reinitialize()
Simulatorreinitialize in class Simulatorpublic void performStep(SimulationController control)
SimulatorSimulator.setAmount(int, long)
and Simulator.setVolume(double) if they need correct values!performStep in class Simulatorcontrol - the simulators controllerpublic void setVolume(double volume)
Simulatorpublic void setAmount(int species,
long amount)
SimulatorsetAmount in class Simulatorspecies - species indexamount - amount of speciesAmountManager.setAmount(int, long)public String getName()
Simulatorpublic boolean isEfficientlyAdaptSum()
public void setEfficientlyAdaptSum(boolean efficientlyAdaptSum)
Copyright © 2007–2021. All rights reserved.