Quadratic constrained convex problem

Hello,
please, can you help me with my (probably very simple) problem? I wanted to solve a convex (quadratic) toy problem using the QCP solver. But, I realized that it doesn’t work properly. In particular, it simply ignores the quadratic terms in the constraint (e.g. if I set the coefficient for x1 in the constraint to zero, there is no feasible solution).

Thank you very much for any help.

Frantisek

FREE VARIABLES
             OF        objective function's value;

VARIABLE
             x1 variable 1
             x2 variable 2 ;

EQUATION

    obj          objective function
    con          constraint
    bound_x1     non-negativity constraint for x1
    bound_x2     non-negativity constraint for x2;

    obj..         OF=e=1*x2+.01*power(x1,2);
    con..         0.01*x1+5*power(x2,2)=g=100;
    bound_x1..    x1=g=0;
    bound_x2..    x2=g=0;

MODEL nonlinear_problem /all/;

SOLVE nonlinear_problem USING QCP minimizing OF;

Not sure what you mean. If I solve this with a global solver like Antigone, Baron, Couenne, LindoGlobal, or SCIP (since this is a non-convex QCP) I get a good solution:

                       LOWER     LEVEL     UPPER    MARGINAL

---- VAR OF             -INF      4.472     +INF       .         
---- VAR x1             -INF      0.011     +INF       .         
---- VAR x2             -INF      4.472     +INF       .

Not sure what solver you used, but if it is a local solver make sure to set good starting values. See https://www.gams.com/latest/docs/S_CONOPT.html#CONOPT_INITIAL_VALUES for a discussion on starting values.

-Michael

Thank you for your answer Michael. Ok, so that is my stupid mistake - I did not know that I have to set the NLP solver manually. Now, it works.

Thanks a lot again,
Frantisek