c++ index misalignment occurs when updated time-variation adds new rates to the simulation history after convolutions and/or lagged differences have been specified #226
Create model with convolutions and/or lagged differences
Update params_timevar with parameters that add new rates to the simulation history
Simulate or calibrate
Actual result: c++ indices pointing to convolutions and/or lagged differences are misaligned, causing bad simulations and fits
Expected results: indices are appropriately updated when params_timevar is updated
Fix: added regen_sim_report_expr function, which is similar to regen_rates. The need for this fix is further evidence that the model definition steps involve too much processing of user input.
Steps:
Actual result: c++ indices pointing to convolutions and/or lagged differences are misaligned, causing bad simulations and fits
Expected results: indices are appropriately updated when params_timevar is updated
Fix: added
regen_sim_report_expr
function, which is similar toregen_rates
. The need for this fix is further evidence that the model definition steps involve too much processing of user input.Discovered by @papsti on https://github.com/wzmli/ontario_tmb_condense