Here is why I thought Slayer was not used by bmibnb.
Configuration: WIN64: MATLAB R2019b. YALMIP develop 20211228. KNITRO 12.4.0. The input data, Hessian and gradient, are in attached mat file.
I realize this may not be reproducible if you don't have KNITRO (12.4) available to run. But perhaps you can figure something out from the error message. (BTW, this is just a totally made up test problem, having no relation to anything in the real world. This Hessian is indefinite.).
This example shows both a bmibnb error, as well as knitro as solver producing a better objective (not globally optimal, though) than first 2 incumbents from bmibnb with knitro as upper solver.
load 'BMI_Hessian_gradient_13by13_12-18-21.mat'
x=sdpvar(13,1);
Obj=0.5*x'*Hessian*x+gradient'*x;
BMI_matrix = sdpvar(8,8);
Con = [BMI_matrix(1,1:8) == (x(1:8).*x(8:-1:1))'];
Con = [Con,BMI_matrix(2,2:8) == x(4:10)'];
Con = [Con,BMI_matrix(3,3:8) == 2*(x(5:10).*x(6:-1:1))'];
Con = [Con,BMI_matrix(4,4:8) == [3*x(12)*x(13) -(x(1:4).*x(2:5))']];
Con = [Con,BMI_matrix(5,5:8) == .25*x(12:-1:9)'];
Con = [Con,BMI_matrix(6,6:8) == x(10:-1:8)'];
Con = [Con,BMI_matrix(7,7:8) == [x(7)*x(13) -x(2)*x(6)]];
Con = [Con,BMI_matrix(8,8) == x(4)*x(9)+4*x(5)^2-x(3)*x(4)];
optimize([Con,BMI_matrix>=0,sum(x)==26,-1<=x<=100],Obj,sdpsettings('solver','bmibnb','bmibnb.uppersolver','knitro','debug',1))
* Starting YALMIP global branch & bound.
* Upper solver : knitro
* Lower solver : MOSEK
* LP solver : GUROBI
* -Extracting bounds from model
* -Perfoming root-node bound propagation
* -Calling upper solver (found a solution, objective 352.501)
* -Branch-variables : 13
* -More root-node bound-propagation
* -Performing LP-based bound-propagation
* -And some more root-node bound-propagation
* -Shifted nonconvex QP objective using SDP
* Starting the b&b process
Node Upper Gap(%) Lower Open Time
1 : 2.57275E+02 199.70 -1.08990E+03 2 16s Improved solution found by upper solver
2 : 2.57275E+02 199.70 -1.08990E+03 3 20s
3 : -2.67629E+00 198.61 -1.05547E+03 4 34s Improved solution found by upper solver
4 : -2.67629E+00 198.61 -1.05547E+03 5 55s
5 : -2.67629E+00 198.46 -9.48739E+02 6 59s
6 : -2.67629E+00 198.46 -9.48739E+02 7 92s
7 : -8.71489E+01 165.72 -9.39422E+02 8 106s Improved solution found by upper solver
8 : -8.71489E+01 165.72 -9.39422E+02 9 117s
9 : -8.71489E+01 163.36 -8.73277E+02 10 120s
10 : -8.71489E+01 163.36 -8.73277E+02 11 147s
11 : -8.71489E+01 163.06 -8.65454E+02 12 152s
12 : -8.71489E+01 163.06 -8.65454E+02 13 180s
13 : -6.02521E+02 28.73 -8.05005E+02 6 189s Improved solution found by upper solver | Pruned stack based on new upper bound
14 : -6.02521E+02 28.73 -8.05005E+02 5 190s Poor lower bound
15 : -6.02521E+02 28.33 -8.01754E+02 6 198s Improved solution found by upper solver
16 : -6.02521E+02 28.33 -8.01754E+02 5 198s Terminated in bound propagation
17 : -6.02521E+02 24.59 -7.71709E+02 4 199s Terminated in bound propagation
18 : -6.02521E+02 24.59 -7.71709E+02 5 203s
19 : -6.02521E+02 24.43 -7.70469E+02 6 210s
20 : -6.02521E+02 24.43 -7.70469E+02 7 226s Numerical problems in lower solver
ans =
1
'output' requires Sensor Fusion and Tracking Toolbox.
Error in solvelower (line 314)
x(~removethese)=output.Primal;
Error in bmibnb_branch_and_bound>solvelower_safelayer (line 1107)
[output,cost,p,timing] = solvelower(p,options,lowersolver,x_min,upper,timing);
Error in bmibnb_branch_and_bound (line 346)
[output,cost,p,timing] = solvelower_safelayer(p,options,lowersolver,x_min,upper,timing);
Error in bmibnb (line 515)
[x_min,solved_nodes,lower,upper,lower_hist,upper_hist,solution_hist,timing,counter,problem] =
bmibnb_branch_and_bound(p,x_min,upper,timing,solution_hist);
Error in solvesdp (line 368)
eval(['output = ' solver.call '(interfacedata);']);
Error in optimize (line 31)
[varargout{1:nargout}] = solvesdp(varargin{:});*********************************************
Note 2 things:
1) 'solver', 'knitro' produces
...
163 216 -7.309484e+001 6.284e-006 9.177e+000 0.000e+000 6
EXIT: Primal feasible solution estimate cannot be improved; desired accuracy
in dual feasibility could not be achieved.
Final Statistics
----------------
Final objective value = -7.30948381656738e+001
Final feasibility error (abs / rel) = 6.28e-006 / 2.73e-007
Final optimality error (abs / rel) = 9.18e+000 / 1.28e-001
which is a better solution than produced by bmibnb with knitro as upper solver, until bmibnb iteration 7, after having already produced 2 solutions with upper solver which have worse objective than 'solver.','knitro'. Would bmibnb "accept" a knitro upper solver solution terminating with "Primal feasible solution estimate cannot be improved; desired accuracy in dual feasibility could not be achieved."? I think this corresponds to KNITRO return flag = -102 ("Current feasible solution estimate cannot be improved."). "The returned exit flags will correspond with Knitro’s return code, rather than matching fmincon’s exit flags." Or is final feasibility error too high for bmibnb to accept? Or maybe bmibnb is just feeding Slayer/knitro a "lousier" problem to solve than is provided directly to 'solver','knitro'?
2) bmibnb ends with error message which looks like it fell into a catch of try/catch, producing ans = 1. I have observed this error on several runs of bmibnb solving BMIs, when using knitro as upper solver. I have not encountered it in a smaller number of runs using fmincon as upper solver, although in many of those, no incumbent was ever produced. This error may manifest itself in different places depending on which YALMIP develop version (2011125, 20211215, or 20211228) was used, although that perhaps could be due to a "random" perturbation almost anywhere in YALMIP, changing the luck of the draw on whether/where the exact conditions to trigger the error manifest.
BTW, fmincon converges to infeasible on this, and when used as upper solver, no incumbent is produced after 2000 iterations of bmibnb (on YALMIP develop 20211125).
The actual global optimal objective value is -642.8, which I have verified by other means.