Skip to content

Commit 633cb7d

Browse files
Revert "revise benchmark code for SRR 7"
This reverts commit 8c429d7.
1 parent 6176061 commit 633cb7d

2 files changed

Lines changed: 7 additions & 22 deletions

File tree

SS_recruit.tpl

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -377,26 +377,11 @@ FUNCTION dvar_vector Equil_Spawn_Recr_Fxn(const dvar_vector& SRparm,
377377
// SS_Label_44.1.7 3 parameter survival based
378378
case 7: // survival
379379
{
380-
// z_frac is steepness
381-
// incorrect code below was used prior to Jan 2026 revision
382-
// SRZ_0 = log(1.0 / (SSB_virgin_use / Recr_virgin_use));
383-
// srz_min = SRZ_0 * (1.0 - steepness);
384-
// B_equil = SSB_virgin_use * (1. - (log(1. / SSBpR_current) - SRZ_0) / pow((srz_min - SRZ_0), (1. / SRparm(3))));
385-
// SRZ_surv = mfexp((1. - pow((B_equil / SSB_virgin_use), SRparm(3))) * (srz_min - SRZ_0) + SRZ_0); // survival
386-
// R_equil = B_equil * SRZ_surv;
387-
dvariable SPR0 = SSB_virgin_use / Recr_virgin_use;
388-
// warning << "SPR: " << SSBpR_current / SPR0 << " Old: " << B_equil << " " << R_equil;
389-
390-
// formula: pow( (1.0 - (log (SPR0 / SSBpR_current)) / (steepness * log (SPR0) )), (1. / SRparm(3)));
391-
// use a join fxn to keep the quantity above 0.01, which is enough above 0.0 to assure no negative
392-
dvariable temp = (1.0 - (log (SPR0 / SSBpR_current)) / (steepness * log (SPR0) ));
393-
dvariable join1 = 1. / (1. + mfexp(100. * (temp - 0.01))); // steep logistic joiner
394-
dvariable temp1 = join1 * 0.01 + (1. - join1) * (temp - 0.01);
395-
B_equil = Recr_virgin_use * SPR0 *
396-
pow( temp1, (1. / SRparm(3)));
397-
R_equil = B_equil / SSBpR_current;
398-
// warning << " log(SPR): " << log (SPR0 / SSBpR_current) << " denom " << steepness * log (SPR0) << " base: " <<
399-
// (1.0 - (log (SPR0 / SSBpR_current)) / (steepness * log (SPR0) )) << " temp: " << temp << " " << join1 << " " << temp1 << " New: " << B_equil << " " << R_equil << endl;
380+
SRZ_0 = log(1.0 / (SSB_virgin_use / Recr_virgin_use));
381+
srz_min = SRZ_0 * (1.0 - steepness);
382+
B_equil = SSB_virgin_use * (1. - (log(1. / SSBpR_current) - SRZ_0) / pow((srz_min - SRZ_0), (1. / SRparm(3))));
383+
SRZ_surv = mfexp((1. - pow((B_equil / SSB_virgin_use), SRparm(3))) * (srz_min - SRZ_0) + SRZ_0); // survival
384+
R_equil = B_equil * SRZ_surv;
400385
break;
401386
}
402387

SS_write_report.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4754,7 +4754,7 @@ FUNCTION void SPR_profile()
47544754
}
47554755
// do not recalculate here so force using values from benchmark
47564756
SS2out << "unfished values for SRR: SSB " << SSB0_4_SRR << " R " << R0_4_SRR << " SSBpR " << " SSBpR: " << SSB0_4_SRR / R0_4_SRR << endl;
4757-
SS2out << "SPRloop Iter Bycatch Fmult F_std SSBpR SPR YpR_dead YpR_dead*Recr YpR_ret*Recr Revenue Cost Profit SSB Recruits SSB/Bzero Tot_Catch ";
4757+
SS2out << "SPRloop Iter Bycatch Fmult F_std SSBpR YpR_dead YpR_dead*Recr YpR_ret*Recr Revenue Cost Profit SSB Recruits SSB/Bzero Tot_Catch ";
47584758
for (f = 1; f <= Nfleet; f++)
47594759
{
47604760
if (fleet_type(f) <= 2)
@@ -4921,7 +4921,7 @@ FUNCTION void SPR_profile()
49214921
if (SPRloop1 == 0)
49224922
Fcrash = Fmult2;
49234923
}
4924-
SS2out << SPRloop1 << " " << SPRloop << " " << with_BYC << " " << Fmult2 << " " << equ_F_std << " " << SSB_equil << " " << SSB_equil / (SSB0_4_SRR / R0_4_SRR) << " " << YPR_dead << " "
4924+
SS2out << SPRloop1 << " " << SPRloop << " " << with_BYC << " " << Fmult2 << " " << equ_F_std << " " << SSB_equil / (SSB0_4_SRR / R0_4_SRR) << " " << YPR_dead << " "
49254925
<< YPR_dead * Btgt_prof_rec << " " << YPR_ret * Btgt_prof_rec << " " << (PricePerF * YPR_val_vec) * Btgt_prof_rec
49264926
<< " " << Cost << " " << (PricePerF * YPR_val_vec) * Btgt_prof_rec - Cost << " " << Btgt_prof << " " << Btgt_prof_rec << " " << Btgt_prof / SSB0_4_SRR
49274927
<< " " << value(sum(equ_catch_fleet(2)) * Btgt_prof_rec);

0 commit comments

Comments
 (0)