% BNB uses:
% Optimization Toolbox Version 2.0 (R11) 09-Oct-1998
% From this toolbox fmincon.m is called. For more info type help fmincon.
%
% fun is the function to be minimized and should return a scalar.
F(x)=feval(fun,x).
% x0 is the starting point for x. x0 should be a column vector.
% xstatus is a column vector describing the status of every variable x(i).
% xlb and xub are column vectors with lower and upper bounds for x.
% A and Aeq are matrices for the linear constrains.
% B and Beq are column vectors for the linear constrains.
% nonlcon is the function for the nonlinear constrains.
% [C(x);Ceq(x)]=feval(nonlcon,x). Both C(x) and Ceq(x) should be column
vectors.
%
% errmsg is a string containing an error message if BNB found an error in
the input.
% Z is the scalar result of the minimization,X the values of the accompanying
variables.
% t is the time elapsed while the algorithm BNB has run,c is the number of
BNB cycles and
% fail is the number of unsolved leaf sub-problems.
%
% settings is a row vector with settings for BNB:
% settings(1) (standard 0) if 1:use phase 1 by relaxation. This sometimes
makes the algorithm
% faster,because phase 1 means the algorithm first checks if there is a
feasible solution
% for a sub-problem before trying to find a best solution. If there is no
feasible solution BNB
% will not try to find a best solution.
% settings(2) (standard 0) if 1:if the sub-problem did not converge do not