The reset method allows the state populations, cycle number label and elapsed time to be set. Although the current cycle population can be extracted using method get_populations, there are no equivalents for elapsed time or cycle number. This presents a difficulty in a simulation where the population is changed between cycles, but it is desired to continue the simulation, because method reset has default elapsed time and cycle number as zero.
The solution is to provide accessor functions for elapsed time and cycle number and/or to allow those parameters to be set to NULL in method reset, in which case their current values would remain unaltered.
The
reset
method allows the state populations, cycle number label and elapsed time to be set. Although the current cycle population can be extracted using methodget_populations
, there are no equivalents for elapsed time or cycle number. This presents a difficulty in a simulation where the population is changed between cycles, but it is desired to continue the simulation, because methodreset
has default elapsed time and cycle number as zero.The solution is to provide accessor functions for elapsed time and cycle number and/or to allow those parameters to be set to NULL in method
reset
, in which case their current values would remain unaltered.