Solver not found (penbmi)

327 views
Skip to first unread message

zwjmosquito

unread,
Feb 16, 2016, 2:42:28 PM2/16/16
to YALMIP
Hi all,

I installed penlab from their website and add the path to Matlab. I also run the test code and it shows 'ok' for all the cases.  
Running sample LMI, BMI and PMI problems...
control1            : ok
theta1              : ok
truss1              : ok
mcp100              : ok
bmi_example         : ok
bmi_f4e             : ok
pmi_example         : ok
pmi_AC1             : ok
pmi_NN4             : ok

But when use it in my code like this:
sol = optimize(F,lmd1,sdpsettings('solver','penbmi'));
it shows that 'Solver not found (penbmi)'

I'm getting so confused. Is anyone knows how to solve this problem? Thanks!!

Johan Löfberg

unread,
Feb 16, 2016, 2:47:52 PM2/16/16
to YALMIP
You talk about penlab, but then you write penbmi in sdpsettings...

YALMIP looks for the file penlab.m in your path. If it is in the path, it should work

zwjmosquito

unread,
Feb 16, 2016, 2:58:37 PM2/16/16
to YALMIP
Thanks for your quick response. I was thinking penbmi is a solver contains in the 'penlab'... Sorry I'm a beginner of Yalmip.
So when I use bmibnb as the global optimization solver and it shows:
* Upper solver     : none
is it also because I don't install penbmi? 

Johan Löfberg

unread,
Feb 16, 2016, 3:02:22 PM2/16/16
to YALMIP
No, you have explicitly selected 'none' as upper bound solver. Yalmip never selects that automatically

zwjmosquito

unread,
Feb 16, 2016, 3:08:01 PM2/16/16
to YALMIP
The way I use bmibnb is 
optimize(F,lmd1,sdpsettings('solver','bmibnb')); 

I did not select solver for upper and lower bound. Then Yalmip automatically use Mosek as Lower solver and it doesn't get any upper solver. 

Johan Löfberg

unread,
Feb 16, 2016, 3:10:30 PM2/16/16
to YALMIP
Really?

yalmip('clear')
x = sdpvar(1,1);
y = sdpvar(1,1);
t = sdpvar(1,1);
A0 = [-10 -0.5 -2;-0.5 4.5 0;-2 0 0];
A1 = [9 0.5 0;0.5 0 -3 ; 0 -3 -1];
A2 = [-1.8 -0.1 -0.4;-0.1 1.2 -1;-0.4 -1 0];
K12 = [0 0 2;0 -5.5 3;2 3 0];
F = [x>=-0.5, x<=2, y>=-3, y<=7];
F = [F, A0+x*A1+y*A2+x*y*K12-t*eye(3)<=0];
options = sdpsettings('solver','bmibnb');
optimize(F,t,options)

ans = 

    solvertime: 0
          info: 'No suitable solver'
       problem: -2
    yalmiptime: 0.0730



zwjmosquito

unread,
Feb 16, 2016, 3:30:30 PM2/16/16
to YALMIP
I tried to run your code, and the interesting thing is, now it uses penlab as an upper solver!

* Starting YALMIP global branch & bound.
* Branch-variables : 2
* Upper solver     : penlab
* Lower solver     : MOSEK
* LP solver        : MOSEK

But when I run my code again, it's still:

Starting YALMIP global branch & bound.
* Branch-variables : 5
* Upper solver     : none
* Lower solver     : MOSEK
* LP solver        : MOSEK

Any idea how this happens?

Johan Löfberg

unread,
Feb 18, 2016, 4:49:14 AM2/18/16
to YALMIP
We have to see your code

zwjmosquito

unread,
Feb 19, 2016, 4:43:11 PM2/19/16
to YALMIP
function [Xopt,LMDopt] = lambda_upper(K1,K2,A1,C1,A2,C2 )
% Calculate the value of lambda s.t. X > Phi(K1,K2,X)

F1 = A1 + K1*C1;
F2 = A2 + K2*C2;

N = length(A1);

Y = sdpvar(N,N,'symmetric');
Z1 = Y*K1;
Z2 = Y*K2;
lmd1 = sdpvar(1,1);
lmd2 = sdpvar(1,1);

F = [ 0 <= Y <= eye(N)];
F = [F, [Y sqrtm(lmd1)*(Y*A2 + Z2*C2) sqrtm(lmd2)*(Y*A1 + Z1*C1); sqrtm(lmd1)*(Y*A2 + Z2*C2) Y zeros(N,N); sqrtm(lmd2)*(Y*A1 + Z1*C1) zeros(N,N) Y] > 0];
F = [F, 0 <= lmd1 <= 1, 0 <= lmd2 <= 1, lmd1 + lmd2 == 1];

%LMDopt = bisection(F,lmd1,sdpsettings('solver','bmibnb'))

sol = optimize(F,lmd1,sdpsettings('solver','bmibnb'));
% Analyze error flags
if sol.problem == 0

else
 display('Hmm, something went wrong!');
 yalmiperror(sol.problem)
end

Xopt = value(Y);
LMDopt = value(lmd1);


end
Message has been deleted

Johan Löfberg

unread,
Feb 22, 2016, 2:18:45 AM2/22/16
to YALMIP
OK, appears to select none in some scenarios. Didn't know that


* Starting YALMIP global branch & bound.
* Branch-variables : 5
* Upper solver     : none
* Lower solver     : MOSEK
* LP solver        : GUROBI
 Node       Upper      Gap(%)       Lower    Open
    1 :    3.283E-16     0.00     -1.000E-10   2  Improved solution  
* Finished.  Cost: 3.2825e-16 Gap: 1e-08
* Timing: 0% spent in upper solver (0 problems solved)
*         2% spent in lower solver (11 problems solved)
*         60% spent in LP-based domain reduction (6 problems solved)


zwjmosquito

unread,
Feb 24, 2016, 12:30:22 PM2/24/16
to YALMIP
Thank you anyway. Finally I transfer it into a feasible problem and solved it using cvx! 

Johan Löfberg

unread,
Feb 24, 2016, 1:12:38 PM2/24/16
to YALMIP
A feasible one?

If you can solve it in cvx, you can always solve it using YALMIP as YALMIP solves a larger class of problems, so you must have created a much easier model then when you gave it to cvx

zwjmosquito

unread,
Feb 24, 2016, 5:02:52 PM2/24/16
to YALMIP
Yes, I assume a value for lambda, then make the problem into a feasible problem - which is, when lambda = something, can we find a Y such that the positive condition holds. And for this problem I think Yalmip also should work but cvx is much simple to understand (I still don't get how to choose a suitable solver in Yalmip because there are so many solvers).

Johan Löfberg

unread,
Feb 25, 2016, 1:49:56 AM2/25/16
to YALMIP
OK, was a bit confused by your choice of the word feasible then. The original problem was feasible also (a solution exists), and what you meant was that you didn't have a suitable solver setup.

Recommended solver with minimal setup time for simple LMIs with YALMIP is SDPT3. If you install that, it will automatically be picked by YALMIP when you solve LMIs
Reply all
Reply to author
Forward
0 new messages