-
Notifications
You must be signed in to change notification settings - Fork 16
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
convert catchfleet IF statements to lookup table #192
Comments
for fishing fleets, I have started making changes using the following syntax: Then anywhere we want to process only the fishing fleets: This should be more efficient than: unfortunately, this cannot be done by a global search and replace. It may be useful to have an additional index: |
There are 105 instances of My review of the logic beginning on line 356 of readcontrol.ss is that use_morph(g) is ALWAYS true. which means that if a gp (morph) settles in any area (p), then it is "used". I suspect use_morph(g) is a relic from 3.24 birthseason logic and that all 105 of those IF statements can be removed from SS, hopefully for some execution time speed-up. Before I do so, can some of you review my logic. |
for the fleet IF statements the replacement protocol is: or for a specific area, p: |
I took a quick glance through https://github.com/nmfs-stock-synthesis/stock-synthesis/blob/main/SS_readcontrol_330.tpl#L356-L391. I can't claim to understand all the different possibilities of birth season, settlement event, morph, growth-pattern, etc. but your explanation makes sense so I support you removing the |
create useobs_l(1,nfleet,1,nobs) with values 0 or 1 depending on header_l(f,i,3) |
I have created a scenario in which there are some "g" indexes that are not used. produces this g indexing scheme (as shown in echoinput): Take-away:
|
I have completed transition of the fleet IF to Lookup on popdyn and benchmark. I will merge into Main, then leave this issue open for now, but suspect that I will not get back to doing same for the gmorph. |
code like:
for (g=1;g<=gmorph;g++)
if(use_morph(g)>0)
better as:
for (g1=1;g1<=gmorph_use;g1++)
{g=g_use(g1);
.......
similar for fishing fleets
The text was updated successfully, but these errors were encountered: