Skip to content
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

ADD fishing mortality process, plus improvements 202207 #400

Merged
merged 49 commits into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ec584ff
FIX: extract R function to always lower case type
Craig44 Jul 26, 2022
75485d0
ADD: syntax example of how to insert processes into initialisation ph…
Craig44 Jul 26, 2022
bafeb81
UPD: initialisation phase
Craig44 Jul 26, 2022
0ffb65d
DEL: Testmodel output files
Craig44 Jul 26, 2022
afe216b
DEL: testmodel output
Craig44 Jul 26, 2022
6644fde
ADD: testmodel output to gitignore
Craig44 Jul 27, 2022
c249500
FIX: parameter transfomrations with type vector
Craig44 Jul 27, 2022
f553014
FIX: profile class so it can take multiple singular parameters instea…
Craig44 Jul 28, 2022
b44ac82
ADD: inital F process
Craig44 Jul 28, 2022
fe3884b
ADD: unit test for initF process
Craig44 Jul 28, 2022
7f18a1a
FIX: penalty flagging. Now any @penalty that exists in the configurat…
Craig44 Jul 28, 2022
d46dc99
Merge branch 'master' into init_F_process_202207
Craig44 Jul 28, 2022
88965ec
CHG: GH to master
Craig44 Jul 28, 2022
fc6effc
ADD: business checks for profile, time-varying, and parameter transfo…
Craig44 Jul 29, 2022
15c096c
CHG; selectivity by year report
Craig44 Jul 29, 2022
48d1ef2
CHG: exogenous timevarying class move one off calculations to the Bui…
Craig44 Jul 29, 2022
b17783a
ADD: SCI test case (length based model) with MPD markdown
Craig44 Jul 31, 2022
b2d9375
UPD: mortality instantaneous
Craig44 Jul 31, 2022
df94be5
DEL: test model mcmc output
Craig44 Jul 31, 2022
96f1a8e
MVE: mortality process to sub directory
Craig44 Aug 2, 2022
653389e
UPD: mortality process dependencies due to MVE
Craig44 Aug 2, 2022
7bd8c06
CHG: mortality observations from mortality_instantaneous -> mortality…
Craig44 Aug 2, 2022
ed68ed0
ADD: observation types with recent changes
Craig44 Aug 2, 2022
480abd9
ADD: penalty in MortalityHybrid
Craig44 Aug 3, 2022
cde7890
UPD: manual regarding MCMC reports and outputs #231
Craig44 Aug 3, 2022
023b8e0
ADD: LOG_CODE_ERROR for mortality accessors that should never be called
Craig44 Aug 4, 2022
2404a35
ADD: ssb_offset to recruitment process report
Craig44 Aug 8, 2022
b5141bd
FIX: typo in recruitment process report
Craig44 Aug 8, 2022
d00e54c
Merge in changes from main development branch
amart Aug 11, 2022
24c7e98
Update TestCase input files
amart Aug 11, 2022
6b945ec
Update TestCase CASAL output files
amart Aug 11, 2022
7154b90
Update TestCase HAK LIN ORH MPD output files
amart Aug 11, 2022
87ab7ef
Update TestCase HOK input files
amart Aug 12, 2022
0afb13f
Update TestCase HOK output files
amart Aug 12, 2022
7bf3fa8
Update TestCase SCI input files
amart Aug 12, 2022
59de1a6
Update TestCase MPD reports for BCO, HAK, HOK, LIN, ORH, SBW
amart Aug 14, 2022
fbfa7c7
Update TestCase SCI MPD results; ADOL-C low tolerance still running
amart Aug 16, 2022
91aed7e
Update TestCase SCI input files to match other TestCase sets
amart Aug 16, 2022
d48002f
Add initial versions of TestCase SCI input files
amart Aug 16, 2022
354d72f
Update initial version of TestCase SCI MPD report
amart Aug 16, 2022
65000f8
Update TestCase SCI MPD report
amart Aug 17, 2022
afec32f
Update TestCase SCI MPD report
amart Aug 17, 2022
5e34382
Update TestCase SCI MPD report
amart Aug 17, 2022
db443e7
Start of adding growth curves to TestCase SCI MPD report; R function …
amart Aug 18, 2022
96d5bdb
Added growth curves to TestCase SCI MPD report
amart Aug 18, 2022
04319fd
Add TestCase SCI Casal2 ADOL-C output for previous configuration
amart Aug 19, 2022
c96a17a
Update TestCase SCI MPD report
amart Aug 21, 2022
0592659
CHG: iterative initialisation log info to log FINE
Craig44 Aug 23, 2022
a69fb57
Update TestCase observations with "mortality_process"
amart Aug 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
214 changes: 214 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,217 @@ Documentation/UserManual/CASAL2_Age.synctex.gz
Documentation/UserManual/CASAL2_Length.synctex.gz
*.txss
simCASAL2/simCASAL2.exe
TestModels/SimAllObs/sim/sim_all_obs.1_01
TestModels/SimAllObs/sim/sim_all_obs.1_02
TestModels/SimAllObs/sim/sim_all_obs.1_03
TestModels/SimAllObs/sim/sim_all_obs.1_04
TestModels/SimAllObs/sim/sim_all_obs.1_05
TestModels/SimAllObs/sim/sim_all_obs.1_06
TestModels/SimAllObs/sim/sim_all_obs.1_07
TestModels/SimAllObs/sim/sim_all_obs.1_08
TestModels/SimAllObs/sim/sim_all_obs.1_09
TestModels/SimAllObs/sim/sim_all_obs.1_10
TestModels/SimAllObs/sim/sim_all_obs.2_01
TestModels/SimAllObs/sim/sim_all_obs.2_02
TestModels/SimAllObs/sim/sim_all_obs.2_03
TestModels/SimAllObs/sim/sim_all_obs.2_04
TestModels/SimAllObs/sim/sim_all_obs.2_05
TestModels/SimAllObs/sim/sim_all_obs.2_06
TestModels/SimAllObs/sim/sim_all_obs.2_07
TestModels/SimAllObs/sim/sim_all_obs.2_08
TestModels/SimAllObs/sim/sim_all_obs.2_09
TestModels/SimAllObs/sim/sim_all_obs.2_10
TestModels/SimAllObs/sim/sim_all_obs.3_01
TestModels/SimAllObs/sim/sim_all_obs.3_02
TestModels/SimAllObs/sim/sim_all_obs.3_03
TestModels/SimAllObs/sim/sim_all_obs.3_04
TestModels/SimAllObs/sim/sim_all_obs.3_05
TestModels/SimAllObs/sim/sim_all_obs.3_06
TestModels/SimAllObs/sim/sim_all_obs.3_07
TestModels/SimAllObs/sim/sim_all_obs.3_08
TestModels/SimAllObs/sim/sim_all_obs.3_09
TestModels/SimAllObs/sim/sim_all_obs.3_10
TestModels/SimAllObs/sim/sim_all_obs.4_01
TestModels/SimAllObs/sim/sim_all_obs.4_02
TestModels/SimAllObs/sim/sim_all_obs.4_03
TestModels/SimAllObs/sim/sim_all_obs.4_04
TestModels/SimAllObs/sim/sim_all_obs.4_05
TestModels/SimAllObs/sim/sim_all_obs.4_06
TestModels/SimAllObs/sim/sim_all_obs.4_07
TestModels/SimAllObs/sim/sim_all_obs.4_08
TestModels/SimAllObs/sim/sim_all_obs.4_09
TestModels/SimAllObs/sim/sim_all_obs.4_10
TestModels/SimAllObs/sim/sim_all_obs.5_01
TestModels/SimAllObs/sim/sim_all_obs.5_02
TestModels/SimAllObs/sim/sim_all_obs.5_03
TestModels/SimAllObs/sim/sim_all_obs.5_04
TestModels/SimAllObs/sim/sim_all_obs.5_05
TestModels/SimAllObs/sim/sim_all_obs.5_06
TestModels/SimAllObs/sim/sim_all_obs.5_07
TestModels/SimAllObs/sim/sim_all_obs.5_08
TestModels/SimAllObs/sim/sim_all_obs.5_09
TestModels/SimAllObs/sim/sim_all_obs.5_10
TestModels/SimAllObs/sim/sim_all_obs.6_01
TestModels/SimAllObs/sim/sim_all_obs.6_02
TestModels/SimAllObs/sim/sim_all_obs.6_03
TestModels/SimAllObs/sim/sim_all_obs.6_04
TestModels/SimAllObs/sim/sim_all_obs.6_05
TestModels/SimAllObs/sim/sim_all_obs.6_06
TestModels/SimAllObs/sim/sim_all_obs.6_07
TestModels/SimAllObs/sim/sim_all_obs.6_08
TestModels/SimAllObs/sim/sim_all_obs.6_09
TestModels/SimAllObs/sim/sim_all_obs.6_10
TestModels/SimAllObs/sim/sim_all_obs.7_01
TestModels/SimAllObs/sim/sim_all_obs.7_02
TestModels/SimAllObs/sim/sim_all_obs.7_03
TestModels/SimAllObs/sim/sim_all_obs.7_04
TestModels/SimAllObs/sim/sim_all_obs.7_05
TestModels/SimAllObs/sim/sim_all_obs.7_06
TestModels/SimAllObs/sim/sim_all_obs.7_07
TestModels/SimAllObs/sim/sim_all_obs.7_08
TestModels/SimAllObs/sim/sim_all_obs.7_09
TestModels/SimAllObs/sim/sim_all_obs.7_10
TestModels/SimAllObs/sim/sim_all_obs.8_01
TestModels/SimAllObs/sim/sim_all_obs.8_02
TestModels/SimAllObs/sim/sim_all_obs.8_03
TestModels/SimAllObs/sim/sim_all_obs.8_04
TestModels/SimAllObs/sim/sim_all_obs.8_05
TestModels/SimAllObs/sim/sim_all_obs.8_06
TestModels/SimAllObs/sim/sim_all_obs.8_07
TestModels/SimAllObs/sim/sim_all_obs.8_08
TestModels/SimAllObs/sim/sim_all_obs.8_09
TestModels/SimAllObs/sim/sim_all_obs.8_10
TestModels/SimAllObs/sim/sim_all_obs.9_01
TestModels/SimAllObs/sim/sim_all_obs.9_02
TestModels/SimAllObs/sim/sim_all_obs.9_03
TestModels/SimAllObs/sim/sim_all_obs.9_04
TestModels/SimAllObs/sim/sim_all_obs.9_05
TestModels/SimAllObs/sim/sim_all_obs.9_06
TestModels/SimAllObs/sim/sim_all_obs.9_07
TestModels/SimAllObs/sim/sim_all_obs.9_08
TestModels/SimAllObs/sim/sim_all_obs.9_09
TestModels/SimAllObs/sim/sim_all_obs.9_10
TestModels/additional_priors/run.err
TestModels/agelength_cv_with_LF/run.err
TestModels/agelength_cv_with_LF/run.log
TestModels/agelengths_data/run.err
TestModels/Complex/run.err
TestModels/Complex/run.log
TestModels/Complex_input/run.err
TestModels/Complex_input/run.log
TestModels/ComplexTag/estimate_betadiff.err
TestModels/ComplexTag/estimate_betadiff.log
TestModels/estimates_with_matching_bounds/run.err
TestModels/LengthBasedNoPlusGroup/run.err
TestModels/LengthBasedPlusGroup/run.err
TestModels/mcmc_resume/mcmc.log
TestModels/mcmc_resume/objectives.2
TestModels/mcmc_resume/objectives.3
TestModels/mcmc_resume/samples.2
TestModels/mcmc_resume/samples.3
TestModels/mcmc_start_mpd/esimate.err
TestModels/mcmc_start_mpd/mcmc.err
TestModels/mcmc_start_mpd/mcmc.log
TestModels/mcmc_start_mpd/objectives.2
TestModels/mcmc_start_mpd/objectives.3
TestModels/mcmc_start_mpd/samples.2
TestModels/mcmc_start_mpd/samples.3
TestModels/mcmc_start_mpd_mcmc_fixed/esimate.err
TestModels/mcmc_start_mpd_mcmc_fixed/mcmc.err
TestModels/mcmc_start_mpd_mcmc_fixed/mcmc.log
TestModels/mcmc_start_mpd_mcmc_fixed/objectives.1
TestModels/mcmc_start_mpd_mcmc_fixed/samples.1
TestModels/ORH3B/multi_sim.err
TestModels/ORH3B/multi_sim.log
TestModels/SBW/estimate_betadiff.err
TestModels/SBW/estimate_betadiff.log
TestModels/SexedLengthBased/estimate_adolc.err
TestModels/SexedLengthBased/estimate_adolc.log
TestModels/SexedLengthBased/estimate_gammadiff.err
TestModels/SexedLengthBased/estimate_gammadiff.log
TestModels/SimAllObs/multi_sim.err
TestModels/SimAllObs/multi_sim.log
TestModels/Simple/estimate_betadiff.err
TestModels/Simple/estimate_betadiff.log
TestModels/SimpleDirichletMultinomial/run.err
TestModels/SingleSexTagByLength_input/run.err
TestModels/SingleSexTagByLength_input/run.log
TestModels/TwoSex_input/run.err
TestModels/TwoSex_input/run.log
TestModels/agelength_cv_with_LF/run.log
TestModels/Complex/run.log
TestModels/Complex_input/run.log
TestModels/ComplexTag/estimate_betadiff.err
TestModels/ComplexTag/estimate_betadiff.log
TestModels/LengthBasedNoPlusGroup/run.err
TestModels/mcmc_resume/mcmc.log
TestModels/mcmc_resume/objectives.2
TestModels/mcmc_resume/samples.2
TestModels/mcmc_start_mpd/esimate.err
TestModels/mcmc_start_mpd/mcmc.err
TestModels/mcmc_start_mpd/mcmc.log
TestModels/mcmc_start_mpd_mcmc_fixed/esimate.err
TestModels/mcmc_start_mpd_mcmc_fixed/mcmc.err
TestModels/mcmc_start_mpd_mcmc_fixed/mcmc.log
TestModels/mcmc_start_mpd_mcmc_fixed/objectives.1
TestModels/mcmc_start_mpd_mcmc_fixed/samples.1
TestModels/ORH3B/multi_sim.err
TestModels/ORH3B/multi_sim.log
TestModels/SBW/estimate_betadiff.err
TestModels/SBW/estimate_betadiff.log
TestModels/SexedLengthBased/estimate_adolc.log
TestModels/SexedLengthBased/estimate_betadiff.err
TestModels/SexedLengthBased/estimate_betadiff.log
TestModels/SexedLengthBased/estimate_gammadiff.log
TestModels/SimAllObs/multi_sim.err
TestModels/SimAllObs/multi_sim.log
TestModels/SingleSexTagByLength_input/run.log
TestModels/TwoSex_input/run.log
TestModels/agelength_cv_with_LF/run.log
TestModels/Complex/run.log
TestModels/Complex_input/run.log
TestModels/ComplexTag/estimate_betadiff.err
TestModels/ComplexTag/estimate_betadiff.log
TestModels/LengthBasedNoPlusGroup/run.err
TestModels/mcmc_resume/mcmc.log
TestModels/mcmc_resume/objectives.2
TestModels/mcmc_resume/samples.2
TestModels/mcmc_start_mpd/esimate.err
TestModels/mcmc_start_mpd/mcmc.err
TestModels/mcmc_start_mpd/mcmc.log
TestModels/mcmc_start_mpd_mcmc_fixed/esimate.err
TestModels/mcmc_start_mpd_mcmc_fixed/mcmc.err
TestModels/mcmc_start_mpd_mcmc_fixed/mcmc.log
TestModels/mcmc_start_mpd_mcmc_fixed/objectives.1
TestModels/mcmc_start_mpd_mcmc_fixed/samples.1
TestModels/ORH3B/multi_sim.err
TestModels/ORH3B/multi_sim.log
TestModels/SBW/estimate_betadiff.err
TestModels/SBW/estimate_betadiff.log
TestModels/SexedLengthBased/estimate_adolc.log
TestModels/SexedLengthBased/estimate_betadiff.err
TestModels/SexedLengthBased/estimate_betadiff.log
TestModels/SexedLengthBased/estimate_gammadiff.log
TestModels/SimAllObs/multi_sim.err
TestModels/SimAllObs/multi_sim.log
TestModels/Simple/estimate_gammadiff.err
TestModels/Simple/estimate_gammadiff.log
TestModels/SingleSexTagByLength_input/run.log
TestModels/TwoSex/estimate_betadiff.err
TestModels/TwoSex/estimate_betadiff.log
TestModels/TwoSex_input/run.log
TestModels/mcmc_start_mpd/objectives.1
TestModels/mcmc_start_mpd/samples.1
TestModels/mcmc_start_mpd_mcmc_fixed/mpd.log
TestModels/TwoSex/estimate_gammadiff.log
TestModels/TwoSex/estimate_gammadiff.err
TestModels/TwoSex/estimate_adolc.log
TestModels/TwoSex/estimate_adolc.err
TestModels/Simple/estimate_adolc.log
TestModels/Simple/estimate_adolc.err
TestModels/SBW/estimate_gammadiff.log
TestModels/SBW/estimate_gammadiff.err
TestModels/SBW/estimate_adolc.log
TestModels/SBW/estimate_adolc.err
TestModels/mcmc_start_mpd_mcmc_fixed/samples.2
TestModels/mcmc_start_mpd_mcmc_fixed/objectives.2
2 changes: 1 addition & 1 deletion BuildSystem/Version.iss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// WARNING: THIS FILE IS AUTOMATICALLY GENERATED BY doBuild version. DO NOT EDIT THIS FILE
AppVersion='v22.08 (2022-08-04)'
AppVersion='v22.08 (2022-08-23)'
6 changes: 3 additions & 3 deletions BuildSystem/buildtools/classes/ModelRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def start(self):
success_count = 0
fail_count = 0
##estimation_dir_list = {"Simple", "SBW"} # requires a config.csl2 file (uses whatever minimiser is defined)
estimation_betadiff_dir_list = {"TwoSex", "SBW", "Simple","ComplexTag", "SexedLengthBased"} # requires a config-betadiff.csl2 file
estimation_gammadiff_dir_list = {"TwoSex", "SBW", "Simple", "SexedLengthBased"} # requires a config-gammadiff.csl2 file
estimation_adolc_dir_list = {"TwoSex", "SBW", "Simple", "SexedLengthBased"} # requires a config-adolc.csl2 file
estimation_betadiff_dir_list = {"TwoSex", "TwoSexHybridMortality", "SBW", "Simple","ComplexTag", "SexedLengthBased"} # requires a config-betadiff.csl2 file
estimation_gammadiff_dir_list = {"TwoSex", "TwoSexHybridMortality", "SBW", "Simple", "SexedLengthBased"} # requires a config-gammadiff.csl2 file
estimation_adolc_dir_list = {"TwoSex", "TwoSexHybridMortality", "SBW", "Simple", "SexedLengthBased"} # requires a config-adolc.csl2 file
simulate_dash_i_dir_list = {"ORH3B", "SimAllObs"} # if you change this you will need to formulate the report or python code below, not very general.
run_dash_i_dir_list = {"Complex_input","TwoSex_input"}
resume_mcmc_from_mpd_dir_list = {"mcmc_start_mpd_mcmc_fixed","mcmc_start_mpd"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ void AddressableTransformation::Validate() {
LOG_FATAL_P(PARAM_PARAMETERS) << "parameter " << parameter_labels_[param_counter] << " could not be converted to an unsigned integer";
if (u_index <= 0 || u_index > addressable_vectors_[param_counter]->size())
LOG_FATAL_P(PARAM_PARAMETERS) << "parameter " << parameter_labels_[param_counter] << " index not in range for this parameter, please check the input";
vector_and_u_map_indicies_[param_counter].push_back(u_index);
init_values_.push_back((*addressable_vectors_[param_counter])[u_index]);
vector_and_u_map_indicies_[param_counter].push_back(u_index - 1);
init_values_.push_back((*addressable_vectors_[param_counter])[u_index - 1]);
++n_params_;
}
} else {
Expand Down Expand Up @@ -344,6 +344,8 @@ void AddressableTransformation::Verify(shared_ptr<Model> model) {
for(unsigned i = 0; i < target_objects_.size(); ++i) {
if(target_objects_[i]->IsAddressableUsedFor(parameter_lookup_for_verify_[i], addressable::kEstimate))
LOG_FATAL_P(PARAM_PARAMETERS) << "There is an @estimate block for " << parameter_lookup_for_verify_[i] << " this is not allowed for parameters with a @parameter_transformation block";
if(target_objects_[i]->IsAddressableUsedFor(parameter_lookup_for_verify_[i], addressable::kProfile) & (model_->run_mode() == RunMode::kProfiling))
LOG_FATAL_P(PARAM_PARAMETERS) << "foung an @profile block for " << parameter_lookup_for_verify_[i] << ". You cannot have a @parameter_transformation and a @profile block for the same parameter.";
}
}

Expand Down
5 changes: 5 additions & 0 deletions CASAL2/source/AddressableTransformations/Common/Logistic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ void Logistic::DoValidate() {
LOG_ERROR_P(PARAM_PARAMETERS) << "Logistic transformation only can transform 1 parameter at a time. You supplied " << parameter_labels_.size() << " parmaters" ;
}
restored_values_.resize(parameter_labels_.size(), 0.0);
if(init_values_[0] == lower_bound_)
LOG_ERROR_P(PARAM_PARAMETERS) << "initial value was equal to lower bound. This will cause an Inf and is not allowed. Change starting value";
if(init_values_[0] == upper_bound_)
LOG_ERROR_P(PARAM_PARAMETERS) << "initial value was equal to upper bound. This will cause an Inf and is not allowed. Change starting value";

logistic_value_ = utilities::math::logit_bounds(init_values_[0], lower_bound_, upper_bound_); // this will get over-riden by load estimables
restored_values_[0] = utilities::math::invlogit_bounds(logistic_value_, lower_bound_, upper_bound_);
// Check the transformations are correct
Expand Down
2 changes: 1 addition & 1 deletion CASAL2/source/AgeWeights/Age/Data.Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ end_table
type process_removals_by_age
likelihood multinomial
time_step Annual
mortality_instantaneous_process Instantaneous_Mortality
mortality_process Instantaneous_Mortality
categories Stock
method_of_removal Fishery
years 1986:2005
Expand Down
4 changes: 2 additions & 2 deletions CASAL2/source/Catchabilities/Common/Nuisance.Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ time_step_proportion 1.0
type process_removals_by_age
likelihood multinomial
time_step step1
mortality_instantaneous_process instant_mort
mortality_process instant_mort
categories stock
method_of_removal FishingWest
ageing_error Ageing_error
Expand Down Expand Up @@ -314,7 +314,7 @@ type none
type process_removals_by_age
likelihood multinomial
time_step step1
mortality_instantaneous_process instant_mort
mortality_process instant_mort
categories stock
ageing_error Ageing_error
method_of_removal FishingEest
Expand Down
2 changes: 1 addition & 1 deletion CASAL2/source/InitialisationPhases/Age/Cinitial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void Cinitial::DoBuild() {
/**
* Execute Cinitial - this code follows from the original CASAL algorithm
*/
void Cinitial::Execute() {
void Cinitial::DoExecute() {
LOG_TRACE();
map<string, vector<Double>> category_by_age_total;
auto partition_iter = partition_->Begin();
Expand Down
7 changes: 3 additions & 4 deletions CASAL2/source/InitialisationPhases/Age/Cinitial.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ class Cinitial : public niwa::InitialisationPhase {
// methods
explicit Cinitial(shared_ptr<Model> model);
virtual ~Cinitial();
virtual void Execute() override final;

protected:
// methods
virtual void DoValidate() override final;
virtual void DoBuild() override final;

void DoValidate() override final;
void DoBuild() override final;
void DoExecute() override final;
private:
// members
CombinedCategoriesPtr partition_;
Expand Down
6 changes: 3 additions & 3 deletions CASAL2/source/InitialisationPhases/Age/Derived.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void Derived::DoBuild() {
/**
* Execute the Derived Initialisation phase
*/
void Derived::Execute() {
void Derived::DoExecute() {
unsigned year_range = model_->age_spread();

if (recruitment_)
Expand Down Expand Up @@ -232,14 +232,14 @@ void Derived::Execute() {
// Check if we have B0 initialised or R0 initialised recruitment
bool B0_initial_recruitment = false;
for (auto recruitment_process : recruitment_process_) {
if (recruitment_process->b0_initialised()) {
if (recruitment_process->b0_initialised() & !recruitment_process->has_partition_been_scaled()) {
LOG_FINEST() << PARAM_B0 << " has been defined for process labelled " << recruitment_process->label();
recruitment_process->ScalePartition();
B0_initial_recruitment = true;
}
}
for (auto recruitment_process_with_devs : recruitment_process_with_devs_) {
if (recruitment_process_with_devs->b0_initialised()) {
if (recruitment_process_with_devs->b0_initialised()& !recruitment_process_with_devs->has_partition_been_scaled()) {
LOG_FINEST() << PARAM_B0 << " has been defined for process labelled " << recruitment_process_with_devs->label();
recruitment_process_with_devs->ScalePartition();
B0_initial_recruitment = true;
Expand Down
4 changes: 2 additions & 2 deletions CASAL2/source/InitialisationPhases/Age/Derived.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @date 2/09/2014
* @section LICENSE
*
* Copyright NIWA Science �2014 - www.niwa.co.nz
* Copyright NIWA Science �2014 - www.niwa.co.nz
*
* @section DESCRIPTION
*
Expand Down Expand Up @@ -36,12 +36,12 @@ class Derived : public niwa::InitialisationPhase {
// methods
explicit Derived(shared_ptr<Model> model);
virtual ~Derived() = default;
void Execute() override final;

protected:
// methods
void DoValidate() override final;
void DoBuild() override final;
void DoExecute() override final;

// members
unsigned years_;
Expand Down
Loading