How to fix Gekko’s `@error: Solution not found`
I want to perform parameter inference for an ODE model (m.options.IMODE = 5
). I have 2 models in Gekko. First, I generate model data from each model, and perform parameter inference directly on the corresponding model data. That works no problem for each model. Then, I attempt to perform parameter inference on real data, that has roughly the same number of datapoints as the model data. The first model finds a reasonable fit, the second one crashes with @error: Solution not found
. I would like to learn the procedure of debugging problems like this.
Why is my basic Gekko ODE solver much slower than Scipy?
In this minimal example I want to solve the basic integrator ODE dT/dt = k[F(t) - T(t)]
where F(t)
is a forcing vector, which is selected to be a square wave. I have implemented two procedures to solve the ODE: Using Scipy’s solve_ivp
and using Gekko. The former takes 6 milliseconds to run, the latter takes 8 seconds to run. Am I doing something wrong with Gekko? Are there some additional parameters that I can tune to improve performance?