Step

object Step

Functions which accept a Spn and return a function for simulating from the transition kernel of that model

class Object
trait Matchable
class Any

Value members

Concrete methods

def cle(n: Spn[DoubleState], dt: Double): (DoubleState, Time, Time) => DoubleState

An Euler-Maruyama simulation of a CLE approximation to the provided Spn.

An Euler-Maruyama simulation of a CLE approximation to the provided Spn.

Value Params
dt

The internal time step of the algorithm. Not the same as the deltat of the returned transition kernel.

n

A Spn[DoubleState] model (note that the state must be continous)

Returns

A function with type signature (x0: DoubleState, t0: Time, deltat: Time) => DoubleState which will simulate the state of the system at time t0+deltat given initial state x0 and intial time t0

def euler(n: Spn[DoubleState], dt: Double): (DoubleState, Time, Time) => DoubleState

A simple Euler integration of the continuous deterministic approximation to the provided Spn. Euler methods are well-known to be very unstable, but the function can be useful for getting a basic idea of how the model behaves in the absence of noise.

A simple Euler integration of the continuous deterministic approximation to the provided Spn. Euler methods are well-known to be very unstable, but the function can be useful for getting a basic idea of how the model behaves in the absence of noise.

Value Params
dt

The internal time step of the algorithm. Not the same as the deltat of the returned transition kernel.

n

A Spn[DoubleState] model (note that the state must be continous)

Returns

A function with type signature (x0: DoubleState, t0: Time, deltat: Time) => DoubleState which will simulate the state of the system at time t0+deltat given initial state x0 and intial time t0

def gillespie(n: Spn[IntState], minH: Double, maxH: Double): (IntState, Time, Time) => IntState

The Gillespie algorithm, sometimes known as the direct method, or the stochastic simulation algorithm (SSA)

The Gillespie algorithm, sometimes known as the direct method, or the stochastic simulation algorithm (SSA)

Value Params
maxH

Threshold for terminating simulation early

minH

Threshold for treating hazard as zero

n

A Spn[IntState] model

Returns

A function with type signature (x0: IntState, t0: Time, deltat: Time) => IntState which will simulate the state of the system at time t0+deltat given initial state x0 and intial time t0

def pts(n: Spn[IntState], dt: Double): (IntState, Time, Time) => IntState

A Poisson time-stepping algorithm. Like a tau-leaping algorithm, but with fixed step sizes.

A Poisson time-stepping algorithm. Like a tau-leaping algorithm, but with fixed step sizes.

Value Params
dt

The internal time step of the algorithm. Not the same as the deltat of the returned transition kernel.

n

A Spn[IntState] model

Returns

A function with type signature (x0: IntState, t0: Time, deltat: Time) => IntState which will simulate the state of the system at time t0+deltat given initial state x0 and intial time t0