Loading a minimal AGEPRO input model (saving a agepro_inp_model via create_agepro_model and loag
# dev-runAgePro branch
test <- create_agepro_model()
#Replace NULL Recruitment with Beverton-Holt Model 5
test$set_recruit_model(5)
test$write_inp("untitled1.INP")
rm(test)
test <- import_agepro_model("untitled.INP")
✔ Agepro Model Initialized
Use the File Dialog Window to open a file ...
→ AGEPRO Model Projection analyses type set to standard
→ line 1:
ℹ Version: 'AGEPRO VERSION 4.25'
→ line 2: [CASEID]
→ Line 3: CASE ID: Unnamed AGEPRO model
→ line 4: [GENERAL]
→ Line 4 : Reading AGEPRO model GENERAL options ...
ℹ yr_start (First Year in Projection): 0
ℹ yr_end (Last Year in Projection): 2
ℹ age_begin (First Age Class): 1
ℹ age_end (Last Age Class): 6
ℹ num_pop_sims (Number of Population Simulations): 1000
ℹ num_fleets (Number of Fleets): 1
ℹ num_rec_models (Number of Recruitment Model(s)): 1
ℹ discards_present (Discards are present): FALSE
ℹ seed (Calculation Engine Random Number Seed): 89115292
→ line 5: [BOOTSTRAP]
→ Line 6:
ℹ num_bootstraps: 0
ℹ pop_scale_factor (BootFac): 0
→ Line 7: bootstrap_file: "[STOCK_WEIGHT]"
→ line 8: 0 1
Input line 8 does not match AGEPRO keyword parameter
→ line 9: NA NA NA NA NA NA
Input line 9 does not match AGEPRO keyword parameter
→ line 10: NA NA NA NA NA NA
Input line 10 does not match AGEPRO keyword parameter
→ line 11: NA NA NA NA NA NA
Input line 11 does not match AGEPRO keyword parameter
→ line 12: NA NA NA NA NA NA
Input line 12 does not match AGEPRO keyword parameter
→ line 13: [SSB_WEIGHT]
→ Reading ssb_weight: Spawning Stock Weight of Age
→ Line 14:
ℹ input_option: 0 (Read from input data)
ℹ time_varying: TRUE
✖ There was an error reading this file.
Error in read_inp_numeric_line(inp_con): Line contains a Non Numeric SubstringNA, NA, NA, NA, NA, NA
→ Closing connection to file.
Warning message:
'[STOCK_WEIGHT]' is an invalid path or doesn't exist in working directory.
Please save AGEPRO input files with a vaild bootstrap_file, especially with running models with the calculation engine.
When creating Parameter Table and CV Tables for Process Error and Harvest/Projection Analyses keyword parameters, non-numeric NA values are created by default.
|
create_parameter_table = function(fleet_yr_rows, ages_cols) { |
|
|
|
return(matrix(rep(NA, (fleet_yr_rows * ages_cols) ) , |
|
nrow = fleet_yr_rows, |
|
ncol = ages_cols)) |
|
|
|
}, |
Todo:
Resolution
Converting default NA values to 0 will resolve this.
Loading a minimal AGEPRO input model (saving a
agepro_inp_modelviacreate_agepro_modeland loagWhen creating Parameter Table and CV Tables for Process Error and Harvest/Projection Analyses keyword parameters, non-numeric NA values are created by default.
ageproR/R/process_error.R
Lines 79 to 85 in cf9f31f
Todo:
Resolution
Converting default
NAvalues to0will resolve this.