Cannot get optimal solution for a very simple model

Problems with modeling
Post Reply
feifan
User
User
Posts: 5
Joined: 1 month ago

Cannot get optimal solution for a very simple model

Post by feifan » 3 weeks ago

Hi, all,

I write a simple QCP problem as follows, and I used different solvers to solve it. But, some of them, such as CONOPT, IPOPT, cannot get the optimal solution.

Clearly, the optimal solution is x=1, the optimal objective value is -1. However, some solvers return x=0.

Could someone help me solve this problem?

%%%

positive variable x;
free variable y;
Option optca=0;
Option optcr=0;
x.up=1.0;

equation
obj,
cons1;

obj .. y=e=-x;
cons1 .. x*(x-1)=g=0;

model problem /obj,cons1/;
solve problem using qcp minimzing y;
display x.l,y.l;

%%%%%%%%%%%%%

User avatar
bussieck
Moderator
Moderator
Posts: 162
Joined: 2 years ago

Re: Cannot get optimal solution for a very simple model

Post by bussieck » 3 weeks ago

That is not surprising. Conopt, Ipopt, Snopt, ... are local solvers. They terminate in a local optimum (KKT conditions are fulfilled). You see this in the model status: **** MODEL STATUS 2 Locally Optimal. You need a solver with a global perspective to get the global optimum for a non-convex problem as yours, e.g. Antigone, Baron, ... (see solver table at https://www.gams.com/latest/docs/S_MAIN ... ODEL_TYPES and check the last column 'Global'). You can also pay more attention to your starting point. The Conopt manual (https://www.gams.com/latest/docs/S_CONO ... IAL_VALUES) is a good source for information on that.

-Michael

Post Reply