Hi Lucy,
The number of iterations for BONMIN is actually the number of nodes explored. Some problems are solved at the root node or via heuristics (e.g. cutting planes) which allow it to solve the problem very quickly. Remember BONMIN is designed for convex problems only, thus if there are multiple solutions due to it being non-convex, then the simplest method to find alternate solutions is to vary the initial guess (x0). Alternatively there are a suite of options available via bonminset. The options are document in OPTI/Solvers/bonmin/distribution/BONMIN_UsersManual.pdf which may assist. Most of these are problem dependent though!
You can try alternative solving algorithms using the ‘algorithm’ parameter within bonminset, this can provide alternate solutions sometimes. However the default algorithm (B-BB) is typically the most robust (in my experience). I’ve pasted an example below for you.
%% BONMIN Example MINLP
clc
%Objective
obj = @(x) -x(1) - x(2) - x(3);
%Constraints
nlcon = @(x) [ (x(2) - 1./2.)*(x(2) - 1./2.) + (x(3) - 1./2.)*(x(3) - 1./2.);
x(1) - x(2);
x(1) + x(3) + x(4)];
nlrhs = [1/4;0;2];
nle = [-1;-1;-1];
ub = [1;Inf;Inf;5];
lb = [0;0;0;0];
% Solve
bopts = bonminset('algorithm','B-OA');
opts = optiset('solver','bonmin','display','iter','solverOpts',bopts);
Opt = opti('obj',obj,'nlmix',nlcon,nlrhs,nle,'bounds',lb,ub,'int','BCCI','options',opts)
x0 = [0;0;0;0];
[x,fval,ef,info] = solve(Opt,x0)
Jonathan
--
You received this message because you are subscribed to the Google Groups "OPTI Toolbox Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opti-toolbox-fo...@googlegroups.com.
To post to this group, send email to opti-tool...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to opti-toolbox-forum+unsub...@googlegroups.com.
Hi Lucy,
You can try enable a few of the extra outputs via options such as:
BONMIN OUPUT AND LOG LEVEL SETTINGS:
bb_log_interval: [ Interval at which node level output is printed (number of nodes) {100} ]
bb_log_level: [ Level of branch and bound log detail (0-5) {1} ]
lp_log_level: [ Level of LP solver log detail (0-4) {0} ]
milp_log_level: [ Level of MILP solver log detail (0-4) {0} ]
nlp_log_level: [ Level of NLP solver log detail (0-2) {0} ]
nlp_log_at_root: [ Level of NLP solver log detail at root node (0-12) {0} ]
oa_log_frequency: [ Frequency (in seconds) of OA log messages {100} ]
oa_log_level: [ Level of OA decomposition log detail (0-2) {1} ]
These are all set via bonminset. However not all appear to work as well I’d like! If you send me your problem I would be happy to take a look.
To unsubscribe from this group and stop receiving emails from it, send an email to opti-toolbox-fo...@googlegroups.com.
To post to this group, send email to opti-tool...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "OPTI Toolbox Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opti-toolbox-fo...@googlegroups.com.