Skip to content

Commit fb9fc58

Browse files
first commit for protection level
1 parent 675ada7 commit fb9fc58

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

SS_benchfore.tpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2836,6 +2836,14 @@ FUNCTION void Get_Forecast()
28362836
(1.0) * (1.0 - join2); // scale right side
28372837
break;
28382838
}
2839+
//AEP AEP Add here (protection level)
2840+
if (H4010_prot > 0)
2841+
{
2842+
join1 = 1.0 / (1. + mfexp(20.0 * (SSB_current - H4010_prot * temp)));
2843+
//cout << ABC_buffer(y) << endl;
2844+
ABC_buffer(y) = 0.0001*join1 + (1.0 - 0.0001)*(1.0 - join1)*ABC_buffer(y);
2845+
//cout << SSB_current << " " << (SSB_current - H4010_prot * temp) << " " << SSB_current/temp << " " << join1 << " " << ABC_buffer(y) << endl;
2846+
}
28392847
}
28402848
} // end calc of ABC buffer
28412849
else

SS_readdata_330.tpl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4029,7 +4029,9 @@
40294029
int Rebuild_Yinit;
40304030
int HarvestPolicy; // 0=none; 1=west coast adjust catch; 2=AK to adjust F
40314031
number H4010_top_rd;
4032+
number H4010_bot_rd;
40324033
number H4010_bot;
4034+
number H4010_prot;
40334035
number H4010_scale;
40344036
number H4010_scale_rd;
40354037
int Do_Impl_Error;
@@ -4283,8 +4285,17 @@
42834285
echoinput << HarvestPolicy << " # echoed HarvestPolicy " << endl;
42844286
*(ad_comm::global_datafile) >> H4010_top_rd; // as fraction of HCR_anchor; use -1 as legacy approach to set H4010_top to Bmsy/SSB_unf
42854287
echoinput << H4010_top_rd << " # echoed control rule inflection" << endl;
4286-
*(ad_comm::global_datafile) >> H4010_bot;
4287-
echoinput << H4010_bot << " # echoed control rule cutoff " << endl;
4288+
*(ad_comm::global_datafile) >> H4010_bot_rd;
4289+
echoinput << H4010_bot_rd << " # echoed control rule cutoff " << endl;
4290+
H4010_bot = H4010_bot_rd;
4291+
H4010_prot = -1000;
4292+
if (H4010_bot < 0)
4293+
{
4294+
H4010_bot *= -1;
4295+
echoinput << H4010_bot << " # echoed control rule cutoff " << endl;
4296+
*(ad_comm::global_datafile) >> H4010_prot;
4297+
echoinput << H4010_prot << " # echoed protection level cutoff " << endl;
4298+
}
42884299
*(ad_comm::global_datafile) >> H4010_scale_rd;
42894300
H4010_scale = H4010_scale_rd;
42904301
echoinput << H4010_scale << " # echoed control rule scalar " << endl;

SS_write_ssnew.tpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,11 @@ FUNCTION void write_nucontrol()
16491649
NuFore << HarvestPolicy << " # Control rule method (0: none; 1: ramp does catch=f(SSB), buffer on F; 2: ramp does F=f(SSB), buffer on F; 3: ramp does catch=f(SSB), buffer on catch; 4: ramp does F=f(SSB), buffer on catch) " << endl;
16501650
NuFore << "# values for top, bottom and buffer required, but not used when Policy=0" << endl;
16511651
NuFore << H4010_top_rd << " # Control rule inflection for constant F (as frac of HCR_anchor, see below); must be > control rule cutoff" << endl;
1652-
NuFore << H4010_bot << " # Control rule cutoff for no F (as frac of HCR_anchor, e.g. 0.10) " << endl;
1652+
NuFore << H4010_bot_rd << " # Control rule cutoff for no F (as frac of HCR_anchor, e.g. 0.10); negative value to also invoke read of protection level " << endl;
1653+
if (H4010_bot_rd < 0)
1654+
{ NuFore << H4010_prot << " # AK protection level: control rule level below which F goes to 0.0001" << endl;}
1655+
else
1656+
{ NuFore << " # placeholder for AK protection level: control rule level below which F goes to 0.0001" << endl;}
16531657
NuFore << H4010_scale_rd << " # Buffer: enter Control rule target as fraction of Flimit (e.g. 0.75), negative value invokes list of [year, scalar]. -year fills from year to YrMax " << endl;
16541658
NuFore << "# Also see HCR_anchor below to use virgin vs benchmark SSB or Bmsy as basis for inflection and cutoff" << endl;
16551659
if (H4010_scale_rd < 0)

0 commit comments

Comments
 (0)