So I did another test where I tried to print out any parameter values where the ODE solver failed during the course of the optimization. Well, it did indeed fail after a couple runs and here’s what it printed out (just returning the current value of the objective function’s argument):
The x values that were passed to objective():
ForwardDiff.Dual{ForwardDiff.Tag{var"#objective#59"{typeof(OneAgeModel!),
Vector{Symbol}, Vector{Float64}, Vector{Int64}, Vector{Int64}, Vector{Int64},
Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64,
typeof(mean_square_rel_error), Vector{Real}, Vector{Union{Missing, Real}},
Vector{Union{Missing, Real}}, Tsit5, Float64, Float64, Int64, Int64, Int64, Vector{String},
DataFrame}, Float64}, Float64, 10}[Dual{ForwardDiff.Tag{var"#objective#59"
{typeof(OneAgeModel!), Vector{Symbol}, Vector{Float64}, Vector{Int64}, Vector{Int64},
Vector{Int64}, Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64, typeof(mean_square_rel_error), Vector{Real}, Vector{Union{Missing, Real}},
Vector{Union{Missing, Real}}, Tsit5, Float64, Float64, Int64, Int64, Int64, Vector{String},
DataFrame}, Float64}}(NaN,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0),
Dual{ForwardDiff.Tag{var"#objective#59"{typeof(OneAgeModel!), Vector{Symbol},
Vector{Float64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Real},
Vector{Real}, typeof(f_ICs), Float64, typeof(mean_square_rel_error), Vector{Real},
Vector{Union{Missing, Real}}, Vector{Union{Missing, Real}}, Tsit5, Float64, Float64,
Int64, Int64, Int64, Vector{String}, DataFrame}, Float64}}
(NaN,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0), Dual{ForwardDiff.Tag{var"#objective#59"
{typeof(OneAgeModel!), Vector{Symbol}, Vector{Float64}, Vector{Int64}, Vector{Int64},
Vector{Int64}, Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64,
typeof(mean_square_rel_error), Vector{Real}, Vector{Union{Missing, Real}},
Vector{Union{Missing, Real}}, Tsit5, Float64, Float64, Int64, Int64, Int64, Vector{String},
DataFrame}, Float64}}(NaN,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0),
Dual{ForwardDiff.Tag{var"#objective#59"{typeof(OneAgeModel!), Vector{Symbol},
Vector{Float64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Real},
Vector{Real}, typeof(f_ICs), Float64, typeof(mean_square_rel_error), Vector{Real},
Vector{Union{Missing, Real}}, Vector{Union{Missing, Real}}, Tsit5, Float64, Float64,
Int64, Int64, Int64, Vector{String}, DataFrame}, Float64}}
(NaN,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0), Dual{ForwardDiff.Tag{var"#objective#59"
{typeof(OneAgeModel!), Vector{Symbol}, Vector{Float64}, Vector{Int64}, Vector{Int64},
Vector{Int64}, Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64,
typeof(mean_square_rel_error), Vector{Real}, Vector{Union{Missing, Real}},
Vector{Union{Missing, Real}}, Tsit5, Float64, Float64, Int64, Int64, Int64, Vector{String},
DataFrame}, Float64}}(NaN,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0),
Dual{ForwardDiff.Tag{var"#objective#59"{typeof(OneAgeModel!), Vector{Symbol},
Vector{Float64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Real},
Vector{Real}, typeof(f_ICs), Float64, typeof(mean_square_rel_error), Vector{Real},
Vector{Union{Missing, Real}}, Vector{Union{Missing, Real}}, Tsit5, Float64, Float64,
Int64, Int64, Int64, Vector{String}, DataFrame}, Float64}}
(NaN,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0), Dual{ForwardDiff.Tag{var"#objective#59"
{typeof(OneAgeModel!), Vector{Symbol}, Vector{Float64}, Vector{Int64}, Vector{Int64},
Vector{Int64}, Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64,
typeof(mean_square_rel_error), Vector{Real}, Vector{Union{Missing, Real}},
Vector{Union{Missing, Real}}, Tsit5, Float64, Float64, Int64, Int64, Int64, Vector{String},
DataFrame}, Float64}}(NaN,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0),
Dual{ForwardDiff.Tag{var"#objective#59"{typeof(OneAgeModel!), Vector{Symbol},
Vector{Float64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Real},
Vector{Real}, typeof(f_ICs), Float64, typeof(mean_square_rel_error), Vector{Real},
Vector{Union{Missing, Real}}, Vector{Union{Missing, Real}}, Tsit5, Float64, Float64,
Int64, Int64, Int64, Vector{String}, DataFrame}, Float64}}
(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0), Dual{ForwardDiff.Tag{var"#objective#59"
{typeof(OneAgeModel!), Vector{Symbol}, Vector{Float64}, Vector{Int64}, Vector{Int64},
Vector{Int64}, Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64,
typeof(mean_square_rel_error), Vector{Real}, Vector{Union{Missing, Real}},
Vector{Union{Missing, Real}}, Tsit5, Float64, Float64, Int64, Int64, Int64, Vector{String},
DataFrame}, Float64}}(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0),
Dual{ForwardDiff.Tag{var"#objective#59"{typeof(OneAgeModel!), Vector{Symbol},
Vector{Float64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Real},
Vector{Real}, typeof(f_ICs), Float64, typeof(mean_square_rel_error), Vector{Real},
Vector{Union{Missing, Real}}, Vector{Union{Missing, Real}}, Tsit5, Float64, Float64,
Int64, Int64, Int64, Vector{String}, DataFrame}, Float64}}
(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0), Dual{ForwardDiff.Tag{var"#objective#59"
{typeof(OneAgeModel!), Vector{Symbol}, Vector{Float64}, Vector{Int64}, Vector{Int64},
Vector{Int64}, Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64,
typeof(mean_square_rel_error), Vector{Real}, Vector{Union{Missing, Real}},
Vector{Union{Missing, Real}}, Tsit5, Float64, Float64, Int64, Int64, Int64, Vector{String},
DataFrame}, Float64}}(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0),
Dual{ForwardDiff.Tag{var"#objective#59"{typeof(OneAgeModel!), Vector{Symbol},
Vector{Float64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Real},
Vector{Real}, typeof(f_ICs), Float64, typeof(mean_square_rel_error), Vector{Real},
Vector{Union{Missing, Real}}, Vector{Union{Missing, Real}}, Tsit5, Float64, Float64,
Int64, Int64, Int64, Vector{String}, DataFrame}, Float64}}
(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0), Dual{ForwardDiff.Tag{var"#objective#59"
{typeof(OneAgeModel!), Vector{Symbol}, Vector{Float64}, Vector{Int64}, Vector{Int64},
Vector{Int64}, Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64,
typeof(mean_square_rel_error), Vector{Real}, Vector{Union{Missing, Real}},
Vector{Union{Missing, Real}}, Tsit5, Float64, Float64, Int64, Int64, Int64, Vector{String},
DataFrame}, Float64}}(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0),
Dual{ForwardDiff.Tag{var"#objective#59"{typeof(OneAgeModel!), Vector{Symbol},
Vector{Float64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Real},
Vector{Real}, typeof(f_ICs), Float64, typeof(mean_square_rel_error), Vector{Real},
Vector{Union{Missing, Real}}, Vector{Union{Missing, Real}}, Tsit5, Float64, Float64,
Int64, Int64, Int64, Vector{String}, DataFrame}, Float64}}
(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0), Dual{ForwardDiff.Tag{var"#objective#59"
{typeof(OneAgeModel!), Vector{Symbol}, Vector{Float64}, Vector{Int64}, Vector{Int64},
Vector{Int64}, Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64,
typeof(mean_square_rel_error), Vector{Real}, Vector{Union{Missing, Real}},
Vector{Union{Missing, Real}}, Tsit5, Float64, Float64, Int64, Int64, Int64, Vector{String},
DataFrame}, Float64}}(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0),
Dual{ForwardDiff.Tag{var"#objective#59"{typeof(OneAgeModel!), Vector{Symbol},
Vector{Float64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Real},
Vector{Real}, typeof(f_ICs), Float64, typeof(mean_square_rel_error), Vector{Real},
Vector{Union{Missing, Real}}, Vector{Union{Missing, Real}}, Tsit5, Float64, Float64,
Int64, Int64, Int64, Vector{String}, DataFrame}, Float64}}
(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0), Dual{ForwardDiff.Tag{var"#objective#59"
{typeof(OneAgeModel!), Vector{Symbol}, Vector{Float64}, Vector{Int64}, Vector{Int64},
Vector{Int64}, Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64,
typeof(mean_square_rel_error), Vector{Real}, Vector{Union{Missing, Real}},
Vector{Union{Missing, Real}}, Tsit5, Float64, Float64, Int64, Int64, Int64, Vector{String},
DataFrame}, Float64}}(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0),
Dual{ForwardDiff.Tag{var"#objective#59"{typeof(OneAgeModel!), Vector{Symbol},
Vector{Float64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64, typeof(mean_square_rel_error), Vector{Real},
Vector{Union{Missing, Real}}, Vector{Union{Missing, Real}}, Tsit5, Float64, Float64,
Int64, Int64, Int64, Vector{String}, DataFrame}, Float64}}
(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0), Dual{ForwardDiff.Tag{var"#objective#59"
{typeof(OneAgeModel!), Vector{Symbol}, Vector{Float64}, Vector{Int64}, Vector{Int64},
Vector{Int64}, Vector{Int64}, Vector{Real}, Vector{Real}, typeof(f_ICs), Float64,
typeof(mean_square_rel_error), Vector{Real}, Vector{Union{Missing, Real}},
Vector{Union{Missing, Real}}, Tsit5, Float64, Float64, Int64, Int64, Int64, Vector{String},
DataFrame}, Float64}}(NaN,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0)]
One observation: There NaN’s in the vectors that look like (NaN,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0) look problematic, though it’s not clear to me what these are: they have length 11, yet the objective function’s argument should have a length of 19 (since that’s the number of variables being minimized)…(And the ODE model has 10 variables).
Also, I’m not sure why it printed this huge long string of symbols rather than just the single tuple of values…
A MRE is in the works!