Cross-check *_opts() lists to run the ringbp model
Arguments
- delays
a
listwith class<ringbp_delay_opts>: the delay distributionfunctions for the ringbp model, returned bydelay_opts(). Contains 4 elements:incubation_period,onset_to_isolation,latent_periodandonset_to_self_isolation- event_probs
a
listwith class<ringbp_event_prob_opts>: the event probabilities for the ringbp model, returned byevent_prob_opts(). Contains 5 elements:asymptomatic,presymptomatic_transmission,alpha,symptomatic_tracedandsymptomatic_self_isolate
Value
TRUE if all the checks pass or an error or warning is thrown if
the simulation options are incompatible.
Details
Currently the only cross-checking is between
onset_to_self_isolation from delay_opts() and
symptomatic_self_isolate from event_prob_opts().
If delays$onset_to_self_isolation carries a cross_checked attribute
set to TRUE, the checks are skipped and TRUE is returned immediately.
This lets scenario_sim() cross-check the options once and then tag
delays so that the per-replicate outbreak_model() calls do not
repeat the check (and re-emit its warning) for every simulation replicate.
The attribute is set on a local copy of delays (a single
scenario_sim() or outbreak_model()) call), and does not persist, so
the warning will be repeated in separate scenario_sim() or
outbreak_model()) calls.