Skip to content

Ensemble specification

Tim Vaughan edited this page Jun 18, 2014 · 3 revisions

The Ensemble simulation specifies a number of Trajectory simulations under the same model. At the outermost level, it is defined using the following <run> element:

    <run spec='Ensemble'
         nTraj="INTEGER"
         simulationTime="DOUBLE"
         nSamples="INTEGER"
         seed="INTEGER"
         recordTrajLogP="BOOLEAN"
         verbosity="INTEGER">

      <!-- Stepper-->

      <!-- Stochastic Model -->

      <!-- Initial State -->

      <!-- Population End Conditions-->

      <!-- Outputs-->

    </run>

The nTraj attribute specifies the total number of trajectories that should be calculated. Note that trajectories rejected due to a rejection end condition do not count toward the total number.

The simulationTime attribute specifies the length of time the simulation is run for. This becomes a maximum time when other explicit end conditions are included.

The nSamples attribute sets a fixed number of evenly spaced population size samples to record. If this is left unspecified, the number of samples will depend on the particular "stepper" algorithm used to stochastically increment the state. (The default is Gillespie's stochastic simulation algorithm, in which case the population sizes are recorded following every reaction event.)

If provided, the values of the seed attribute is used to initialize the random number generator. If this is absent, a different seed is selected every time the simulation is run.

The optional recordTrajLogP attribute is used to tell MASTER to compute the probability density of each simulated trajectory. (Note that these densities will be approximate if an approximate stochastic integration stepper is used. The resulting density is recorded the file produced by any JSON output element. The default value of this attribute is "false".

The verbosity attribute determines the amount of descriptive output to send to the screen during the simulation, on a scale of 0-3 where 0 means no output causes a maximum amount of output to be displayed.

The following elements are described in detail on their own pages:

Note that only the model and initial state are absolutely mandatory - all other elements and attributes are optional. However, certain combinations of elements and attributes do not make sense. In particular, an error will be raised if simulationTime is unspecified and no end conditions are included, as this will result in an unending calculation. Additionally, while it is possible to specify no output elements, there is no point to performing the calculation if at least one is not included.