From 348f387122fb7c93a95c3396166c108e4857a676 Mon Sep 17 00:00:00 2001 From: Jim Ianelli Date: Tue, 27 Feb 2024 22:09:45 -0800 Subject: [PATCH] updated labels in atka --- examples/atka/F_profile.out | 0 examples/atka/Input_Log.rep | 153 + examples/atka/alt_proj.out | 99 + examples/atka/amak.prj | 42 + examples/atka/cmpdiff.tmp | 0 examples/atka/elasticity.csv | 0 examples/atka/fmin.log | 0 examples/atka/gradfil1.tmp | 0 examples/atka/gradfil2.tmp | 0 examples/atka/means.out | 1008 + examples/atka/oct22spm.tpl | 2509 + examples/atka/percentdb.out | 2205 + examples/atka/percentiles.out | 509 + examples/atka/spm | 1 + examples/atka/spm.log | 0 examples/atka/spm_detail.csv | 105001 +++++++++++++++++++++++++++++++ examples/atka/varssave.tmp | 0 examples/yfs/Input_Log.rep | 152 + examples/yfs/tacpar.dat | 10 + examples/yfs/yfs.dat | 47 + 20 files changed, 111736 insertions(+) create mode 100644 examples/atka/F_profile.out create mode 100644 examples/atka/Input_Log.rep create mode 100644 examples/atka/alt_proj.out create mode 100644 examples/atka/amak.prj create mode 100755 examples/atka/cmpdiff.tmp create mode 100644 examples/atka/elasticity.csv create mode 100644 examples/atka/fmin.log create mode 100755 examples/atka/gradfil1.tmp create mode 100755 examples/atka/gradfil2.tmp create mode 100644 examples/atka/means.out create mode 100644 examples/atka/oct22spm.tpl create mode 100644 examples/atka/percentdb.out create mode 100644 examples/atka/percentiles.out create mode 120000 examples/atka/spm create mode 100644 examples/atka/spm.log create mode 100644 examples/atka/spm_detail.csv create mode 100755 examples/atka/varssave.tmp create mode 100644 examples/yfs/Input_Log.rep create mode 100644 examples/yfs/tacpar.dat create mode 100644 examples/yfs/yfs.dat diff --git a/examples/atka/F_profile.out b/examples/atka/F_profile.out new file mode 100644 index 0000000..e69de29 diff --git a/examples/atka/Input_Log.rep b/examples/atka/Input_Log.rep new file mode 100644 index 0000000..35b7566 --- /dev/null +++ b/examples/atka/Input_Log.rep @@ -0,0 +1,153 @@ +run_name +std +Tier +3 +nalts +7 +alt_list + 1 2 3 4 5 6 7 +TAC_ABC +1 +SrType +2 +Rec_Gen +1 +Fmsy_F35 +0 +Rec_Cond +0 +Write_Big +1 +npro +15 +nsims +1000 +styr +2022 +bzero_in +2.14289e-314 +phizero_in +1.97626e-323 +alpha_in +0 +sigmar_in +2.14609e-314 +rho_in +3.91012e-314 +nyrs_catch_in +3 +nspp +1 +OY_min +0 +OY_max +2e+06 +spp_file_name +amak.prj + + + + + + + + + + + + + + + + + + + +ABC_Multiplier + 1 +N_scalar + 1 +Alt4_SPR + 0.75 +ntacspp +1 +tac_ind + 1 +Obs_Catch + 2022 66481 + 2023 83800 + 2024 73495 +maxabc + 2.60197 +theta + 0.417 + 0.372 + 0.361 + 0.296 + 0.2733 + 0.125 + -0.300856 +SSL_spp(i) +1 +Const_Buffer(i) +0 +ngear(i) +1 +nsexes(i) +1 +avg_5yrF(i) +0.466309 +FABC_Adj(i) +1 +SPR_abc(i) +0.4 +SPR_ofl(i) +0.35 +spawnmo(i) +8 +nages(i) +11 +Fratiotmp(i) + 1 0 0 0 0 +M_Ftmp(i) + 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +pmaturetmp_F(i) + 0.005 0.037 0.224 0.688 0.944 0.992 0.999 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +pmaturetmp_M(i) + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +n0_Ftmp(i) + 455.117 327.78 225.928 180.065 204.794 57.5847 48.566 11.1321 19.4992 16.1917 16.6349 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +n0_Mtmp(i) + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +nrec + 43 +Rtmp + 2029.18 510.378 302.256 329.928 212.274 287.859 311.806 496.744 428.929 584.25 467.616 1174.85 563.228 330.767 513.567 854.815 340.554 334.724 862.518 199.665 307.073 717.886 1625.57 1059.21 1187.72 256.331 342.385 460.791 320.225 850.262 727.305 225.784 489.818 351.231 540.93 1000.95 702.742 197.174 468.108 340.657 775.326 458.576 413.419 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +SSBtmp + 185063 194924 225633 281301 308840 278432 242762 204377 171283 153353 151813 157796 169000 189832 214867 217034 189390 167558 148283 131538 121405 125866 121836 113387 146360 209974 260828 270171 243816 203159 174091 152785 150435 155099 145082 139850 146641 154981 175310 180589 157355 136916 132864 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/examples/atka/alt_proj.out b/examples/atka/alt_proj.out new file mode 100644 index 0000000..e207d99 --- /dev/null +++ b/examples/atka/alt_proj.out @@ -0,0 +1,99 @@ +Stock Alt Year Catch ABC OFL SSB TotBiom +Model_16.0b 1 2023 83799.9 98588.3 118787 122541 615027 +Model_16.0b 1 2024 73495 86464.1 101188 111122 606662 +Model_16.0b 1 2025 80839 80839 95229.6 105236 623219 +Model_16.0b 1 2026 77777.1 77777.1 92491.4 106221 635879 +Model_16.0b 1 2027 80536.7 80536.7 96193 110493 655119 +Model_16.0b 1 2028 84714.7 84714.7 101278 113880 668308 +Model_16.0b 1 2029 87345.6 87345.6 104498 116270 673907 +Model_16.0b 1 2030 88654.4 88654.4 106073 117263 676706 +Model_16.0b 1 2031 89114.6 89114.6 106625 117281 677145 +Model_16.0b 1 2032 89109 89109 106561 117310 675478 +Model_16.0b 1 2033 88865.1 88865.1 106268 117279 674184 +Model_16.0b 1 2034 88605 88605 105985 116943 674838 +Model_16.0b 1 2035 88577 88577 105913 116752 677120 +Model_16.0b 1 2036 88884.6 88884.6 106282 117090 676236 +Model_16.0b 2 2023 83799.9 98588.3 118787 122541 615027 +Model_16.0b 2 2024 73495 86464.1 101188 111122 606662 +Model_16.0b 2 2025 80839 80839 95229.6 105236 623219 +Model_16.0b 2 2026 77777.1 77777.1 92491.4 106221 635879 +Model_16.0b 2 2027 80536.7 80536.7 96193 110493 655119 +Model_16.0b 2 2028 84714.7 84714.7 101278 113880 668308 +Model_16.0b 2 2029 87345.6 87345.6 104498 116270 673907 +Model_16.0b 2 2030 88654.4 88654.4 106073 117263 676706 +Model_16.0b 2 2031 89114.6 89114.6 106625 117281 677145 +Model_16.0b 2 2032 89109 89109 106561 117310 675478 +Model_16.0b 2 2033 88865.1 88865.1 106268 117279 674184 +Model_16.0b 2 2034 88605 88605 105985 116943 674838 +Model_16.0b 2 2035 88577 88577 105913 116752 677120 +Model_16.0b 2 2036 88884.6 88884.6 106282 117090 676236 +Model_16.0b 3 2023 83799.9 98588.3 118787 122541 615027 +Model_16.0b 3 2024 73495 86464.1 101188 111122 606662 +Model_16.0b 3 2025 68344.2 80839 95229.6 108351 623219 +Model_16.0b 3 2026 69221 81957.7 97490.8 112436 647097 +Model_16.0b 3 2027 72154.2 86261.3 103139 118834 671754 +Model_16.0b 3 2028 75774.3 91776.5 109884 123992 688996 +Model_16.0b 3 2029 78666.5 95717.8 114677 127796 698241 +Model_16.0b 3 2030 80417 97920.9 117310 129771 703659 +Model_16.0b 3 2031 81152.4 98951 118578 130390 705684 +Model_16.0b 3 2032 81426.3 99362.6 119018 130740 704965 +Model_16.0b 3 2033 81470.7 99350.2 118970 130856 704157 +Model_16.0b 3 2034 81307.9 99083.2 118660 130545 704901 +Model_16.0b 3 2035 81190.1 99035.9 118598 130365 707148 +Model_16.0b 3 2036 81341.3 99369.1 119028 130744 706319 +Model_16.0b 4 2023 83799.9 98588.3 118787 122541 615027 +Model_16.0b 4 2024 73495 86464.1 101188 111122 606662 +Model_16.0b 4 2025 21003.3 80839 95229.6 119949 623219 +Model_16.0b 4 2026 24298 97897.5 116802 139833 689852 +Model_16.0b 4 2027 27524.6 111949 134360 159044 746148 +Model_16.0b 4 2028 30646.8 124703 149899 174592 787778 +Model_16.0b 4 2029 33192.6 134763 161954 186748 816146 +Model_16.0b 4 2030 35022.6 141870 170413 195257 836518 +Model_16.0b 4 2031 36130.5 146239 175606 200665 849655 +Model_16.0b 4 2032 36748.2 148726 178615 204382 856897 +Model_16.0b 4 2033 37137.3 150326 180559 206960 861836 +Model_16.0b 4 2034 37319.3 151088 181474 208278 866485 +Model_16.0b 4 2035 37419.1 151568 182082 209150 871299 +Model_16.0b 4 2036 37561.6 152165 182813 210260 872217 +Model_16.0b 5 2023 83799.9 98588.3 118787 122541 615027 +Model_16.0b 5 2024 73495 86464.1 101188 111122 606662 +Model_16.0b 5 2025 0 80839 95229.6 124921 623219 +Model_16.0b 5 2026 0 104526 125007 153195 708936 +Model_16.0b 5 2027 0 123691 148718 180788 783248 +Model_16.0b 5 2028 0 141573 170203 204444 841782 +Model_16.0b 5 2029 0 156585 188071 224184 885856 +Model_16.0b 5 2030 0 168069 201697 239499 920489 +Model_16.0b 5 2031 0 175938 211053 250678 945953 +Model_16.0b 5 2032 0 181035 217164 259050 963406 +Model_16.0b 5 2033 0 184686 221539 265413 976626 +Model_16.0b 5 2034 0 187020 224357 269642 987739 +Model_16.0b 5 2035 0 188624 226301 272719 997501 +Model_16.0b 5 2036 0 190154 228155 275526 1.00221e+06 +Model_16.0b 6 2023 118787 98588.3 118787 113113 615027 +Model_16.0b 6 2024 84865.8 72133.3 84865.8 96078.5 575519 +Model_16.0b 6 2025 77259.5 65318.2 77259.5 92625 588393 +Model_16.0b 6 2026 80811 67848 80811 96169.1 611874 +Model_16.0b 6 2027 86630.1 72482.4 86630.1 100795 633722 +Model_16.0b 6 2028 91491 76593.8 91491 103763 646104 +Model_16.0b 6 2029 94377.6 78896.4 94377.6 105593 650398 +Model_16.0b 6 2030 95342.3 79743.3 95342.3 106143 651894 +Model_16.0b 6 2031 95520 79912.7 95520 105940 651629 +Model_16.0b 6 2032 95262.8 79713.7 95262.8 105926 649683 +Model_16.0b 6 2033 94991.2 79475.9 94991.2 105885 648387 +Model_16.0b 6 2034 94715 79259.4 94715 105560 649083 +Model_16.0b 6 2035 94591.9 79185.2 94591.9 105417 651418 +Model_16.0b 6 2036 94977.3 79490.3 94977.3 105799 650657 +Model_16.0b 7 2023 98588.2 98588.3 118787 118600 615027 +Model_16.0b 7 2024 80272.1 80272.2 94147.3 104213 593470 +Model_16.0b 7 2025 86618.4 73429.5 86618.4 97372.2 606706 +Model_16.0b 7 2026 83930.7 70518 83930.7 97839.8 617801 +Model_16.0b 7 2027 87523.1 73246.3 87523.1 101308 635406 +Model_16.0b 7 2028 91697.9 76767.8 91697.9 103909 646523 +Model_16.0b 7 2029 94395.6 78909.2 94395.6 105638 650488 +Model_16.0b 7 2030 95338 79737.9 95338 106163 651928 +Model_16.0b 7 2031 95521.2 79912.8 95521.2 105952 651652 +Model_16.0b 7 2032 95265.6 79715.6 95265.6 105932 649696 +Model_16.0b 7 2033 94992.9 79477.1 94992.9 105887 648393 +Model_16.0b 7 2034 94715.8 79260 94715.8 105562 649086 +Model_16.0b 7 2035 94592.2 79185.5 94592.2 105418 651419 +Model_16.0b 7 2036 94977.4 79490.4 94977.4 105799 650658 diff --git a/examples/atka/amak.prj b/examples/atka/amak.prj new file mode 100644 index 0000000..24f551d --- /dev/null +++ b/examples/atka/amak.prj @@ -0,0 +1,42 @@ +#runname +Model_16.0b +#ssl_spp +1 +#Dorn_buffer +0 +#nfsh +1 +#nsex +1 +#avgF5yr +0.466309 +#F40_mult +1 +#spr_abc +0.4 +#spr_msy +0.35 +#sp_mo +8 +#nages +11 +#Frat +1 +#M +0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 +#pmat +0.005 0.037 0.224 0.688 0.944 0.992 0.999 1 1 1 1 +#wtage_sp + 53 170.51 438.746 532.373 702.888 741.487 835.179 913.014 933.513 899.299 961.619 +#wtage_fsh + 69 409.472 565.989 654.075 742.345 791.25 804.113 845.83 828.65 850.669 872.894 +#sel + 0.00127026 0.0124189 0.0999134 0.292556 0.493402 0.661302 0.852503 1 0.923677 0.575225 0.575225 +#N + 455.117 327.78 225.928 180.065 204.794 57.5847 48.566 11.1321 19.4992 16.1917 16.6349 +#nyrs +43 +#R + 2029.18 510.378 302.256 329.928 212.274 287.859 311.806 496.744 428.929 584.25 467.616 1174.85 563.228 330.767 513.567 854.815 340.554 334.724 862.518 199.665 307.073 717.886 1625.57 1059.21 1187.72 256.331 342.385 460.791 320.225 850.262 727.305 225.784 489.818 351.231 540.93 1000.95 702.742 197.174 468.108 340.657 775.326 458.576 413.419 +#SSB + 185063 194924 225633 281301 308840 278432 242762 204377 171283 153353 151813 157796 169000 189832 214867 217034 189390 167558 148283 131538 121405 125866 121836 113387 146360 209974 260828 270171 243816 203159 174091 152785 150435 155099 145082 139850 146641 154981 175310 180589 157355 136916 132864 diff --git a/examples/atka/cmpdiff.tmp b/examples/atka/cmpdiff.tmp new file mode 100755 index 0000000..e69de29 diff --git a/examples/atka/elasticity.csv b/examples/atka/elasticity.csv new file mode 100644 index 0000000..e69de29 diff --git a/examples/atka/fmin.log b/examples/atka/fmin.log new file mode 100644 index 0000000..e69de29 diff --git a/examples/atka/gradfil1.tmp b/examples/atka/gradfil1.tmp new file mode 100755 index 0000000..e69de29 diff --git a/examples/atka/gradfil2.tmp b/examples/atka/gradfil2.tmp new file mode 100755 index 0000000..e69de29 diff --git a/examples/atka/means.out b/examples/atka/means.out new file mode 100644 index 0000000..2e50e6d --- /dev/null +++ b/examples/atka/means.out @@ -0,0 +1,1008 @@ +Alternative 1 Catch + Model_16.0b +Equil_Fabc 90158.7 +Year +2022 66481 +2023 83799.9 +2024 73495 +2025 80839 +2026 77777.1 +2027 80536.7 +2028 84714.7 +2029 87345.6 +2030 88654.4 +2031 89114.6 +2032 89109 +2033 88865.1 +2034 88605 +2035 88577 +2036 88884.6 + +Alternative 1 ABCs + Model_16.0b + +Year +2022 102578 +2023 98588.3 +2024 86464.1 +2025 80839 +2026 77777.1 +2027 80536.7 +2028 84714.7 +2029 87345.6 +2030 88654.4 +2031 89114.6 +2032 89109 +2033 88865.1 +2034 88605 +2035 88577 +2036 88884.6 + +Alternative 1 TACs + Model_16.0b + +Year +2022 NA +2023 NA +2024 NA +2025 80839 +2026 77777.1 +2027 80536.7 +2028 84714.7 +2029 87345.6 +2030 88654.4 +2031 89114.6 +2032 89109 +2033 88865.1 +2034 88605 +2035 88577 +2036 88884.6 + +Alternative 1 Sp_Biomass + Model_16.0b +Equil_Fabc 112182 +Year +2022 137805 +2023 122541 +2024 111122 +2025 105236 +2026 106221 +2027 110493 +2028 113880 +2029 116270 +2030 117263 +2031 117281 +2032 117310 +2033 117279 +2034 116943 +2035 116752 +2036 117090 + +Alternative 1 Fishing Mortality + Model_16.0b +Equil_Fabc 0.60874 +Year +2022 0.37197 +2023 0.503755 +2024 0.482975 +2025 0.563903 +2026 0.549328 +2027 0.552255 +2028 0.560896 +2029 0.563196 +2030 0.563517 +2031 0.564228 +2032 0.563868 +2033 0.562784 +2034 0.562439 +2035 0.563452 +2036 0.564489 + +Alternative 1 Biomass + Model_16.0b + +Year +2022 631455 +2023 615027 +2024 606662 +2025 623219 +2026 635879 +2027 655119 +2028 668308 +2029 673907 +2030 676706 +2031 677145 +2032 675478 +2033 674184 +2034 674838 +2035 677120 +2036 676236 + +Alternative 1 Implied SPR rate + Model_16.0b +Equil_Fabc 0.4 +Year +2022 0.517114 +2023 0.444118 +2024 0.454137 +2025 0.417939 +2026 0.424954 +2027 0.424269 +2028 0.420625 +2029 0.419643 +2030 0.419572 +2031 0.419342 +2032 0.419413 +2033 0.419781 +2034 0.41992 +2035 0.419453 +2036 0.419029 + + Model_16.0b +EquilAvgAgeF0 3.71599 +EquilAvgAgeFabc 2.69344 +AvgAgeYr2036 44.4789 +Alternative 2 Catch + Model_16.0b +Equil_Fabc 90158.7 +Year +2022 66481 +2023 83799.9 +2024 73495 +2025 80839 +2026 77777.1 +2027 80536.7 +2028 84714.7 +2029 87345.6 +2030 88654.4 +2031 89114.6 +2032 89109 +2033 88865.1 +2034 88605 +2035 88577 +2036 88884.6 + +Alternative 2 ABCs + Model_16.0b + +Year +2022 102578 +2023 98588.3 +2024 86464.1 +2025 80839 +2026 77777.1 +2027 80536.7 +2028 84714.7 +2029 87345.6 +2030 88654.4 +2031 89114.6 +2032 89109 +2033 88865.1 +2034 88605 +2035 88577 +2036 88884.6 + +Alternative 2 TACs + Model_16.0b + +Year +2022 NA +2023 NA +2024 NA +2025 80839 +2026 77777.1 +2027 80536.7 +2028 84714.7 +2029 87345.6 +2030 88654.4 +2031 89114.6 +2032 89109 +2033 88865.1 +2034 88605 +2035 88577 +2036 88884.6 + +Alternative 2 Sp_Biomass + Model_16.0b +Equil_Fabc 112182 +Year +2022 137805 +2023 122541 +2024 111122 +2025 105236 +2026 106221 +2027 110493 +2028 113880 +2029 116270 +2030 117263 +2031 117281 +2032 117310 +2033 117279 +2034 116943 +2035 116752 +2036 117090 + +Alternative 2 Fishing Mortality + Model_16.0b +Equil_Fabc 0.60874 +Year +2022 0.37197 +2023 0.503755 +2024 0.482975 +2025 0.563903 +2026 0.549328 +2027 0.552255 +2028 0.560896 +2029 0.563196 +2030 0.563517 +2031 0.564228 +2032 0.563868 +2033 0.562784 +2034 0.562439 +2035 0.563452 +2036 0.564489 + +Alternative 2 Biomass + Model_16.0b + +Year +2022 631455 +2023 615027 +2024 606662 +2025 623219 +2026 635879 +2027 655119 +2028 668308 +2029 673907 +2030 676706 +2031 677145 +2032 675478 +2033 674184 +2034 674838 +2035 677120 +2036 676236 + +Alternative 2 Implied SPR rate + Model_16.0b +Equil_Fabc 0.4 +Year +2022 0.517114 +2023 0.444118 +2024 0.454137 +2025 0.417939 +2026 0.424954 +2027 0.424269 +2028 0.420625 +2029 0.419643 +2030 0.419572 +2031 0.419342 +2032 0.419413 +2033 0.419781 +2034 0.41992 +2035 0.419453 +2036 0.419029 + + Model_16.0b +EquilAvgAgeF0 3.71599 +EquilAvgAgeFabc 2.69344 +AvgAgeYr2036 44.4789 +Alternative 3 Catch + Model_16.0b +Equil_Fabc 90158.7 +Year +2022 66481 +2023 83799.9 +2024 73495 +2025 68344.2 +2026 69221 +2027 72154.2 +2028 75774.3 +2029 78666.5 +2030 80417 +2031 81152.4 +2032 81426.3 +2033 81470.7 +2034 81307.9 +2035 81190.1 +2036 81341.3 + +Alternative 3 ABCs + Model_16.0b + +Year +2022 102578 +2023 98588.3 +2024 86464.1 +2025 80839 +2026 81957.7 +2027 86261.3 +2028 91776.5 +2029 95717.8 +2030 97920.9 +2031 98951 +2032 99362.6 +2033 99350.2 +2034 99083.2 +2035 99035.9 +2036 99369.1 + +Alternative 3 TACs + Model_16.0b + +Year +2022 NA +2023 NA +2024 NA +2025 68344.2 +2026 69221 +2027 72154.2 +2028 75774.3 +2029 78666.5 +2030 80417 +2031 81152.4 +2032 81426.3 +2033 81470.7 +2034 81307.9 +2035 81190.1 +2036 81341.3 + +Alternative 3 Sp_Biomass + Model_16.0b +Equil_Fabc 112182 +Year +2022 137805 +2023 122541 +2024 111122 +2025 108351 +2026 112436 +2027 118834 +2028 123992 +2029 127796 +2030 129771 +2031 130390 +2032 130740 +2033 130856 +2034 130545 +2035 130365 +2036 130744 + +Alternative 3 Fishing Mortality + Model_16.0b +Equil_Fabc 0.60874 +Year +2022 0.37197 +2023 0.503755 +2024 0.482975 +2025 0.466309 +2026 0.466309 +2027 0.466309 +2028 0.466309 +2029 0.466309 +2030 0.466309 +2031 0.466309 +2032 0.466309 +2033 0.466309 +2034 0.466309 +2035 0.466309 +2036 0.466309 + +Alternative 3 Biomass + Model_16.0b + +Year +2022 631455 +2023 615027 +2024 606662 +2025 623219 +2026 647097 +2027 671754 +2028 688996 +2029 698241 +2030 703659 +2031 705684 +2032 704965 +2033 704157 +2034 704901 +2035 707148 +2036 706319 + +Alternative 3 Implied SPR rate + Model_16.0b +Equil_Fabc 0.4 +Year +2022 0.517114 +2023 0.444118 +2024 0.454137 +2025 0.462515 +2026 0.462515 +2027 0.462515 +2028 0.462515 +2029 0.462515 +2030 0.462515 +2031 0.462515 +2032 0.462515 +2033 0.462515 +2034 0.462515 +2035 0.462515 +2036 0.462515 + + Model_16.0b +EquilAvgAgeF0 3.71599 +EquilAvgAgeFabc 2.69344 +AvgAgeYr2036 45.3994 +Alternative 4 Catch + Model_16.0b +Equil_Fabc 90158.7 +Year +2022 66481 +2023 83799.9 +2024 73495 +2025 21003.3 +2026 24298 +2027 27524.6 +2028 30646.8 +2029 33192.6 +2030 35022.6 +2031 36130.5 +2032 36748.2 +2033 37137.3 +2034 37319.3 +2035 37419.1 +2036 37561.6 + +Alternative 4 ABCs + Model_16.0b + +Year +2022 102578 +2023 98588.3 +2024 86464.1 +2025 80839 +2026 97897.5 +2027 111949 +2028 124703 +2029 134763 +2030 141870 +2031 146239 +2032 148726 +2033 150326 +2034 151088 +2035 151568 +2036 152165 + +Alternative 4 TACs + Model_16.0b + +Year +2022 NA +2023 NA +2024 NA +2025 21003.3 +2026 24298 +2027 27524.6 +2028 30646.8 +2029 33192.6 +2030 35022.6 +2031 36130.5 +2032 36748.2 +2033 37137.3 +2034 37319.3 +2035 37419.1 +2036 37561.6 + +Alternative 4 Sp_Biomass + Model_16.0b +Equil_Fabc 112182 +Year +2022 137805 +2023 122541 +2024 111122 +2025 119949 +2026 139833 +2027 159044 +2028 174592 +2029 186748 +2030 195257 +2031 200665 +2032 204382 +2033 206960 +2034 208278 +2035 209150 +2036 210260 + +Alternative 4 Fishing Mortality + Model_16.0b +Equil_Fabc 0.60874 +Year +2022 0.37197 +2023 0.503755 +2024 0.482975 +2025 0.131302 +2026 0.131302 +2027 0.131302 +2028 0.131302 +2029 0.131302 +2030 0.131302 +2031 0.131302 +2032 0.131302 +2033 0.131302 +2034 0.131302 +2035 0.131302 +2036 0.131302 + +Alternative 4 Biomass + Model_16.0b + +Year +2022 631455 +2023 615027 +2024 606662 +2025 623219 +2026 689852 +2027 746148 +2028 787778 +2029 816146 +2030 836518 +2031 849655 +2032 856897 +2033 861836 +2034 866485 +2035 871299 +2036 872217 + +Alternative 4 Implied SPR rate + Model_16.0b +Equil_Fabc 0.4 +Year +2022 0.517114 +2023 0.444118 +2024 0.454137 +2025 0.75 +2026 0.75 +2027 0.75 +2028 0.75 +2029 0.75 +2030 0.75 +2031 0.75 +2032 0.75 +2033 0.75 +2034 0.75 +2035 0.75 +2036 0.75 + + Model_16.0b +EquilAvgAgeF0 3.71599 +EquilAvgAgeFabc 2.69344 +AvgAgeYr2036 50.4404 +Alternative 5 Catch + Model_16.0b +Equil_Fabc 90158.7 +Year +2022 66481 +2023 83799.9 +2024 73495 +2025 NA +2026 NA +2027 NA +2028 NA +2029 NA +2030 NA +2031 NA +2032 NA +2033 NA +2034 NA +2035 NA +2036 NA + +Alternative 5 ABCs + Model_16.0b + +Year +2022 102578 +2023 98588.3 +2024 86464.1 +2025 80839 +2026 104526 +2027 123691 +2028 141573 +2029 156585 +2030 168069 +2031 175938 +2032 181035 +2033 184686 +2034 187020 +2035 188624 +2036 190154 + +Alternative 5 TACs + Model_16.0b + +Year +2022 NA +2023 NA +2024 NA +2025 NA +2026 NA +2027 NA +2028 NA +2029 NA +2030 NA +2031 NA +2032 NA +2033 NA +2034 NA +2035 NA +2036 NA + +Alternative 5 Sp_Biomass + Model_16.0b +Equil_Fabc 112182 +Year +2022 137805 +2023 122541 +2024 111122 +2025 124921 +2026 153195 +2027 180788 +2028 204444 +2029 224184 +2030 239499 +2031 250678 +2032 259050 +2033 265413 +2034 269642 +2035 272719 +2036 275526 + +Alternative 5 Fishing Mortality + Model_16.0b +Equil_Fabc 0.60874 +Year +2022 0.37197 +2023 0.503755 +2024 0.482975 +2025 NA +2026 NA +2027 NA +2028 NA +2029 NA +2030 NA +2031 NA +2032 NA +2033 NA +2034 NA +2035 NA +2036 NA + +Alternative 5 Biomass + Model_16.0b + +Year +2022 631455 +2023 615027 +2024 606662 +2025 623219 +2026 708936 +2027 783248 +2028 841782 +2029 885856 +2030 920489 +2031 945953 +2032 963406 +2033 976626 +2034 987739 +2035 997501 +2036 1.00221e+06 + +Alternative 5 Implied SPR rate + Model_16.0b +Equil_Fabc 0.4 +Year +2022 0.517114 +2023 0.444118 +2024 0.454137 +2025 1 +2026 1 +2027 1 +2028 1 +2029 1 +2030 1 +2031 1 +2032 1 +2033 1 +2034 1 +2035 1 +2036 1 + + Model_16.0b +EquilAvgAgeF0 3.71599 +EquilAvgAgeFabc 2.69344 +AvgAgeYr2036 53.8664 +Alternative 6 Catch + Model_16.0b +Equil_Fabc 90158.7 +Year +2022 66481 +2023 118787 +2024 84865.8 +2025 77259.5 +2026 80811 +2027 86630.1 +2028 91491 +2029 94377.6 +2030 95342.3 +2031 95520 +2032 95262.8 +2033 94991.2 +2034 94715 +2035 94591.9 +2036 94977.3 + +Alternative 6 ABCs + Model_16.0b + +Year +2022 102578 +2023 98588.3 +2024 72133.3 +2025 65318.2 +2026 67848 +2027 72482.4 +2028 76593.8 +2029 78896.4 +2030 79743.3 +2031 79912.7 +2032 79713.7 +2033 79475.9 +2034 79259.4 +2035 79185.2 +2036 79490.3 + +Alternative 6 TACs + Model_16.0b + +Year +2022 NA +2023 118787 +2024 84865.8 +2025 77259.5 +2026 80811 +2027 86630.1 +2028 91491 +2029 94377.6 +2030 95342.3 +2031 95520 +2032 95262.8 +2033 94991.2 +2034 94715 +2035 94591.9 +2036 94977.3 + +Alternative 6 Sp_Biomass + Model_16.0b +Equil_Fabc 112182 +Year +2022 137805 +2023 113113 +2024 96078.5 +2025 92625 +2026 96169.1 +2027 100795 +2028 103763 +2029 105593 +2030 106143 +2031 105940 +2032 105926 +2033 105885 +2034 105560 +2035 105417 +2036 105799 + +Alternative 6 Fishing Mortality + Model_16.0b +Equil_Fabc 0.60874 +Year +2022 0.37197 +2023 0.762078 +2024 0.647326 +2025 0.621865 +2026 0.634472 +2027 0.651284 +2028 0.664372 +2029 0.669778 +2030 0.669961 +2031 0.670505 +2032 0.668777 +2033 0.667404 +2034 0.667139 +2035 0.667585 +2036 0.668659 + +Alternative 6 Biomass + Model_16.0b + +Year +2022 631455 +2023 615027 +2024 575519 +2025 588393 +2026 611874 +2027 633722 +2028 646104 +2029 650398 +2030 651894 +2031 651629 +2032 649683 +2033 648387 +2034 649083 +2035 651418 +2036 650657 + +Alternative 6 Implied SPR rate + Model_16.0b +Equil_Fabc 0.4 +Year +2022 0.517114 +2023 0.35 +2024 0.386045 +2025 0.395723 +2026 0.392777 +2027 0.387537 +2028 0.382897 +2029 0.381141 +2030 0.38116 +2031 0.381056 +2032 0.381527 +2033 0.381935 +2034 0.382021 +2035 0.381783 +2036 0.381415 + + Model_16.0b +EquilAvgAgeF0 3.71599 +EquilAvgAgeFabc 2.69344 +AvgAgeYr2036 43.3628 +Alternative 7 Catch + Model_16.0b +Equil_Fabc 90158.7 +Year +2022 66481 +2023 98588.2 +2024 80272.1 +2025 86618.4 +2026 83930.7 +2027 87523.1 +2028 91697.9 +2029 94395.6 +2030 95338 +2031 95521.2 +2032 95265.6 +2033 94992.9 +2034 94715.8 +2035 94592.2 +2036 94977.4 + +Alternative 7 ABCs + Model_16.0b + +Year +2022 102578 +2023 98588.3 +2024 80272.2 +2025 73429.5 +2026 70518 +2027 73246.3 +2028 76767.8 +2029 78909.2 +2030 79737.9 +2031 79912.8 +2032 79715.6 +2033 79477.1 +2034 79260 +2035 79185.5 +2036 79490.4 + +Alternative 7 TACs + Model_16.0b + +Year +2022 NA +2023 118787 +2024 94147.3 +2025 86618.4 +2026 83930.7 +2027 87523.1 +2028 91697.9 +2029 94395.6 +2030 95338 +2031 95521.2 +2032 95265.6 +2033 94992.9 +2034 94715.8 +2035 94592.2 +2036 94977.4 + +Alternative 7 Sp_Biomass + Model_16.0b +Equil_Fabc 112182 +Year +2022 137805 +2023 118600 +2024 104213 +2025 97372.2 +2026 97839.8 +2027 101308 +2028 103909 +2029 105638 +2030 106163 +2031 105952 +2032 105932 +2033 105887 +2034 105562 +2035 105418 +2036 105799 + +Alternative 7 Fishing Mortality + Model_16.0b +Equil_Fabc 0.60874 +Year +2022 0.37197 +2023 0.608739 +2024 0.562892 +2025 0.65535 +2026 0.644657 +2027 0.653947 +2028 0.665081 +2029 0.669965 +2030 0.670046 +2031 0.670554 +2032 0.668802 +2033 0.667415 +2034 0.667143 +2035 0.667587 +2036 0.668659 + +Alternative 7 Biomass + Model_16.0b + +Year +2022 631455 +2023 615027 +2024 593470 +2025 606706 +2026 617801 +2027 635406 +2028 646523 +2029 650488 +2030 651928 +2031 651652 +2032 649696 +2033 648393 +2034 649086 +2035 651419 +2036 650658 + +Alternative 7 Implied SPR rate + Model_16.0b +Equil_Fabc 0.4 +Year +2022 0.517114 +2023 0.4 +2024 0.418064 +2025 0.383744 +2026 0.388955 +2027 0.386514 +2028 0.38263 +2029 0.38107 +2030 0.381128 +2031 0.381038 +2032 0.381518 +2033 0.381931 +2034 0.382019 +2035 0.381783 +2036 0.381415 + + Model_16.0b +EquilAvgAgeF0 3.71599 +EquilAvgAgeFabc 2.69344 +AvgAgeYr2036 43.5133 diff --git a/examples/atka/oct22spm.tpl b/examples/atka/oct22spm.tpl new file mode 100644 index 0000000..b791fc1 --- /dev/null +++ b/examples/atka/oct22spm.tpl @@ -0,0 +1,2509 @@ + // DONT FORGET ABOU RHO!!! + //////////////////////////////////////////////////////////////////////////// + // spm.tpl + // Version 0.6 Released Oct 2022 + // + // NOTE: Draft subject to change + // Conventions: + // nspp, ispp = index for species/stock + // ngear, igear= index for gears used within age-structured species/stocks + // + // Oct 2005 add ability to compute objective function for maximizing yield while minimizing variability + // want to have the ability to compute the average first-diff squared and avg yield for each trajectory + // Alt3b_obj_fun = avg_yield - 0.5 * sqrd_1st_diff + // + //////////////////////////////////////////////////////////////////////////// +DATA_SECTION + !!CLASS ofstream means_out("means.out") + !!CLASS ofstream alts_proj("alt_proj.out") + !!CLASS ofstream percent_out("percentiles.out") + !!CLASS ofstream percent_db("percentdb.out") + // !!CLASS ofstream Alt3bstuff("alt3b.out") + !!CLASS ofstream detail_out("spm_detail.csv") + !!CLASS ofstream prof_F("F_profile.out"); + !!CLASS ofstream elasticity("elasticity.csv"); + int condition_SR + int ipro + int isim + number kink_adj + !! condition_SR = 0;// + int rnseed // Random number seed + !! rnseed = 123; + //////////////////////////////////////////////////////////////////////////// + // !! ad_comm::change_datafile_name("setup.dat"); Jim changed to spm.dat file + !! *(ad_comm::global_datafile) >> run_name; // Read in the name of this run + init_int Tier + int alt ; // Alternative specfications (relic of PSEIS) + vector rec_vector(1,300) // storage vector for historical and future recruitment... + vector wtd_rec(1,25) + vector wtd_div(1,25) // denominator of wtd recruitment + init_int nalts + init_ivector alt_list(1,nalts) + init_int TAC_ABC // Flag to set TAC equal to ABC (1 means true, otherwise false) + init_int SrType // Type of recruitment curve (1=Ricker, 2 Bholt) + // Specify form of recruitment generator (1 = use observed mean and std + // 2 = use estimated SRR and estimated sigma R + // 3 = use input parameters from srecpar.dat : + // 4 = use input parameters from srecpar.dat : + init_int Rec_Gen + init_int Fmsy_F35 // Specify if conditioned so that Fmsy = F35 (affects SRR fitting) may need to be species specific... + init_number Rec_Cond // Specify prior condition that recruitment at half and double average SSB is similar to average historical Rec + init_int Write_Big // Flag to write big file (of all simulations rather than a summary, 0 means don't do it, otherwise do it) + init_int npro // Number of projection years + init_int nsims // Number of simulaions + init_int styr // First year of projection + !! cout<< "First year:\t"<> spp_file_name(i); + + write_log(nyrs_catch_in); + write_log(nspp); + write_log(OY_min); + write_log(OY_max); + write_log(spp_file_name); + + END_CALCS + !! cout <<"OYMax "<> bzero_in; + *(ad_comm::global_datafile) >> phizero_in; + *(ad_comm::global_datafile) >> alpha_in; + *(ad_comm::global_datafile) >> sigmar_in; + *(ad_comm::global_datafile) >> rho_in; + // rho_in=0.82; + } + // Open up tac-model parameters + ad_comm::change_datafile_name("tacpar.dat"); + END_CALCS + init_int nntmp + init_int nnodes + init_vector maxabc(1,ntacspp) + init_matrix theta(0,nnodes,1,ntacspp) + !! cout<<"read tacpar"<> spname(i); // 1 + cout<> SSL_spp(i); // 2 + *(ad_comm::global_datafile) >> Const_Buffer(i); // 3 + *(ad_comm::global_datafile) >> ngear(i); // 4 + *(ad_comm::global_datafile) >> nsexes(i); // 6 + *(ad_comm::global_datafile) >> avg_5yrF(i); // 7 + *(ad_comm::global_datafile) >> FABC_Adj(i); // 8 + *(ad_comm::global_datafile) >> SPR_abc(i); // 9 + *(ad_comm::global_datafile) >> SPR_ofl(i); // 10 + *(ad_comm::global_datafile) >> spawnmo(i); // 11 + *(ad_comm::global_datafile) >> nages(i); // 12 + cout<<"nages: "<> Fratiotmp(i,j); // 13 + write_log( Fratiotmp(i)); + + for (int k=1;k<=nages(i);k++) + *(ad_comm::global_datafile) >> M_Ftmp(i,k); // 14 + if (nsexes(i)==2) + for (int k=1;k<=nages(i);k++) + *(ad_comm::global_datafile) >> M_Mtmp(i,k); // 15 + write_log( M_Ftmp(i)); + + for (int k=1;k<=nages(i);k++) + *(ad_comm::global_datafile) >> pmaturetmp_F(i,k); // 16 + write_log( pmaturetmp_F(i)); + + if (nsexes(i)==2) + for (int k=1;k<=nages(i);k++) + *(ad_comm::global_datafile) >> pmaturetmp_M(i,k); // 15 + write_log( pmaturetmp_M(i)); + cout << "Mature: "<< pmaturetmp_F(i)(1,nages(i)) <> wt_Ftmp(i,k); // 17 + write_log( wt_Ftmp(i)); + for (int j=1;j<=ngear(i);j++) + for (int k=1;k<=nages(i);k++) + *(ad_comm::global_datafile) >> wt_gear_Ftmp(i,j,k); // 18 + write_log( wt_gear_Ftmp(i)); + + if (nsexes(i)==2) + for (int j=1;j<=ngear(i);j++) + for (int k=1;k<=nages(i);k++) + *(ad_comm::global_datafile) >> wt_gear_Mtmp(i,j,k);// 19 + write_log( wt_gear_Mtmp(i)); + + for (int j=1;j<=ngear(i);j++) + for (int k=1;k<=nages(i);k++) + *(ad_comm::global_datafile) >> sel_Ftmp(i,j,k); // 20 + write_log( sel_Ftmp(i)); + + if (nsexes(i)==2) + for (int j=1;j<=ngear(i);j++) + for (int k=1;k<=nages(i);k++) + *(ad_comm::global_datafile) >> sel_Mtmp(i,j,k); // 21 + write_log( sel_Mtmp(i)); + for (int k=1;k<=nages(i);k++) + *(ad_comm::global_datafile) >> n0_Ftmp(i,k); // 22 + write_log( n0_Ftmp(i)); + + if (nsexes(i)==2) + for (int k=1;k<=nages(i);k++) + *(ad_comm::global_datafile) >> n0_Mtmp(i,k); // 23 + write_log( n0_Mtmp(i)); + + cout<<"N: "<> nrec(i); // 24 + cout<<"nrec: "<> Rtmp(i,j); // 25 + cout<<"Rec: "<> SSBtmp(i,j); // 26 + cout<<"SSB: "<> Rsim(ispp,i,j); + Rsim(ispp,i,j) *= exp(rnorms(i,j)*.375); // about 15% CV to get historical mean + } + if (nsims<=5) Rsim(ispp,i,j) = AMeanRec(ispp); // XXX constant recruitment + } + } + envin.close(); + AMeanRec(ispp) *= .5; // Arithmetic mean + cout <<"recruits"< 0 ) + F_begin_yr(k,ispp) = SolveF2(n0_F(ispp), n0_M(ispp), Obs_Catch(k,ispp),ispp); // F_yr_one(ispp) = SolveF2(n0_F(ispp), n0_M(ispp), yr_one_catch(ispp),ispp); + else + F_begin_yr(ispp) = 0; // F_yr_one(ispp) = 0; // cout< 1) // Debugging if LP to be done or not + { + int on=0; + if ( (on=option_match(ad_comm::argc,ad_comm::argv,"-nolp"))>-1) + dolp=0; + else + dolp=1; + } + END_CALCS + + +PRELIMINARY_CALCS_SECTION + double tmp1; + write_alts_hdr(); + get_SB100(); + cout<<"SSB, Biomass at unfished: "<1) + nyrs_catch = nyrs_catch_in; + else + nyrs_catch = 1;// NOTA BUENO: this is changed under the new EIS Alternatives (May 06) + Do_Sims(); + // if (alt==2) write_alts(); + write_alts(); + } + +FUNCTION compute_obj_fun + dvariable tmp1; + dvariable tmp2; + tmp1.initialize(); + for (int ispp=1;ispp<=nspp;ispp++) + { + Get_Bzero(ispp); + // write_srec();exit(1); + if(Fmsy_F35>0) + { + get_msy(ispp); + switch (current_phase()) + { + case 1 : tmp1 = 1.e1*square(log(Fmsy(ispp))-log(F35(ispp))); break; + case 2 : tmp1 = 1.e2*square(log(Fmsy(ispp))-log(F35(ispp))); break; + case 3 : tmp1 = 1.e2*square(log(Fmsy(ispp))-log(F35(ispp))); break; + case 4 : tmp1 = 1.e3*square(log(Fmsy(ispp))-log(F35(ispp))); break; + default: tmp1 = 1.e3*square(log(Fmsy(ispp))-log(F35(ispp))); break; + } + if(Fmsy_F35==2) + switch (current_phase()) + { + case 1 : tmp1 += 1.e1*square(log(Bmsy(ispp))-log(0.35 * SB100(ispp))); break; + case 2 : tmp1 += 1.e2*square(log(Bmsy(ispp))-log(0.35 * SB100(ispp))); break; + case 3 : tmp1 += 1.e2*square(log(Bmsy(ispp))-log(0.35 * SB100(ispp))); break; + case 4 : tmp1 += 1.e3*square(log(Bmsy(ispp))-log(0.35 * SB100(ispp))); break; + default : tmp1+= 1.e3*square(log(Bmsy(ispp))-log(0.35 * SB100(ispp))); break; + } + obj_fun += tmp1; + } + if (Rec_Cond>0.) + { + // More conditioning here--make mean recruitment consistent with half and double + // recruitment at avg spawning biomass... + double vartmp = 2.*Rec_Cond*Rec_Cond; + /* + double ssb1 = AMeanSSB(ispp) * 0.5; + double ssb2 = AMeanSSB(ispp) ; + double ssb3 = AMeanSSB(ispp) * 2.0; + // double ssb4 = value(Bzero(ispp)) ; + tmp2.initialize(); + tmp2 += square(log(AMeanRec(ispp)) - log(SRecruit( ssb1, ispp)))/ vartmp; + tmp2 += square(log(AMeanRec(ispp)) - log(SRecruit( ssb2, ispp)))/ vartmp; + tmp2 += square(log(AMeanRec(ispp)) - log(SRecruit( ssb3, ispp)))/ vartmp; + // tmp2 += 24.* square(log(AMeanRec(ispp)) - log(SRecruit( ssb4, ispp))); + // tmp2 += 24.* square(log(AMeanSSB(ispp)) - log( ssb4 )); + */ + tmp2 = square(log(Bzero(ispp)) - log(SB100(ispp)))/ vartmp; + obj_fun += tmp2; + // cout << "SSB "<OY_max) + Actual_Catch = TAC/sum(TAC)*OY_max; + else + Actual_Catch = TAC; + } + /* ////////////////////////////////////////////////////////////////////////////// //int use_max = 1; // Need to move this into the setup file... double max_catch=1500.;// EBS POllock special case (CHANGE THIS) //if (use_max==1) for (int ispp=1;ispp<=nspp;ispp++) Actual_Catch(ispp) = min(TAC(ispp),max_catch); // cout<<"AC: "<2) + write_sim("Alternative ",ispp); + } + write_by_time(); + + +FUNCTION Alt4_TAC + // Return vector of Alt4 TACs (given Alt4_Fabc, and the SSL prey condition to be at least up to SSL MaxPerm) + // Get all ABCs under Alt4_Fabc + // Sum and test if below OY_min + double sumabc; + sumabc = sum(ABC); + if (sumabc3) + { + Alt4_Fcalc = 1; + double diff; + double ssl_sum=0.; + diff = OY_min-sumabc; + // if so, sum up SSL ABCs + ssl_sum = SSL_spp*ABC; + for (int ispp=1;ispp<=nspp;ispp++) + { + // then apportion them to difference between current ABC and target (OY_min) difference + if (SSL_spp(ispp)) + { + TAC(ispp) = ABC(ispp) + diff * ABC(ispp)/ssl_sum; + // Special for BSAI Pcod to subtract off 3%...and get the totals to match up + // if (ispp==2) TAC(ispp) /= 0.97; For EIS work + } + else + { + TAC(ispp) = ABC(ispp); + } + } + // cout << ipro<<" "<0.01) ftmp = SolveF2(N_F(ispp),N_M(ispp),TAC(ispp),ispp); + // cout <= 0.2 *SBzero(ispp) & SBtmp < SBKink(ispp) ) // NOTE Same as Am 56 here (until 20% bzero reached) + Ftmp = (Fabc(ispp)*(1/(1-alpha ))*(SBtmp/SBKink(ispp) - alpha )); + if (SBtmp > SBKink(ispp) ) + Ftmp = (Fabc(ispp)); + SBtmp = N_females * elem_prod( wt_mature_F(ispp), mfexp( -yrfrac(ispp)*(M_F(ispp) + Ftmp*F_age ))); + } + return(Ftmp); + +FUNCTION double Get_F_Am56(const dvector& F_age, const dvector& N_females, const int ispp ) + double Ftmp; // cout<< spname(ispp)<< endl; + { + for (ii=1;ii<=3;ii++) // Iterate to get month of spawning correct + { + if (SBtmp < alpha*SBKink(ispp)) + Ftmp = 0.; + if (SBtmp >= alpha*SBKink(ispp) & SBtmp < SBKink(ispp) ) + Ftmp = (Fabc(ispp)*(1/(1-alpha))*(SBtmp/SBKink(ispp) - alpha)); + if (SBtmp > SBKink(ispp) ) + Ftmp = (Fabc(ispp)); + SBtmp = N_females * elem_prod( wt_mature_F(ispp), mfexp( -yrfrac(ispp)*(M_F(ispp) + Ftmp*F_age ))); + } + } + return(Ftmp); + +FUNCTION double Get_Fofl_t2(const dvector& F_age, const dvector& N_females, const int ispp ) + double Ftmp; // cout<< spname(ispp)<< endl; + { + for (ii=1;ii<=3;ii++) // Iterate to get month of spawning correct + { + if (SBtmp < alpha*SBKink(ispp)) + Ftmp = 0.; + if (SBtmp >= alpha*SBKink(ispp) & SBtmp < SBKink(ispp) ) + Ftmp = (Fofl(ispp)*(1/(1-alpha))*(SBtmp/SBKink(ispp) - alpha)); + if (SBtmp > SBKink(ispp) ) + Ftmp = (Fofl(ispp)); + SBtmp = N_females * elem_prod( wt_mature_F(ispp), mfexp( -yrfrac(ispp)*(M_F(ispp) + Ftmp*F_age ))); + } + } + return(Ftmp); + +FUNCTION double Get_Fofl_t(const dvector& F_age, const dvector& N_females, const int ispp ) + double Ftmp; // cout<< spname(ispp)<< endl; + { + for (ii=1;ii<=3;ii++) // Iterate to get month of spawning correct + { + if (SBtmp < alpha*SBKink(ispp)) + Ftmp = 0.; + if (SBtmp >= alpha*SBKink(ispp) & SBtmp < SBKink(ispp) ) + Ftmp = (Fofl(ispp)*(1/(1-alpha))*(SBtmp/SBKink(ispp) - alpha)); + if (SBtmp > SBKink(ispp) ) + Ftmp = (Fofl(ispp)); + SBtmp = N_females * elem_prod( wt_mature_F(ispp), mfexp( -yrfrac(ispp)*(M_F(ispp) + Ftmp*F_age ))); + } + } + return(Ftmp); + + +FUNCTION double Get_F_t(const dvector& F_age, const dvector& N_females, const int ispp ) + double Ftmp; // cout<< spname(ispp)<< endl; + if (SSL_spp(ispp)) + { + Ftmp = Get_F_SSL_prey(F_age, N_females, ispp); + } + else + { + Ftmp = Get_F_Am56(F_age, N_females, ispp); + } + return(Ftmp); + +FUNCTION void Project_Pops(const int& isim, const int& i) + double ctmp; + if ( i == npro && isim%int(nsims/4)==0) cout << "Year "< 0) + { + if (i <= nyrs_catch || TAC_ABC==0) // Use TAC setting algorithm for alt 2 only, for all others, set TAC==ABC + { + Ftmp = SolveF2(N_F(ispp),N_M(ispp),Actual_Catch(ispp),ispp); + } + else + { + if (alt==7 && i<=3) + Ftmp = Get_F(1,ispp); // Set to the F rather than solving every time... + else + if (alt==77 && i<=2) + Ftmp = Get_F(1,ispp); // Set to the F rather than solving every time... + else + { + // if (alt==2 && sum(TAC)>OY_max) + if ((alt==2 ||alt==98||alt==97) && sum(TAC)>OY_max) + { + Ftmp = SolveF2(N_F(ispp),N_M(ispp),OY_max*TAC(ispp)/sum(TAC),ispp); + // cout<<"HERE "<< Ftmp<<" "< 0.) + { + for (m=1;m<=ngear(ispp);m++) + { + Ftottmp_F = Ftmp*Frat(ispp,m)*sel_F(ispp,m); + Ftottmp_spr += Ftottmp_F ; + Ftottmp_M = Ftmp*Frat(ispp,m)*sel_M(ispp,m); + ctmp += (wt_gear_F(ispp,m) * elem_prod(elem_div(Ftottmp_F, Z_F(ispp)),elem_prod(1.-S_F(ispp),N_F(ispp)))); // Catch equation (vectors) + ctmp += (wt_gear_M(ispp,m) * elem_prod(elem_div(Ftottmp_M, Z_M(ispp)),elem_prod(1.-S_M(ispp),N_M(ispp)))); // Catch equation (vectors) + } + SPRsim(ispp,isim,i) = Implied_SPR(Ftottmp_spr,ispp); + // cout <NUL "); + ifstream tac("tac.dat"); + tac>>TAC; + tac.close(); /* */ + for (int ispp=1;ispp<=nspp;ispp++) + Actual_Catch(ispp) = min(TAC(ispp),ABC(ispp)); + } + + +FUNCTION Avg_Age + Avg_Age_End.initialize(); + Avg_Age_Mat.initialize(); + for (int ispp=1;ispp<=nspp;ispp++) + { + // if(!isit_const(ispp) ) + { + dvector age_seq(1,nages(ispp)); + age_seq.initialize(); + age_seq.fill_seqadd(1,1); + dvector ntmp(1,nages(ispp)); + ntmp = N_F(ispp); + Avg_Age_End(ispp) += age_seq * ntmp /sum(ntmp); + Avg_Age_sum(ispp) += Avg_Age_End(ispp) ; + ntmp = elem_prod(ntmp,pmature_F(ispp)) ; + Avg_Age_Mat(ispp) += elem_prod(ntmp,pmature_F(ispp)) * age_seq/sum(ntmp); + // cout< 1e-6) + { + iter++; + ftmp += (TACin-cc) / btmp; + Ftottmp_F.initialize(); + Ftottmp_M.initialize(); + for (m=1;m<=ngear(ispp);m++) + { + Ftottmp_F += ftmp*Fratsel_F(m); + Ftottmp_M += ftmp*Fratsel_M(m); + } + Z_F = Ftottmp_F + M_F(ispp); + Z_M = Ftottmp_M + M_M(ispp); + S_F = mfexp( -Z_F ); + S_M = mfexp( -Z_M ); + cc = 0.0; + for (m=1;m<=ngear(ispp);m++) + { + cc += (wt_gear_F(ispp,m) * elem_prod(elem_div(ftmp*Fratsel_F(m), Z_F),elem_prod(1.-S_F,N_F))); // Catch equation (vectors) + cc += (wt_gear_M(ispp,m) * elem_prod(elem_div(ftmp*Fratsel_M(m), Z_M),elem_prod(1.-S_M,N_M))); // Catch equation (vectors) + } + dd = cc / TACin - 1.; + //cout << ispp<<" "<< ftmp << " "<< cc << " "<100) {cerr<<"Bombed on catch solver--check scales for "<nages(ispp)) + { + Tg += double(ii) * wt_mature_F(ispp,nages(ispp)) * ntmp; + tmp += wt_mature_F(ispp,nages(ispp)) * ntmp; + ntmp *= exp(-M_F(ispp,nages(ispp))); + } + else + { + Tg += double(ii) * wt_mature_F(ispp,ii) * ntmp; + tmp += wt_mature_F(ispp,ii) * ntmp; + ntmp *= exp(-M_F(ispp,ii)); + } + } + // Tg /= value(phizero(ispp)); + Tg /= tmp; + report << Tg<< " "; + } + report << endl; + report << "Options SR_Type Project_Recr_Assmption SR_Condition"< 1e-6) + means_out << mean_value <<" "; + else + means_out << " NA "; + } + means_out << endl; + } + means_out << endl; + +FUNCTION void write_TACs(const adstring& Title) + // This one prints out species over time (means only), but without headings + means_out <<"Alternative "< 1e-6) + means_out << mean_value <<" "; + else + means_out << " NA "; + } + means_out << endl; + } + means_out << endl; + + + +FUNCTION void write_sim(const adstring& Title, d3_array& Outtmp) + // This one prints out species over time (means only), but without headings + d3_array mtmp(1,nspp,1,npro,1,nsims); + for (int ispp=1;ispp<=nspp;ispp++) for (int i=1;i<=npro;i++) for (int k=1;k<=nsims;k++) + mtmp(ispp,i,k)=Outtmp(ispp,k,i); + means_out <<"Alternative "< 1e-6) + means_out << mean_value <<" "; + else + means_out << " NA "; + } + means_out << endl; + } + means_out << endl; + +FUNCTION void write_sim(const adstring& Title,const d3_array& Outtmp,const dvar_vector& bb) + // This one prints out species over time (means only) + d3_array mtmp(1,nspp,1,npro,1,nsims); + for (int ispp=1;ispp<=nspp;ispp++) for (int i=1;i<=npro;i++) for (int k=1;k<=nsims;k++) + mtmp(ispp,i,k)=Outtmp(ispp,k,i); + means_out <<"Alternative "<1e-6) + means_out << mean_value <<" "; + else + means_out << " NA "; + } + means_out << endl; + } + means_out << endl; + +FUNCTION void write_sim(const adstring& Title,const int& ispp) + // For each species separately + percent_out <<"Alternative "< + adstring xspname; + adstring_array targsppname(1,20); + adstring_array spp_file_name(1,20); + adstring_array gearname(1,8); + adstring_array spname(1,90); + adstring_array areaname(1,8); + adstring run_name; + + ofstream write_log("Input_Log.rep"); + #undef write_log + #define write_log(object) write_log << #object "\n" << object << endl; + + // A routine to get transpose, sort and return a matrix ---- + dmatrix TranSort (const dmatrix m1) + { + RETURN_ARRAYS_INCREMENT(); + dmatrix vtmp=trans(m1); + int npro=m1.colmax(); + int nsim=m1.rowmax(); + for (int i=1;i<=npro;i++) + vtmp(i) = sort(vtmp(i),nsim); + + RETURN_ARRAYS_DECREMENT(); + return(vtmp); + } + // #include + +FUNCTION dvariable SRecruit(const dvariable& Stmp,const int& ispp) + RETURN_ARRAYS_INCREMENT(); + dvariable RecTmp; + switch (SrType) + { + case 1: + RecTmp = (Stmp / phizero(ispp)) * mfexp( sr_alpha(ispp) * ( 1. - Stmp / Bzero(ispp) )) ; //Ricker form from Dorn + break; + case 2: + RecTmp = Stmp / ( sr_alpha(ispp) + beta(ispp) * Stmp); //Beverton-Holt form + break; + case 3: + // RecTmp = mfexp(log_avgrec); //Avg recruitment + break; + case 4: + RecTmp = Stmp * mfexp( sr_alpha(ispp) - Stmp * beta(ispp)) ; //old Ricker form + break; + } + + RETURN_ARRAYS_DECREMENT(); + return RecTmp; + + +FUNCTION dvar_vector SRecruit(const dvar_vector& Stmp,const int& ispp) + RETURN_ARRAYS_INCREMENT(); + dvar_vector RecTmp(Stmp.indexmin(),Stmp.indexmax()); + switch (SrType) + { + case 1: + RecTmp = elem_prod((Stmp / phizero(ispp)) , mfexp( sr_alpha(ispp) * ( 1. - Stmp / Bzero(ispp) ))) ; //Ricker form from Dorn + break; + case 2: + RecTmp = elem_prod(Stmp , 1. / ( sr_alpha(ispp) + beta(ispp) * Stmp)); //Beverton-Holt form + break; + case 3: + // RecTmp = mfexp(log_avgrec); //Avg recruitment + break; + case 4: + RecTmp = elem_prod(Stmp ,mfexp( sr_alpha(ispp) - Stmp * beta(ispp))); //old Ricker form + break; + } + RETURN_ARRAYS_DECREMENT(); + //cout <5||F1<0.01)) + // { + // ii=5; + // F1=M(ispp,nages(ispp)); // When things bomb (F <0 or F really big then just set it to F35...) + // } + // else + { + F2 = F1 + df*.5; + F3 = F2 - df; //F1 = double(ii)/100; + yld1 = yield(F1,Stmp,Rtmp,ispp); //cout <