fern.simulation.algorithm
Class HybridMaximalTimeStep

java.lang.Object
  extended by fern.simulation.Simulator
      extended by fern.simulation.algorithm.HybridMaximalTimeStep

public class HybridMaximalTimeStep
extends Simulator

This is an modified version of Maximal Time Step Method by Puchalka and Kierzec. Reactions are divided into slow and fast reaction. The slow ones are fired according to Gillespies Direct Method as in GillespieEnhanced, the fast ones are handled by tau leaping. This method can be a substancial improvement on speed when simulating a network composed of different realms of magnitude (e.g. when simulating both gene regulation and metabolism).

For references see J. Puchalka. and A.M. Kierzek, Briding the Gap betwwen Stochastic and Determininistic Regimes in the Kinetic Simulations of the Biochemical Reaction Networks, Biophysical 86, 1357-1372 (2004)

Author:
Florian Erhard
See Also:
GillespieEnhanced, DependencyGraph

Nested Class Summary
 
Nested classes/interfaces inherited from class fern.simulation.Simulator
Simulator.FireType
 
Constructor Summary
HybridMaximalTimeStep(Network net)
           
 
Method Summary
 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
 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 setVolume(double volume)
          Sets the volume of the reaction network.
 
Methods inherited from class fern.simulation.Simulator
addObserver, getAmount, getNet, getNextThetaEvent, getPropensity, getPropensityCalculator, getTime, getVolume, isInterpolateTheta, registerNewTheta, setInterpolateTheta, start, start
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HybridMaximalTimeStep

public HybridMaximalTimeStep(Network net)
Method Detail

initialize

public void initialize()
Description copied from class: Simulator
Initializes the algorithm: Gets called at the very beginning of start

Overrides:
initialize in class Simulator

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

setVolume

public void setVolume(double volume)
Description copied from class: Simulator
Sets the volume of the reaction network.

Overrides:
setVolume in class Simulator
Parameters:
volume - the volume

setAmount

public void setAmount(int species,
                      long amount)
Description copied from class: Simulator
Sets the amount of the given species. Propensities have to be recalculated!

Overrides:
setAmount in class Simulator
Parameters:
species - species index
amount - amount of species
See Also:
AmountManager.setAmount(int, long)

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