Having a per-year parameter for projections is an obvious thing to want to do, but quite tricky currently, with constructs like:-
hr_vec <- g3_formula(
g3_param_table('project_hr',
expand.grid(cur_year = seq(end_year + 1L, end_year + py)),
ifmissing = 0),
py = num_project_years)
This isn't obviously solved, because "project_years" is itself a parameter, and so can't be used to redefine how many parameters a model has.
Some variously-baked ideas:
- Force models to use a hard-coded project_years (which is unlikely to be popular.
- Add a "max_project_years" option to g3a_time which is hard-coded like the project_years, that a
g3_parameterized(by_year = "project" )) could use?
- A data update mechanism that checks dimensions match before allowing update. Use this to allow modification of start_year/end_year/project_years.
- Encourage use of
g3_timeareadata for cases like the above.
- Do we actually want a fishingyear option, rather than calendar year?
Having a per-year parameter for projections is an obvious thing to want to do, but quite tricky currently, with constructs like:-
This isn't obviously solved, because "project_years" is itself a parameter, and so can't be used to redefine how many parameters a model has.
Some variously-baked ideas:
g3_parameterized(by_year = "project" ))could use?g3_timeareadatafor cases like the above.