seacode / gmacs

A generic size-structured stock assessment model
https://seacode.github.io/gmacs
18 stars 14 forks source link

Get BBRKC model running again #167

Open quantifish opened 8 years ago

quantifish commented 8 years ago

I've updated ctl and dat files for BBRKC but code is blowing up here and I dont want to spend any more time on it today so I'll leave this thread here. I may have made a mistake in ctl or dat file or it's a bug that does not affect SMBKC but does screw up bbrkc (there are other more sinister problems going on in update_population_numbers_at_length when the code gets into oldshell, i.e. this sections needs finishing off now that we're doing seasons etc)

// Compute effective N's
for ( int kk = 1; kk <= nSizeComps; kk++ )
{
    for ( int ii = 1; ii <= nSizeCompRows(kk); ii++ )
    {
        double sdl_tmp     = Sd_length(d3_obs_size_comps(kk,ii) );
        effN(kk,ii)        = Eff_N(d3_obs_size_comps(kk,ii),d3_pre_size_comps(kk,ii));
        effN2(kk,ii)       = Eff_N2(d3_obs_size_comps(kk,ii),d3_pre_size_comps(kk,ii));
        pre_mn_size(kk,ii) = mn_length(d3_pre_size_comps(kk,ii));
        obs_mn_size(kk,ii) = mn_length(d3_obs_size_comps(kk,ii));
        lb_mn_size(kk,ii)  = obs_mn_size(kk,ii) - sdl_tmp *2. / sqrt(size_comp_sample_size(kk,ii));
        ub_mn_size(kk,ii)  = obs_mn_size(kk,ii) + sdl_tmp *2. / sqrt(size_comp_sample_size(kk,ii));
    }
}

Also, this will be an issue #165

quantifish commented 8 years ago

I've got the OneSex model running now.

quantifish commented 8 years ago

This is now running aside from a few (likely minor) issues. These inlcude:

-------------------------------------------
--Start time: Thu Aug 25 11:19:00 2016

--Finish time: Thu Aug 25 11:20:39 2016

--Runtime: 0 hours, 1 minutes, 39 seconds
--Number of function evaluations: 1258
*******************************************
Error: Detected division by zero.
Error: Detected underflow.
Makefile:25: recipe for target 'run' failed
make: *** [run] Aborted (core dumped)