When I try to solve a problem, there always exist "Reference to non-existent field ‘sol’" problem and computer freezing

25 views
Skip to first unread message

htkim

unread,
Nov 27, 2019, 9:41:41 PM11/27/19
to YALMIP
Dear who consider this problem

I am trying to solve the following problem using BMIBNB, 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[A,B,C,D] = tf2ss([2.4],[1 1.4]);
[Ar,Br,Cr,Dr] = tf2ss(1,[1 -1.01]);

N = 10;
largei = 20;
largen = 1000;

for i=1:1:N 
    a(i) = sdpvar(1);
    c(i) = sdpvar(1);
end
d(1) = 0;

Ai = eye(N-1);
Ai = [zeros(N-1,1) Ai];
Ai = [Ai; a];
Bi = zeros(N,1);
Bi(N) = 1;
Di = [d(1)];
Ci = c;

Aw1 = [A-B*Dr*C B*Cr;-Br*C Ar];
Aw2 = [A-B*Di*C B*Ci;-Bi*C Ai];
Aw = [Aw1 zeros(2,N+1);zeros(N+1,2) Aw2];
Bw = [B*Dr;Br;B*Di;Bi];
Cw = [C zeros(1,1) -C zeros(1,N)];
Dw = 0;


Q = [Aw Bw;Cw Dw];
Pbar = sdpvar(3+N,3+N,'symmetric');
gamma = sdpvar(1);


cons = [Aw'*Pbar*Aw-Pbar Aw'*Pbar*Bw Cw';Bw'*Pbar*Aw -gamma^2+Bw'*Pbar*Bw 0;Cw 0 -gamma^2] < 0;
cons = [cons; Pbar > 0];
cons = [cons; gamma > 0];

conssum = 0;
for i=1:1:N
    conssum = conssum + (a(i)-round(a(i)))^2;
end

for i=1:1:N
    cons = [cons; abs(a(i)) < largei];
    cons = [cons; abs(c(i)) < largei];
end
cons = [cons;abs(Pbar) < largen];
 cons = [cons; abs(gamma) < 1];

 obj = (gamma)^2 + conssum;
ops = sdpsettings('solver','bmibnb','bmibnb.numglobal',0,'bmibnb.lpsolver','mosek','bmibnb.maxiter',10000,'bmibnb.maxtime',7200);
optimize(cons,obj,ops)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

but they always end up with "Reference to non-existent field ‘sol’" error and computer freezing.

(One little question that I used mosek to bmibnb.lpsolver because I used gurobi before but the license was expired. So I want to disable gurobi but I don't know how to do it so I add that code. Could you tell me how to disable gurobi?)

I wonder what is the problem with this code or how to fix this problem.

Thanks!

Michal Adamaszek

unread,
Nov 28, 2019, 3:48:51 AM11/28/19
to YALMIP
Reference to non-existent field ‘sol’

normally means MOSEK failed to solve the problem it was fed and did not actually return any solution. Enabling maximal log output could possibly reveal what error it reported.

htkim

unread,
Nov 28, 2019, 8:10:05 AM11/28/19
to YALMIP
Thanks for your kind reply. That could be a problem so I will check the log. But I still wonder why my computer become freezing in that situation? Is it a normal thing when a 'sol' problem happened?

Johan Löfberg

unread,
Nov 28, 2019, 1:03:12 PM11/28/19
to YALMIP
1. YALMIP is screaming at you about using strict inequalities. It is not supported.

2. You have a variable gamma which you square. That is an extremely bad way to model this, you would typically think of t = gamma^2 as the variable

3. However, your model is a polynomial SDP. You would normally not be able to run this at all, it should say no solver applicable. You are way too optimistic in thinking this mixed-integer nonlinear semidefinite programming being possible to solve. Do you have penbmi installed causing it go through the problem/solver check?

You will not be able to solve this using off-the-shelf software


Reply all
Reply to author
Forward
0 new messages