For several reasons, it might be possible that users enter or end up with (small) negative values in populations or parameters (or probabilities lager than 1). As we do not want to work with exceptions (-> potential deadlocks in MPI), we should discuss how to progress here.
For populations, we now return errors if values are smaller than -1e-10, otherwise warnings if the value is set to zero in apply_constraints(). After some consideration, I am unsure if we want to blow up the code similarly for all models. I'd rather go with no. Maybe a slightly bigger refactoring with lambda functions such as in the RSV model might be more suited anyway and would pave the base for these additional changes.
Originally posted by @mknaranja in #1414 (comment)