Casal2 / CASAL2

Integrated Population Dynamics Model (Casal2)
https://casal2.github.io
GNU General Public License v2.0
27 stars 24 forks source link

Casal2 needs to error out when there are multiple parameter transformations or time-varying blocks on a single addressable #407

Open Craig44 opened 2 years ago

Craig44 commented 2 years ago

I have attached two simple models that currently run, but should not be allowed to run, instead Casal2 should error out with a sensible message. It is to do with the TimeVarying and AddressableTransformation classes both have the same underlying issue.

Currently Casal2 will allow users to have multiple @parameter_transformations for the same parameter as well as multiple @time_varying for the same parameter. There should be a check in the managers of these classes to make sure this cannot happen, similar to the @estimate class which will not allow an object to exist in multiple @estimate blocks see here.

Once this is fixed. We should add a unit test running these models with that gtest EXPECT_THROW used here

config_param_trans.zip config_timevary.zip