Skip to content

populationEndCondition

tgvaughan edited this page Jan 28, 2013 · 2 revisions

A <populationEndCondition> element is used to tell MASTER that a stochastic trajectory should terminate when the size of a particular population (or sum of multiple population sizes) is reached. It takes the following form:

    <populationEndCondition spec='PopulationEndCondition'
                            threshold='DOUBLE'
                            exceedCondition='BOOLEAN'
                            isRejection='BOOLEAN'>
      <!-- one or more <population> elements -->
    </populationEndCondition>

The threshold attribute determines the population size value above or below which the end condition will be met. The default is for the condition to be met when the population size is found anywhere below the value. If instead one wishes to have a condition met when the population exceeds the threshold, set the exceedCondition attribute to "true".

The isRejection attribute specifies what MASTER does when the end condition is met. The default behaviour is to retain any results recorded for this trajectory up until this point. Setting isRejection causes MASTER to instead discard any of these results and to restart the simulation. This can be used to condition on the end condition never being met. (For example, one might want to condition on the survival of a population by introducing an end condition which is met when the population size reaches zero.)

One or more population elements are used to specify the populations whose sizes are summed to give the value compared to the threshold.