A 'Unbounded objective function (MOSEK)' problem happens while trying to solve a SOCP in Matlab

150 views
Skip to first unread message

wei chen

unread,
Oct 25, 2017, 4:13:28 AM10/25/17
to YALMIP
Hi John, 

Thanks very much for creating this fantastic tool which makes things much easier. 
I'm currently using it in solving my SOCP problem in Matlab enviroment. The solver is MOSEK.
Now I have several questions in using it. Could you please have a look at them? I would highly appreciate your response.
And there is the code:
clear
clc
%%           <Variable statememt>
x
= sdpvar (3, 1);
y
= sdpvar (2, 1);
z
= sdpvar (2, 1);
%%           <constraint statememt>
constraint
= [ ];
constraint
= [constraint, x(1,1)==12.66^2/sqrt(2)];
constraint
= [constraint, x(2,1)>=0];
constraint
= [constraint, x(3,1)>=0];
constraint
= [constraint, y(1,1)>=0];
constraint
= [constraint, y(2,1)>=0];
%------------------------------------The Rotated Quadratic Constraint---------
constraint
= [ constraint, rcone( [y(1,1) ; z(1,1)], x(1,1), x(2,1) ) ];
constraint
= [ constraint, rcone( [y(2,1) ; z(2,1)], x(2,1), x(3,1) ) ];
%%----------------------------------The Linear Constraint------------------
 constraint
= [constraint, sqrt(2)*10.2195*x(2,1)-10.2195*(y(1,1)+y(2,1))+5.2088*(-z(1,1)+z(2,1)) == -0.10];
 constraint
= [constraint, sqrt(2)*5.2088*x(2,1)-5.2088*(y(1,1)+y(2,1))-10.2195*(-z(1,1)+z(2,1)) == -0.06];
 constraint
= [constraint, sqrt(2)*1.6106*x(3,1)-1.6106*y(2,1)+0.8203*(-z(2,1)) == -0.09];
 constraint
= [constraint, sqrt(2)*0.8203*x(3,1)-0.8203*y(2,1)-1.6106*(-z(2,1)) == -0.04];        
%%----------------------------------Objective------------------
Objective =  y(1,1) +y(2,1) ;
%%----------------------------------Solve------------------------
constraint
ops
= sdpsettings('solver','mosek','verbose',1,'debug',1);
sol
= optimize(constraint,-Objective,ops);


if sol.problem == 0
 
% Extract and display value
 solution_u
= value(x)
 solution_R
= value(y)
 solution_T
= value(z)
else
 display
('Hmm, something went wrong!');
 sol
.info
 yalmiperror
(sol.problem)
end

And there is the output of matlab command window:

Interior-point solution summary
 
Problem status  : PRIMAL_INFEASIBLE
 
Solution status : PRIMAL_INFEASIBLE_CER
 
Dual.    obj: 3.0499696430e-01    nrm: 3e-01    Viol.  con: 0e+00    var: 4e-11    cones: 0e+00  
Optimizer summary
 
Optimizer                 -                        time: 0.20    
   
Interior-point          - iterations : 23        time: 0.17    
     
Basis identification  -                        time: 0.00    
       
Primal              - iterations : 0         time: 0.00    
       
Dual                - iterations : 0         time: 0.00    
       
Clean primal        - iterations : 0         time: 0.00    
       
Clean dual          - iterations : 0         time: 0.00    
   
Simplex                 -                        time: 0.00    
     
Primal simplex        - iterations : 0         time: 0.00    
     
Dual simplex          - iterations : 0         time: 0.00    
   
Mixed integer           - relaxations: 0         time: 0.00    


Hmm, something went wrong!


ans
=


Unbounded objective function (MOSEK)

Could you please have a look at them? I would highly appreciate your response.
Regards, 
Wei

Johan Löfberg

unread,
Oct 25, 2017, 6:54:29 AM10/25/17
to YALMIP
As you already noticed, the model is unbounded, so what is the actual question?

Reply all
Reply to author
Forward
0 new messages