-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perfomance: Removing age looping / order of stock dimensions #134
Comments
lentinj
added a commit
that referenced
this issue
May 7, 2024
substitute "default" / "missing" into subset expressions, so you can specify "default + 1" as well as "default". Add "vec" parameter so you can subset all dimensions up to a given one, as well as all/nothing.
lentinj
added a commit
that referenced
this issue
May 7, 2024
stock_ss() now has enough flexibility to replace action_age's custom shenanigans, so rewrite with stock_ss() Use "vec = age", rather than "vec = all", so we no longer have to have age dimensions at the start.
lentinj
added a commit
that referenced
this issue
May 7, 2024
lentinj
added a commit
that referenced
this issue
May 7, 2024
Without an age dimension, the stock_ss() calls will fail, but it's not a sensible thing to do in the first place. Fail with an informative error message.
lentinj
added a commit
that referenced
this issue
May 7, 2024
Without an age dimension, the stock_ss() calls will fail, but it's not a sensible thing to do in the first place. Fail with an informative error message.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@bthe mentioned that a model without age optimises significantly faster. In general removing the age loops when not required is hard, but there's a bunch of housekeeping in predation that could do
stock_ssinv(stock__predby_predstock, 'area')
instead ofstock_ss(stock__predby_predstock)
, and remove the need for looping over each age this way.However, TMB say no:-
Age being on the end means that bumping everything up one is a much easier operation, but maybe it's a poor choice in retrospect? There's always going to be more age dimensions than area.
The text was updated successfully, but these errors were encountered: