ajsims1704 / rdecision

Decision Analytic Modelling In Health Economics
1 stars 0 forks source link

Class SemiMarkovModel does not provide elapsed time or cycle number #9

Closed ajsims1704 closed 1 month ago

ajsims1704 commented 1 month ago

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.

ajsims1704 commented 1 month ago

Added get_cycle to class SemiMarkovModel to query the current cycle number. There is already a method get_elapsed to query the elapsed time,