spedygiorgio / markovchain

Easy Handling Discrete Time Markov Chains
https://spedygiorgio.github.io/markovchain/
Other
105 stars 40 forks source link

Corrected bug for continuous time Markov chain simulation with absorb… #221

Closed ntguardian closed 1 month ago

ntguardian commented 1 month ago

…ing states

rtcmc originally could not handle continuous time Markov chains with absorbing states because rexp cannot work with rate zero parameters, which would be input for continuous time Markov chains. Added fix that checks for transition rate of 0 and makes transition time Inf if so. Chain will terminate early if it reaches an absorbing state.

spedygiorgio commented 1 month ago

Thank you for your support, @ntguardian would you like to add your name to the package contributors (see the DESCRIPTION file)?