This file illustrates the effect of a non-convex feasible region in a variation of the WYNDOR Glass Company example given in Hillier and Lieberman, Section 13.2.

We use the Ipopt solver backend which can handle nonlinear constraints and nonlinear objective functions.

For non-convex problems such as this, there may be several local optima and the solver may return a local optimum which is not a global optimum. The solution which gets returned depends on the initial value.

For this problem, the default initialization happens to converge to the global maximum at $x=0$ and $y=7$. However, other initial values result in convergence to the local maximum $x=4$ and $y=3$.

In the code below, we pass an explicit initial value for the search to each of the decision variables.

Next a quick visualization of the feasible region for example (1):