[Question is modified, new problem]
Below the summary of the optimization:
First-order Norm of
Iter F-count f(x) Feasibility optimality step
0 31 1.000000e+000 2.861e-002 2.953e-001
1 64 1.014641e+000 2.436e-002 2.828e-001 2.128e-001
2 102 9.694119e-001 2.687e-002 2.337e-001 3.434e-001
3 134 8.288362e-001 6.156e-002 2.035e+000 1.497e+000
4 166 7.100228e-001 1.584e-002 4.751e+000 1.069e+000
No feasible solution found.
fmincon stopped because the size of the current step is less than
the selected value of the step size tolerance but constraints were not
satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
When I load the data created at the fourth iteration, it seems like all constraints have been met. They are all negative. Then there is another strange thing: After the fourth iteration, the objective function is called onces more, with ridiculous values. It creates an objective value which is very large and the constraints are violated heavily. What is causing this last function call? This last function call is probably also causing the 'no feasible solution found' message, right?
I'm using fmincon, with an interior-point algorithm, with the following options: