Pattern for which Ipopt returns suboptimal solutions #832
Replies: 1 comment 2 replies
-
|
Lurking here - I'm also interested in the answer, to better understand IPOPT's internal workings. FWIW my take on this problem is that while the constraint function is twice continuously differentiable, the shape of the constraint landscape, while smoothed, is essentially still a step function. This means that where we make the jump from 0 to 10 we do get quite large values in the Jacobian of the constraints, but outside of that we get zero, with a bit of interpolation due to the tanh. |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I constructed an NLP for which Ipopt only finds a suboptimal solution for certain initial guesses. Furthermore, I believe there's a pattern for which initial guesses Ipopt returns a suboptimal solution. I guess Ipopt is stuck in a local minima. Nevertheless, I'm wondering whether this is a bug, a limitation of Ipopt or whether this needs to be considered as "provide bad initial guess, get bad result".
NLP
Decision variables
My NLP consists of three decision variables:
Constraints
There are two constraints:
That means, if$x_1$ is larger then 1, then $x_2$ needs to be larger than 10. Otherwise $x_2$ needs to be only non-negative.
Objective function
The objective function is given by$f := (x_0 - 0)^2 + (x_1 - 0.75)^2$
Optimal solution
The optimal solution I expect is:$x_0^* = 0, x_1^* = 0.75, x_2^* = 0.75$ with an objective value of $0$
Supoptimal solution
I have observed that if I provide a (feasible) initial guess (denoted by subscript$^0$ ) for which $x_1^0 > 1$ , then Ipopt returns an suboptimal solution for which $\tilde{x}_1 > 1$ and $\tilde{x}_2 = 10$ holds, i.e. exactly the lower bound I have specified for the case $x_1 > 1$ .
Examples (with smoothening function as in the code-snippet further below):
If the initial guess starts below the threshold, i.e.$x_1^0 < 1$ , then the returned solution looks ok. For instance:
I (who does not really know how Ipopt works internally), interpret it like this:
Conclusion / Questions
Thank you for taking the time of reading my post. I am grateful for any help.
Best Regards,
Matthias
Code-Snippet
Below is the python-script with four different scenarios:
Here's an image how my smoothening function looks like:
And here is my python-code. SW I use:
and probably not relevant:
And corresponding output:
Beta Was this translation helpful? Give feedback.
All reactions