OptimalTransportSSA (OTSSA)

The OptimalTransport diffusion (OTSSA) solver attempts to automatically choose between the TransportSSA (ISSA) [1] and Diffusive finite state projection (DFSP) [2] solvers. Diffusion events are modeled as particles that transition to neighboring locales. The ISSA method is ideally suited for systems with a large number of particles, on the order of thousands of particles or more at each locale. On the other hand, DFSP is ideally suited for systems with a small number of particles, on the order of tens or hundreds of particles. OTSSA will attempt to dynamically choose which of the above solvers to use per time step. This solver is recommended if you do not know whether the system contains a small or large number of particles, or if you know that the system will evolve with both large and small populations.

Diffusion solver errors are all first-order in time and second-order in space, and are therefore similar to using one of the leaping algorithms for the simulation of diffusion processes. However, the diffusion methods execute single reaction events per time step, as opposed to leaping algorithms that execute multiple reaction events per time step, and are therefore useful if you choose to capture detailed events.

Parameter

Data type

Default

Description

solver

string

NA

OTSSA, OptimalTransportSSA, and DFSPPrime are all valid names to run this solver.

epsilon

float

0.01

Determines the error of the approximation; accepts values greater than 0 and much less than 1. A value of close to 0 is equivalent to a Gillespie (SSA) simulation and a value close to 1 is the most aggressive speedup (and largest error). We do not recommend changing this value.

greenFunctionIterations

integer

100

The number of iterations used to compute the fundamental solution of the diffusion equation; accepts values between 1 and infinity.

transportSSAThreshold

integer

uMax * graphDimension, where graphDimension is the dimension of the diffusion problem (calculated internally using the number of neighbors)

The threshold for choosing when to run TransportSSA vs. DFSP. We do not recommend changing the default value.

verbose

bool

false

If true, extra information is printed to the command line, which can be useful for debugging or testing the solver.

Example

The .cfg file example below is followed by a portion of an an .emodl file to show how diffusive events are specified. D represents the diffusion coefficient and that the reactions specify transitions of species A to neighboring locales.

{
    "duration" : 1024,
    "runs"   : 512,
    "solver" : "otssa",
    "dfsp" : {
        "umax" : 120,
        "verbose" : false
    },
    "otssa" : {
        "verbose" : false
    },
    "tssa" : {
        "epsilon" : 0.01,
        "greensFunctionIterations" : 100,
        "verbose" : false
    } 
} 
(locale site-1)
(set-locale site-1)
(species A::1 1000)

(locale site-2)
(set-locale site-2)
(species A::2 1000)

(reaction A1->A2 (A::1) (A::2) (* D A::1))
(reaction A2->A1 (A::2) (A::1) (* D A::2))