/** * Default constructor */ Normal::Normal() { parameters_.Bind<Double>(PARAM_MU, &mu_, "The normal prior mean (mu) parameter", ""); parameters_.Bind<Double>(PARAM_CV, &cv_, "The normal variance (standard devation) parameter", "")->set_lower_bound(0.0, false); RegisterAsEstimable(PARAM_MU, &mu_); RegisterAsEstimable(PARAM_CV, &cv_); }
/** * Default constructor */ NormalLog::NormalLog() { parameters_.Bind<Double>(PARAM_MU, &mu_, "Mu", ""); parameters_.Bind<Double>(PARAM_SIGMA, &sigma_, "Sigma", "")->set_lower_bound(0.0, false); RegisterAsEstimable(PARAM_MU, &mu_); RegisterAsEstimable(PARAM_SIGMA, &sigma_); }
/** * Default constructor */ Lognormal::Lognormal() { parameters_.Bind<Double>(PARAM_MU, &mu_, "The lognormal prior mean (mu) parameter", "")->set_lower_bound(0.0, false); parameters_.Bind<Double>(PARAM_CV, &cv_, "The Lognormal variance (CV) parameter", "")->set_lower_bound(0.0, false); RegisterAsEstimable(PARAM_MU, &mu_); RegisterAsEstimable(PARAM_CV, &cv_); }
/** * Default constructor */ Normal::Normal() { parameters_.Bind<Double>(PARAM_MU, &mu_, "Mu", ""); parameters_.Bind<Double>(PARAM_CV, &cv_, "Cv", "")->set_lower_bound(0.0, false); RegisterAsEstimable(PARAM_MU, &mu_); RegisterAsEstimable(PARAM_CV, &cv_); }
/** * Default constructor */ Linear::Linear(Model* model) : TimeVarying(model) { parameters_.Bind<Double>(PARAM_SLOPE, &slope_, "The slope of the linear trend (additive unit per year)", ""); parameters_.Bind<Double>(PARAM_INTERCEPT, &intercept_, "The intercept of the linear trend value for the first year", ""); RegisterAsEstimable(PARAM_SLOPE, &slope_); RegisterAsEstimable(PARAM_INTERCEPT, &intercept_); }
/** * Default constructor * * Bind any parameters that are allowed to be loaded from the configuration files. * Set bounds on registered parameters * Register any parameters that can be an estimated or utilised in other run modes (e.g profiling, yields, projections etc) * Set some initial values * * Note: The constructor is parsed to generate Latex for the documentation. */ AgeLength::AgeLength(Model* model) : model_(model) { parameters_.Bind<string>(PARAM_LABEL, &label_, "Label of the age length relationship", ""); parameters_.Bind<string>(PARAM_TYPE, &type_, "Type of age length relationship", ""); parameters_.Bind<Double>(PARAM_TIME_STEP_PROPORTIONS, &time_step_proportions_, "the fraction of the year applied in each time step that is added to the age for the purposes of evaluating the length, i.e., a value of 0.5 for a time step will evaluate the length of individuals at age+0.5 in that time step", "", true); parameters_.Bind<string>(PARAM_DISTRIBUTION, &distribution_, "The assumed distribution for the growth curve", "", PARAM_NORMAL); parameters_.Bind<Double>(PARAM_CV_FIRST, &cv_first_ , "CV for the first age class", "",Double(0.0))->set_lower_bound(0.0); parameters_.Bind<Double>(PARAM_CV_LAST, &cv_last_ , "CV for last age class", "",Double(0.0))->set_lower_bound(0.0); parameters_.Bind<bool>(PARAM_CASAL_SWITCH, &casal_normal_cdf_ , "If true, use the (less accurate) equation for the cumulative normal function as was used in the legacy version of CASAL.", "",false); RegisterAsEstimable(PARAM_CV_FIRST, &cv_first_); RegisterAsEstimable(PARAM_CV_LAST, &cv_last_); }
/** * Explicit constructor */ LogisticProducing::LogisticProducing(Model* model) : Selectivity(model) { parameters_.Bind<unsigned>(PARAM_L, &low_, "Low", ""); parameters_.Bind<unsigned>(PARAM_H, &high_, "High", ""); parameters_.Bind<Double>(PARAM_A50, &a50_, "A50", ""); parameters_.Bind<Double>(PARAM_ATO95, &ato95_, "Ato95", ""); parameters_.Bind<Double>(PARAM_ALPHA, &alpha_, "Alpha", "", 1.0); RegisterAsEstimable(PARAM_A50, &a50_); RegisterAsEstimable(PARAM_ATO95, &ato95_); RegisterAsEstimable(PARAM_ALPHA, &alpha_); }
/** * default constructor */ MortalityEventBiomass::MortalityEventBiomass(Model* model) : Process(model), partition_(model) { parameters_.Bind<string>(PARAM_CATEGORIES, &category_labels_, "Category labels", ""); parameters_.Bind<string>(PARAM_SELECTIVITIES, &selectivity_labels_, "The labels of the selectivities for each of the categories", ""); parameters_.Bind<unsigned>(PARAM_YEARS, &years_, "Years in which to apply the mortality process", ""); parameters_.Bind<Double>(PARAM_CATCHES, &catches_, "The biomass of removals (catches) to apply for each year", ""); parameters_.Bind<Double>(PARAM_U_MAX, &u_max_, "Maximum exploitation rate ($Umax$)", "", 0.99); parameters_.Bind<string>(PARAM_PENALTY, &penalty_label_, "The label of the penalty to apply if the total biomass of removals cannot be taken", "", ""); RegisterAsEstimable(PARAM_U_MAX, &u_max_); RegisterAsEstimable(PARAM_CATCHES, &catch_years_); process_type_ = ProcessType::kMortality; partition_structure_ = PartitionStructure::kAge; }
/** * Explicit Constructor */ AllValuesBounded::AllValuesBounded(Model* model) : Selectivity(model) { parameters_.Bind<unsigned>(PARAM_L, &low_, "L", ""); parameters_.Bind<unsigned>(PARAM_H, &high_, "H", ""); parameters_.Bind<Double>(PARAM_V, &v_, "V", ""); RegisterAsEstimable(PARAM_V, &v_); }
/** * Default constructor * * Bind any parameters that are allowed to be loaded from the configuration files. * Set bounds on registered parameters * Register any parameters that can be an estimated or utilised in other run modes (e.g profiling, yields, projections etc) * Set some initial values * * Note: The constructor is parsed to generate Latex for the documentation. */ MortalityPreySuitability::MortalityPreySuitability(Model* model) : Process(model) { process_type_ = ProcessType::kMortality; partition_structure_ = PartitionStructure::kAge; parameters_.Bind<string>(PARAM_PREY_CATEGORIES, &prey_category_labels_, "Prey Categories labels", ""); parameters_.Bind<string>(PARAM_PREDATOR_CATEGORIES, &predator_category_labels_, "Predator Categories labels", ""); parameters_.Bind<Double>(PARAM_CONSUMPTION_RATE, &consumption_rate_, "Predator consumption rate", "")->set_range(0.0, 1.0); parameters_.Bind<Double>(PARAM_ELECTIVITIES, &electivities_, "Prey Electivities", "")->set_range(0.0, 1.0); parameters_.Bind<Double>(PARAM_U_MAX, &u_max_, "Umax", "")->set_range(0.0, 1.0); parameters_.Bind<string>(PARAM_PREY_SELECTIVITIES, &prey_selectivity_labels_, "Selectivities for prey categories", ""); parameters_.Bind<string>(PARAM_PREDATOR_SELECTIVITIES, &predator_selectivity_labels_, "Selectivities for predator categories", ""); parameters_.Bind<string>(PARAM_PENALTY, & penalty_label_, "Label of penalty to be applied", "",""); parameters_.Bind<unsigned>(PARAM_YEARS, &years_, "Year that process occurs", ""); RegisterAsEstimable(PARAM_CONSUMPTION_RATE, &consumption_rate_); RegisterAsEstimable(PARAM_ELECTIVITIES, &electivities_); }
/** * Default Constructor */ SurvivalConstantRate::SurvivalConstantRate(Model* model) : Process(model), partition_(model) { LOG_TRACE(); process_type_ = ProcessType::kMortality; partition_structure_ = PartitionStructure::kAge; parameters_.Bind<string>(PARAM_CATEGORIES, &category_labels_, "List of categories", ""); parameters_.Bind<Double>(PARAM_S, &s_input_, "Survival rates", ""); parameters_.Bind<Double>(PARAM_TIME_STEP_RATIO, &ratios_, "Time step ratios for S", "", true); parameters_.Bind<string>(PARAM_SELECTIVITIES, &selectivity_names_, "Selectivity label", ""); RegisterAsEstimable(PARAM_S, &s_); }
/** * Default Constructor */ TransitionCategory::TransitionCategory(Model* model) : Process(model), from_partition_(model), to_partition_(model) { LOG_TRACE(); parameters_.Bind<string>(PARAM_FROM, &from_category_names_, "From", ""); parameters_.Bind<string>(PARAM_TO, &to_category_names_, "To", ""); parameters_.Bind<Double>(PARAM_PROPORTIONS, &proportions_, "Proportions", ""); parameters_.Bind<string>(PARAM_SELECTIVITIES, &selectivity_names_, "Selectivity names", ""); RegisterAsEstimable(PARAM_PROPORTIONS, &proportions_by_category_); process_type_ = ProcessType::kTransition; partition_structure_ = PartitionStructure::kAge; }
/** * Default constructor * * Bind any parameters that are allowed to be loaded from the configuration files. * Set bounds on registered parameters * Register any parameters that can be an estimated or utilised in other run modes (e.g profiling, yields, projections etc) * Set some initial values * * Note: The constructor is parsed to generate Latex for the documentation. */ DerivedQuantity::DerivedQuantity(Model* model) : model_(model), partition_(model) { parameters_.Bind<string>(PARAM_LABEL, &label_, "Label of the derived quantity", ""); parameters_.Bind<string>(PARAM_TYPE, &type_, "Type of derived quantity", ""); parameters_.Bind<string>(PARAM_TIME_STEP, &time_step_label_, "The time step in which to calculate the derived quantity after", ""); parameters_.Bind<string>(PARAM_CATEGORIES, &category_labels_, "The list of categories to use when calculating the derived quantity", ""); parameters_.Bind<string>(PARAM_SELECTIVITIES, &selectivity_labels_, "A list of one selectivity", ""); parameters_.Bind<Double>(PARAM_TIME_STEP_PROPORTION, &time_step_proportion_, "Proportion through the mortality block of the time step when calculated", "", Double(0.5))->set_range(0.0, 1.0); parameters_.Bind<string>(PARAM_TIME_STEP_PROPORTION_METHOD, &proportion_method_, "Method for interpolating for the proportion through the mortality block", "", PARAM_WEIGHTED_SUM) ->set_allowed_values({ PARAM_WEIGHTED_SUM, PARAM_WEIGHTED_PRODUCT }); RegisterAsEstimable(PARAM_VALUES, &override_values_); create_missing_estimables_[PARAM_VALUES] = true; mean_proportion_method_ = true; }
/** * Default constructor * * Bind any parameters that are allowed to be loaded from the configuration files. * Set bounds on registered parameters * Register any parameters that can be an estimated or utilised in other run modes (e.g profiling, yields, projections etc) * Set some initial values * * Note: The constructor is parsed to generate Latex for the documentation. */ DerivedQuantity::DerivedQuantity(Model* model) : model_(model), partition_(model) { parameters_.Bind<string>(PARAM_LABEL, &label_, "Label", ""); parameters_.Bind<string>(PARAM_TYPE, &type_, "Type", ""); parameters_.Bind<string>(PARAM_TIME_STEP, &time_step_label_, "The time step to calculate the derived quantity after", ""); parameters_.Bind<string>(PARAM_CATEGORIES, &category_labels_, "The list of categories to use when calculating the derived quantity", ""); parameters_.Bind<string>(PARAM_SELECTIVITIES, &selectivity_labels_, "The list of selectivities to use when calculating the derived quantity. 1 per category", ""); parameters_.Bind<Double>(PARAM_TIME_STEP_PROPORTION, &time_step_proportion_, "", "", Double(1.0)); parameters_.Bind<string>(PARAM_TIME_STEP_PROPORTION_METHOD, &proportion_method_, "", "", PARAM_WEIGHTED_SUM) ->set_allowed_values({ PARAM_WEIGHTED_SUM, PARAM_WEIGHTED_PRODUCT }); RegisterAsEstimable(PARAM_VALUES, &override_values_); create_missing_estimables_[PARAM_VALUES] = true; mean_proportion_method_ = true; }
/** * Default constructor */ Constant::Constant(Model* model) : TimeVarying(model) { parameters_.Bind<Double>(PARAM_VALUE, &values_, "Value to assign to estimable", ""); RegisterAsEstimable(PARAM_VALUE, ¶meter_by_year_); }
/** * Default constructor * * Bind any parameters that are allowed to be loaded from the configuration files. * Set bounds on registered parameters * Register any parameters that can be an estimated or utilised in other run modes (e.g profiling, yields, projections etc) * Set some initial values * * Note: The constructor is parsed to generate Latex for the documentation. */ Free::Free() { parameters_.Bind<Double>(PARAM_Q, &q_, "The catchability amount", ""); RegisterAsEstimable(PARAM_Q, &q_); }