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
[X] Attached labels, especially loc:: or model:: labels.
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