Hello everyone,
I’m working on a dynamic food web and solving some differential equations. As solver I’m using the DP5 monte carlo method.
After successful solving the problem I get for every time steps 4 time the same solution. Is this due to the integration method or do I missing something important here?
#define the Problem
prob = ODEProblem(func!,Pop_0,tspan, p)#interaget over T
solution = solve(
prob,
DP5(),
alg_hints=[:stiff],
callback=cbs,
reltol=1e-5, abstol=1e-5
)
My resulting array looks like:
retcode: Success
Interpolation: specialized 4th order “free” interpolation
t: 74509-element Vector{Float64}:
0.0
0.06151151478470839
0.06151151478470839
0.06151151478470839
0.06151151478470839
0.10007934446598787
0.10007934446598787
0.10007934446598787
0.10007934446598787
0.1414257567694495
0.1414257567694495
0.1414257567694495
0.1414257567694495
…
u: 74509-element Vector{Vector{Float32}}:
[0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7 … 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 3.458987, 5.472233]
[0.69995475, 0.7004576, 0.6996806, 0.6987875, 0.7000644, 0.700556, 0.7007521, 0.70014256, 0.7002482, 0.7001211 … 0.40155038, 0.3999803, 0.39996803, 0.39976335, 0.40271047, 0.39978436, 0.39998668, 0.39997968, 3.4524565, 5.5260825]
[0.69995475, 0.7004576, 0.6996806, 0.6987875, 0.7000644, 0.700556, 0.7007521, 0.70014256, 0.7002482, 0.7001211 … 0.40155038, 0.3999803, 0.39996803, 0.39976335, 0.40271047, 0.39978436, 0.39998668, 0.39997968, 3.4524565, 5.5260825]
[0.69995475, 0.7004576, 0.6996806, 0.6987875, 0.7000644, 0.700556, 0.7007521, 0.70014256, 0.7002482, 0.7001211 … 0.40155038, 0.3999803, 0.39996803, 0.39976335, 0.40271047, 0.39978436, 0.39998668, 0.39997968, 3.4524565, 5.5260825]
[0.69995475, 0.7004576, 0.6996806, 0.6987875, 0.7000644, 0.700556, 0.7007521, 0.70014256, 0.7002482, 0.7001211 … 0.40155038, 0.3999803, 0.39996803, 0.39976335, 0.40271047, 0.39978436, 0.39998668, 0.39997968, 3.4524565, 5.5260825]
…
Thanks for the Help,
DerOzean