Package BIP :: Package SDE :: Module gillespie :: Class Model
[hide private]
[frames] | no frames]

Class Model

source code

Instance Methods [hide private]
 
__init__(self, vnames, rates, inits, tmat, propensity)
vnames: list of strings
source code
 
getStats(self) source code
 
run(self, method='SSA', tmax=10, reps=1, viz=False, serial=False)
Runs the model.
source code
 
GSSA(self)
Gillespie Direct algorithm
source code
Method Details [hide private]

__init__(self, vnames, rates, inits, tmat, propensity)
(Constructor)

source code 
  • vnames: list of strings

  • rates: list of fixed rate parameters

  • inits: list of initial values of variables

  • propensity: list of lambda functions of the form:

    lambda r,ini: some function of rates ans inits.

run(self, method='SSA', tmax=10, reps=1, viz=False, serial=False)

source code 
Runs the model.
Parameters:
  • method - String specifying the solving algorithm. Currently only 'SSA'
  • tmax - duration of the simulation.
  • reps - Number of replicates.
  • viz - Boolean. Whether to show graph of each replicate during simulation
  • serial - Boolean. False to run replicate in parallel when more than one core is a vailable. True to run them serially (easier to debug).
Returns:
a numpy array of shape (reps,tmax,nvars)