Hi, I’m a new user and probably the solution of my problem is simple. However, I’m studying a convex model with constraints “b<=g(x)” defined by convex function like:
g(x)=x for x<=1
g(x)=2-e^(1-x) for x>1
so, to make CVX and Mosek solve the problem I needed to use the ‘big M’ approach and to add a binary variable (any suggestion to avoid using exp functions or binary variables?).
I successfully modeled the problem, I think, but CVX says it’s Unbounded. The model is big, but i find that the next code gives also the status Unbounded and Optimal value ‘-Inf’
cvx_begin
variables x variable z binary minimize ( x ) subject to 1<=x; x<=5*z; 0<=10-exp(-x);
cvx_end
If I comment one or both of the two last constraints CVX gives the right Optimal value 1.
I’m using CVX 2.1 under professional license and mosek academic license, under MATLAB on Windows 32-bit.
UPDATE: If I run the “cvx_version” command and then I run the code, CVX gives me the following error
Function ‘subsindex’ is not defined for values of class ‘struct’.
Error in cvxprob/solve (line 247)
[ x, status, tprec, iters2, y, z ] = shim.solve( [ At, Anew2 ], [ b ; bnew ], c, cones, true, prec, solv.settings,
eargs{:} );Error in cvx_end (line 88)
solve( prob );Error in inf_error_test (line 18)
cvx_end
If, then, I run “cvx_setup” together with the path to the cvx_license.dat file, then I came back to the initial situation: status Unbounded and optimal value -Inf