gadget-framework / gadget3

TMB-based gadget implemtation
GNU General Public License v2.0
8 stars 6 forks source link

Shorten final year of model #67

Closed lentinj closed 2 years ago

lentinj commented 2 years ago

Currently:

total_steps <- length(step_lengths) * (end_year - start_year + project_years) + length(step_lengths) - 1L

i.e. end_year is inclusive, and we run to the end of the final year (the final length+1).

Add an option to vary the final clause, i.e. allow the final year to stop short.

lentinj commented 2 years ago

@bthe @willbutler42 I'm thinking of renaming the steps g3a_time() paramter to ``step_lengths, to match what it's called in the model. Any complaints?

I don't think it'll affect anything in gadgetutils or gadget-models, from what I can see they don't refer to it by position anyway.

lentinj commented 2 years ago

I've renamed to step_lengths, if we don't do it now then it'll be too late.

There's also a new final_year_steps option, that does what you (hopefully) expect.