SciCompMod / memilio

Modular spatio-temporal models for epidemic and pandemic simulations
https://scicompmod.github.io/memilio/
Apache License 2.0
52 stars 15 forks source link

IDE model simulation does not work under some conditions #1034

Closed lenaploetzke closed 1 month ago

lenaploetzke commented 1 month ago

Motivation / Current Behaviour

Currently, we have that in the function compute_compartment_from_flows(), the idx_TransitionDistribution2 is set to 0 if not stated otherwise. On the other hand, it is not necessary nor specified in the check_constraints() function that the TransitionDistribution for SusceptibleToExposed is a StateAgeFunction of Type b). For example, if you use ConstantFunction for TransitionDistribution[0], the simulation will not work properly because the maximum support of the ConstantFunction is used.

Enhancement description

A quick fix should be to include an if clause for the calculation of calc_time in compute_compartment_from_flows().

Additional context

No response

Checklist