Cannot get optimal solution for a very simple model
Posted: Fri Sep 21, 2018 10:15 am
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;
%%%%%%%%%%%%%
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;
%%%%%%%%%%%%%