P = optimize(Constraints,-Objective,sdpsettings('solver','baron', 'baron.maxtime', 999999)) *** Normal completion ***
Wall clock time: 111.50 Total CPU time used: 111.31 Total no. of BaR iterations: 1 Best solution found at node: -1 Max. no. of nodes in memory: 1 All done =========================================================================== P =
struct with fields:
yalmipversion: '20190425' yalmiptime: 0.1313 solvertime: 111.7707 info: 'Maximum iterations or time limit exceeded (BARON)' problem: 3function [Objective, x, time,prob] = opt_solver(D,d,A,b)
n = size(D,2);
x = sdpvar(n,1);
Objective = (logsumexp(A*x+b));
Constraints = [D*x <= d, x>= 0];
P = optimize(Constraints,-Objective,sdpsettings('solver','baron'));
%P = optimize(Constraints,-Objective,sdpsettings('solver','knitro','knitro.optionsfile','fileopt.txt'));
%P = optimize(Constraints,-Objective,sdpsettings('solver','knitro', 'verbose',0));
%P = optimize(Constraints,-Objective,sdpsettings('solver','ipopt','ipopt.max_iter',999999, 'ipopt.max_cpu_time',999999));
x = value(x); Objective = value(Objective); time = P.solvertime; prob = P.problem;
end
struct with fields:
Model_Status: 'Intermediate feasible' BARON_Status: 'Normal completion' Total_Time: 24.4000 BaR_Iterations: 1 Best_Node: 1 Max_Nodes_InMem: 1 Lower_Bound: -1.0000e+51 Upper_Bound: -76.0362 Bad_Bounds: 'Missing 2 bounds! Global Optimality not Guaranteed.' Unbounded_Rays: 0 IIS: [0 0]
* Starting YALMIP global branch & bound.* Branch-variables : 30* Upper solver : knitro* Lower solver : GUROBI* LP solver : GUROBI Node Upper Gap(%) Lower Open 1 : -7.604E+01 0.77 -7.663E+01 2 Improved solution * Finished. Cost: -76.0362 Gap: 0.77064* Termination with relative gap satisfied * Timing: 40% spent in upper solver (1 problems solved)* 1% spent in lower solver (61 problems solved)* 33% spent in LP-based domain reduction (120 problems solved)
P =
struct with fields:
yalmipversion: '20190425' yalmiptime: 0.0890 solvertime: 1.5020 info: 'Successfully solved (BMIBNB)' problem: 0
z = sdpvar(length(b),1);Constraints = [D*x <= d, x >= 0, z == A*x+b];[~,l,u] = boundingbox(Constraints)