A confused simple problem

(Yu ) #1

I met a simple-form problem that confused me a lot, the problem is given below:

cvx_begin
variable l_u
minimize sum(sum( 1.0000e-18*pow_pos(l_u,3) ))
subject to

    l_u >= 1e6;
    l_u <= 2*1e6;
    l_u >= 0;       

cvx_end

By CVX tool, the result is NAN, and status is Failed. I feel very confused and do not know what the reason is. I will really appreciate it if someone can help me sovle this problem.

(Yu ) #2

The result is also Failed if remove the constant 1e-18.

(Erling D.Andersen) #3

Let us assume that l_u is USD. Then why not change the unit to millions of USD.

In other words you have chosen a crazy unit for the variables. The 10^-18 is just one sign of that fact.

(Mark L. Stone) #4

The problem is basically overflow due to pow_pos(l_u,3) being too large. The problem in reality is feasible, but the double precision solvers get overwhelmed by pow_pos(l_u,3) of such a large number, and “incorrectly” conclude the problem is infeasible. I am not sure which transformations are being applied by CVX vs. inside the solver, so I am not attributing any blame.

Even without the 1e-18, the difficulty is pow_pos(l_u,3). The minimum value for that is pow_pos(1e6,3), which is 1e18. If the lower bound on l_u were 1e2 (or maybe 1e3 depending on the solver), rather than 1e6, the problem would be marginally solvable,.

So as @Erling says, you will need to rescale the variable(s) in your problem. Presumably, you have in mind a more complicated problem, because the optimal solution of this problem will always be on the lower bound . Note that your constraint l_u >= 0; is superfluous due to the constraint l_u >= 1e6; Also, given that l_u is a scalar variable, the sum(sum( in the objective function is superfluous.

(Yu ) #5

I have solved and understood this problem based on your instruction, thanks for your help.

(Yu ) #6

I have tackled it, thanks for your help.