This fixes #39, where a difference of number of recruitment models in set_recruit_models only affected the Recruitment Model Data collection object. In addition to this, limit and validate to general_params and recruitment active binding parameters.
Recruitment
Added num_recruit_models parameter to recruitment initialization
Check that the count of the Recruitment Model Number(s) (model_num) parameter matches num_recruit_models parameter at initialization and when importing recruitment data (read_inp_lines) from AGEPRO input files.
This resolves #39.
agepro_model$set_recruit_model : This now initializes a new instance of the recruitment class, using GENERAL keyword parameter's number of recruitment models (general$num_rec_models) value .
Replaced general recruitment active binding fields setters: recruit_scaling_factor, ssb_scaling_factor, max_recruit_obs, recruit_model_num_list, to in-class private functions; These values can only be set within the recruitment class.
Modularize setups for Recruitment probability(recruit_probability), Recruitment Model Number vector (recruit_model_num_list), and the Recruitment Model Data (recruit_data) into private helper functions.
Use purrr::map to validate input for valid recruitment probabilities within the time projection year horizon for each recruitment model in Recruitment Probability (recruit_probability) active binding setter. Recruitment probabilities can be set after Recruitment
Use purrr::map to get (and validate) recruitment model numbers from Recruitment Model Data (recruit_data) input and update the Recruitment Model Number Vector in the recruit_data active binding setter.
Added Sequence years (seq_years) parameter to read_inp_files to update number of recruit models
Assert that the count of the Recruitment Model Number(s) (model_num) parameter matches num_recruit_models parameter at initialization.
code cleanup for consistency and clarity
Replace model_collection_list -> recruit_data for clarity.
Renamed common recruit_model active binding recruit_data -> json_recruit_data
Renamed recruitment's set_recruit_model function to initialize_recruit_model to reflect its intended functionality and set it as a private helper function.
max_rec_obs -> max_recruit_obs : default value (still at 10000) code cleanup.
rename inplines_recruit (and inplines_general) to get_inp_lines (#37)
This fixes #39, where a difference of number of recruitment models in
set_recruit_models
only affected the Recruitment Model Data collection object. In addition to this, limit and validate to general_params and recruitment active binding parameters.num_recruit_models
parameter to recruitment initializationmodel_num
) parameter matchesnum_recruit_models
parameter at initialization and when importing recruitment data (read_inp_lines
) from AGEPRO input files.agepro_model$set_recruit_model
: This now initializes a new instance of the recruitment class, using GENERAL keyword parameter's number of recruitment models (general$num_rec_models
) value .recruit_scaling_factor
,ssb_scaling_factor
,max_recruit_obs
,recruit_model_num_list
, to in-class private functions; These values can only be set within the recruitment class.recruit_probability
), Recruitment Model Number vector (recruit_model_num_list
), and the Recruitment Model Data (recruit_data
) into private helper functions.purrr::map
to validate input for valid recruitment probabilities within the time projection year horizon for each recruitment model in Recruitment Probability (recruit_probability
) active binding setter. Recruitment probabilities can be set after Recruitmentpurrr::map
to get (and validate) recruitment model numbers from Recruitment Model Data (recruit_data
) input and update the Recruitment Model Number Vector in therecruit_data
active binding setter.seq_years
) parameter toread_inp_files
to update number of recruit modelsmodel_collection_list -> recruit_data
for clarity.recruit_data -> json_recruit_data
observed_years -> sequence_projection_years
field.set_recruit_model
function toinitialize_recruit_model
to reflect its intended functionality and set it as a private helper function.max_rec_obs -> max_recruit_obs
: default value (still at 10000) code cleanup.inplines_recruit
(andinplines_general
) toget_inp_lines
(#37)cat_verbose -> enable_cat_print
ageproR.R -> ageproR-package.R
)