On cluster, with randomized parameters, there is small chance of hitting the extreme case after an event:
Error in while (t <= age) { : missing value where TRUE/FALSE needed
Calls: <Anonymous> ... resolve.list -> signalConditionsASAP -> signalConditions
In addition: Warning message:
In stats::rexp(1, lamu$prob) : NAs produced
Execution halted
This should be because lamu$prob == 0 .
I think we should add an additional probability-equals-zero check here:
lamu <- lamu_fn(sim, t)
###################################### =>
if (lamu$prob == 0.0) {
return("Simulation got stuck (after event happens)")
}
###################################### <=
t <- t + stats::rexp(1, lamu$prob)
On cluster, with randomized parameters, there is small chance of hitting the extreme case after an event:
This should be because
lamu$prob == 0
.I think we should add an additional probability-equals-zero check here: