Error message when trying to fit the model

Hi Everyone,
I try to fit a model, however, I receive the following error which I am not able to interpret

Something went wrong. Integrator stepped past tstops but the algorithm was dtchangeable. Please report this error.
error(::String) at error.jl:33
handle_tstop!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Vern7,Rodas5{0,true,DefaultLinSolve,DataType}},OrdinaryDiffEq.AutoSwitchCache{Vern7,Rodas5{0,true,DefaultLinSolve,DataType},Rational{Int64},Int64}},true,LabelledArrays.LArray{ForwardDiff.Dual{ForwardDiff.Tag{Pumas.var"#335#336"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},PumasModel{ParamSet{NamedTuple{(:tvPOP_CIRC0, :tvPOP_MTT, :tvPOP_GAMMA, :tvPOP_SLOP, :Ω, :σ_prop),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Int64},RealDomain{Int64,TransformVariables.Infinity{true},Int64},RealDomain{Int64,TransformVariables.Infinity{true},Int64},RealDomain{Int64,TransformVariables.Infinity{true},Int64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Int64}}}},var"#490#521",var"#491#522",var"#493#524",ODEProblem{Nothing,Tuple{Nothing,Nothing},true,Nothing,ODEFunction{true,var"#494#525",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#495#526",var"#508#539"},Subject{NamedTuple{(:ANC,),Tuple{Array{Union{Missing, Float64},1}}},Pumas.ConstantInterpolationStructArray{Array{Float64,1},StructArrays.StructArray{NamedTuple{(:BSA, :BILIRUBIN, :SEX, :AGE),Tuple{Float64,Float64,Int64,Int64}},1,NamedTuple{(:BSA, :BILIRUBIN, :SEX, :AGE),Tuple{Array{Float64,1},Array{Float64,1},Array{Int64,1},Array{Int64,1}}},Int64},Symbol},Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Nothing,Int64},1},Array{Float64,1}},NamedTuple{(:tvPOP_CIRC0, :tvPOP_MTT, :tvPOP_GAMMA, :tvPOP_SLOP, :σ_prop, :Ω),Tuple{Float64,Int64,Float64,Float64,Float64,Diagonal{Float64,Array{Float64,1}}}}},Float64},ForwardDiff.Dual{ForwardDiff.Tag{Pumas.var"#335#336"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},PumasModel{ParamSet{NamedTuple{(:tvPOP_CIRC0, :tvPOP_MTT, :tvPOP_GAMMA, :tvPOP_SLOP, :Ω, :σ_prop),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Int64},RealDomain{Int64,TransformVariables.Infinity{true},Int64},RealDomain{Int64,TransformVariables.Infinity{true},Int64},RealDomain{Int64,TransformVariables.Infinity{true},Int64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Int64}}}},var"#490#521",var"#491#522",var"#493#524",ODEProblem{Nothing,Tuple{Nothing,Nothing},true,Nothing,ODEFunction{true,var"#494#525",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#495#526",var"#508#539"},Subject{NamedTuple{(:ANC,),Tuple{Array{Union{Missing, Float64},1}}},Pumas.ConstantInterpolationStructArray{Array{Float64,1},StructArrays.StructArray{NamedTuple{(:BSA, :BILIRUBIN, :SEX, :AGE),Tuple{Float64,Float64,Int64,Int64}},1,NamedTuple{(:BSA, :BILIRUBIN, :SEX, :AGE),Tuple{Array{Float64,1},Array{Float64,1},Array{Int64,1},Array{Int64,1}}},Int64},Symbol},Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Nothing,Int64},1},Array{Float64,1}},NamedTuple{(:tvPOP_CIRC0, :tvPOP_MTT, :tvPOP_GAMMA, :tvPOP_SLOP, :σ_prop, :Ω),Tuple{Float64,Int64,Float64,Float64,Float64,Diagonal{Float64,Array{Float64,1}}}}},Float64},Float64,1},1},1,Array{ForwardDiff.Dual{ForwardDiff.Tag{Pumas.var"#335#336"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},PumasModel{ParamSet{NamedTuple{(:tvPOP_CIRC0, :tvPOP_MTT, :tvPOP_GAMMA, :tvPOP_SLOP, :Ω, :σ_prop),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Int64},RealDomain{Int64,TransformVariables.Infinity{true},Int64},RealDomain{Int64,TransformVariables.Infinity{true},Int64},RealDomain{Int64,TransformVariables.Infinity{true},Int64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Int64}}}},var"#490#521",var"#491#522",var"#493#524",ODEProblem{Nothing,Tuple{Nothing,Nothing},true,Nothing,ODEFunction{true,var"#494#525",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#495#526",var"#508#539"},Subject{NamedTuple{(:ANC,),Tuple{Array{Union{Missing, Float64},1}}},Pumas.ConstantInterpolationStructArray{Array{Float64,1},StructArrays.StructArray{NamedTuple{(:BSA, :BILIRUBIN, :SEX, :AGE),Tuple{Float64,Float64,Int64,Int64}},1,NamedTuple{(:BSA, :BILIRUBIN, :SEX, :AGE),Tuple{Array{Float64,1},Array{Float64,1},Array{Int64,1},Array{Int64,1}}},Int64},Symbol},Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Nothing,Int64},1}…

It looks like the ODE solver couldn’t solve the ODE. This is very rare. It’s possible your ODE contains very large numbers or very small or even things like NaN which can cause errors like this. If your parameters are not constrained to upper and lower bounds, try setting bounds. If things still break, make the bounds narrow and then experiment with widening them gradually. Or if you have an example that breaks, I can look into it.

Hi Mohamed,

Thanks for the reply. I think I figured out where the error comes from. The idea is that I have observation and dosing at same time point (0,0). So I added a little dummy time to the second row so that the time is increasing (0,0.00001) since Pumas does not allow two records with the same time. It seems that this very minute increase caused the error. So I increased the time to a little bet higher value and it worked.

1 Like