I’m trying to use JuMP and Ipopt for this optimization problem below. I keep getting errors like “Infeasible_Problem_Detected”, “Search_Direction_Becomes_Too_Small”, “Restoration_Failed”, for various datasets.

I read Ipopt documentation about these errors at https://www.coin-or.org/Ipopt/documentation/node36.html. But I’m still having trouble understanding what in my data could cause these errors, because my other datasets fitted to global optima with no problem. Sometimes changing the start value of variables helps it go from those errors to fitting to global optima. But it’ll still be nice to know more about the cause of those errors. I don’t have math background, so I’m not sure what exactly happened mathematically that led to those errors.

Also, in some cases when I got “Search_Direction_Becomes_Too_Small”, I plotted the predicted data and it actually fitted pretty close to the observed values.

Let me know if I need to post actual data. Thanks!

```
cycs::Vector{Integer} = some_vector_1
obs_fluos::Vector{AbstractFloat} = some_vector_2
m = Model(solver=IpoptSolver(max_iter=200))
@variable(m, fb, start=0)
@variable(m, eu0 >= 0, start=1000)
@variable(m, d0 >= 0, start=1)
@variable(m, inh >= 0, start=1e-6)
@variable(m, f[cycs2fit])
@variable(m, eu[cycs2fit] >= 0)
@variable(m, d[cycs2fit] >= 0)
@constraint(m, f_constr[cyc in cycs2fit], f[cyc] == fb + d[cyc])
@NLconstraint(m, eu_constr_01, eu[1] == eu0 / (1 + inh * d0))
@NLconstraint(m, d_constr_01, d[1] == d0 + d0 * eu[1] / (eu[1] + d0))
@NLconstraint(m, eu_constr_2p[cyc in cycs2fit[2:end]], eu[cyc] == eu[cyc-1] / (1 + inh * d[cyc-1]))
@NLconstraint(m, d_constr_2p[cyc in cycs2fit[2:end]], d[cyc] == d[cyc-1] + 1 / (1 / d[cyc-1] + 1 / eu[cyc]))
@NLobjective(m, Min, sum((f[cycs[idx]] - obs_fluos[idx]) ^ 2 for idx in idc2fit))
status = solve(m)
```