x = sdpvar(2,1);
Objective = log_sum_exp(x);
a = [2;1];
rho = 2;
Constraints = (norm(x-a, 2) <= rho^2);
solution = optimize(Constraints, -Objective, sdpsettings('solver', 'bmibnb'));
* Starting YALMIP global branch & bound.* Branch-variables : 2* Upper solver : MOSEK* Lower solver : CPLEX* LP solver : CPLEX Node Upper Gap(%) Lower Open 1 : -5.787E+00 5.94 -6.203E+00 2 Improved solution 2 : -5.954E+00 3.51 -6.203E+00 3 Improved solution 3 : -6.007E+00 0.26 -6.025E+00 4 Improved solution * Finished. Cost: -6.0068 Gap: 0.25807* Termination with relative gap satisfied * Timing: 2% spent in upper solver (3 problems solved)* 5% spent in lower solver (7 problems solved)* 46% spent in LP-based domain reduction (40 problems solved)
>> solution = optimize(Constraints, -Objective, sdpsettings('solver', 'bmibnb','bmibnb.uppersolver','fmincon'));* Starting YALMIP global branch & bound.* Branch-variables : 2* Upper solver : fmincon* Lower solver : MOSEK* LP solver : SCIP Node Upper Gap(%) Lower Open 1 : -6.007E+00 2.76 -6.203E+00 2 Improved solution 2 : -6.007E+00 2.76 -6.203E+00 3 3 : -6.007E+00 2.48 -6.183E+00 2 Infeasible 4 : -6.007E+00 2.48 -6.183E+00 3 5 : -6.007E+00 0.44 -6.038E+00 2 Poor bound * Finished. Cost: -6.0068 Gap: 0.44374* Termination with relative gap satisfied * Timing: 57% spent in upper solver (3 problems solved)* 1% spent in lower solver (8 problems solved)* 39% spent in LP-based domain reduction (38 problems solved)
solution = optimize(Constraints, -Objective, sdpsettings('solver', 'bmibnb','savesolveroutput',1));
solution.solveroutput
ans =
struct with fields:
lower: -6.0325
lower_hist: [-6.2028 -6.2028 -6.1853 -6.1853 -6.0325]
upper_hist: [-5.7877 -5.9914 -5.9914 -5.9914 -6.0068]