Modeling the time to the next primary and secondary incident: a semi-Markov stochastic process approach