No BSD License  

Highlights from
bnb

  • ... NLCONST Helper function to find the constrained minimum of a function
  • BNB20(fun,x0,xstat,xl,xu,...BNB20 Finds the constrained minimum of a function of several possibly integer variables.
  • BNBGUI(file)
  • BNBGUICB(action,file); BNBGUICB Callback function for BNBGUI 2.0.
  • [X,lambda,exitflag,output...QP Quadratic programming subproblem. Handles qp and constrained
  • guierr() This is the machine-generated representation of a Handle Graphics object
  • guifun() This is the machine-generated representation of a Handle Graphics object
  • guimain() This is the machine-generated representation of a Handle Graphics object
  • guiset() This is the machine-generated representation of a Handle Graphics object
  • guiupd() This is the machine-generated representation of a Handle Graphics object
  • View all files

4.33333

4.3 | 27 ratings Rate this file 93 Downloads (last 30 days) File Size: 138 KB File ID: #95

bnb

by

 

14 Feb 2000 (Updated )

BNB20 solves mixed integer nonlinear optimization problems

| Watch this File

File Information
Description

BNB20 solves mixed integer nonlinear optimization problems. It is a branch-and-bound type algorithm.

Acknowledgements

This file inspired Minlp: Mixed Integer Nonlinear Programming.

Required Products Optimization Toolbox
MATLAB release MATLAB 5.3 (R11)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (34)
27 Nov 2013 Tseng

Thank for your great job in practical BNB implementation.

I wonder does the method of B&B can always find the "optimal value" of Convex Mixed Integer Nonlinear Programming? Is there any reference or prove to above statement?

Thanks a lot.

17 Oct 2013 mehrdad nyazi

hi,
i want to solve the flow shop scheduling with branch and bound algorithm.i can not write and write it in matlab code! can any body help me? :(

06 Apr 2013 Jehan Ziad Ghafuri

How can I write & run this example??
%function (maxz)=-x1+4x2
%subject to
%-10x1+20x2<=22
% 5x1+10x2<=49
% x1 <= 5
%x1,x2>=0, x1&x2 are integers

And by using which file??

21 Apr 2012 GLAYSSON

Hi,

I am using Matlab R2011b - 7.13.0.0564.

And when I type BNBGUI this message appear:

Cannot find an exact (case-sensitive) match for 'bnbguicb'.
Do you want: BNBGUICB
(in C:\MATLAB\R2011b\BNBGUICB.m)?

Error in BNBGUI (line 29)
bnbguicb('init');

What is wrong? Thanks!!!!

23 Feb 2012 Hao

Thank you so much for providing this file. It really helps.

10 Dec 2010 Charlie

I had to dig into the code to get this sucker to work (sans GUI). Below is a matlab file for a function of a single variable in FuncEval with nonlinears in constraintEval. Also, note that you will get an error when it's done. You can either ignore it, or comment out the very last line of BNB20.m . If your function requires separate inputs other than x, put those in the call to BNB20 after options.

%% BNB Call
% Initialize x0, Column Vector
x0 = [1];
% BNB variable types
% Continuous for xstatus(i)=0
% Integer for xstatus(i)= 1
% Fixed for xstatus(i)=2
xstat = [1];
% this problem has no inequality constraints
A = [];
b = [];
% this problem has no equality constraints
Aeq = [];
beq = [];
% Given Bounds in problem statement
lb = [ ...
0
];
ub = [ ...
31
];
% Set settings
setts = []; % Leave as default
% Set options
options = optimset('Display','iter','TolX',1e-4,'maxSQPiter',Inf)
%% Run the BNB Code!
[errmsg,Z,X,t,c,fail] = BNB20('FuncEval',x0, ...
xstat,lb,ub,A,b,Aeq,beq,'constraintEval',setts,options)

19 Oct 2010 ZHOU YANG

I get the same error every time as well, and can't figure out what's going on.
who can submit a successful example?
thanks!!!

27 May 2010 Gautham

I get the same error every time as well, and can't figure out what's going on.

21 Oct 2009 mhihn

I'm trying to run a mixed integer nonlinear programming (MINLP) problem using BNB20. However, irrespective of the complexity of my algorithm, I'm always getting the following results. It would be great if anyone can explain this result.

*** searched 0 % of tree
*** Z : Inf
*** t : 0.0 secs
*** c : 0 cycles
*** fail : 0 cycles
Optimization terminated: first-order optimality measure less
than options.TolFun and maximum constraint violation is less
than options.TolCon.
Active inequalities (to within options.TolCon = 1e-006):
lower upper ineqlin ineqnonlin
11 31
12 32
13 33
34
35
36
37
38
39
40
41
42
43
44
45
??? Error using ==> lt
Matrix dimensions must agree.

Error in ==> BNB20 at 247
elseif all(abs(round(x(K))-x(K))<errx) & convflag>0

07 May 2009 Bartosz

I have a problem with this algorithm I start it like that
[errmsg,Z,X,t,c,fail] = BNB20(fun,para',[0 0 1 1 1 1]',[150 125 3 2 11 1]',ub',[],[],[],[],'problemconstraints',[],options,dmodel,SampMin,weight,constraints)
yet one of the parameters is assigned a negative value during the operation of the algorithm

27 Sep 2008 liu bingbing

very good!

16 Sep 2008 Luo chengjin

I think it's good!

06 Sep 2008 Guo Xiaoyu

Thank you very mucn

05 Sep 2008 Sun Qiyue

I can not work it out? the example is not so good and I always get the error: fun caused error

09 Jul 2008 Yubin Bao

easy to use

08 Jun 2008 mark elec

Does the algorithm support for non-convex problem ???

10 Apr 2008 jacky LI

the example is not good enough!

30 Jun 2007 wang lingli

study

17 Apr 2007 Mojtaba Hajihasani

Your proposed method suffers from big problem, beacuse in sub-problem you have brought the problem into continues domain.

27 Dec 2006 asd sad  
10 Nov 2006 Dingyu Xue

Further suggestions
1) better to allow function handles
2) fine-tuning of the argument and results for integer variables:
2a. in the starting part of the function, give xlb(xstat)=ceil(xlb(xstat)); xub(xstat)=floor(xub(xstat))
2b. at the end of the function, X(xstat)=round(X(xstat))

25 Aug 2006 Naresh Nandola  
02 Aug 2006 Puthut Wibowo

Hmmm......

15 Nov 2005 Bess Bai

Thanks! is there the manual for bnb.m (matlab) file?

04 Sep 2005 kinky leung

Thanks!But is it free?

21 Mar 2005 shrinivas pradeep

sir,
can you please send the manual for bnb.m (matlab) file.

04 Mar 2005 Pradeep Shrinivas

Dear sir,
Your work is excellent, we are using your work for our project.

Regards,
Pradeep &Shrinivas
( BE (CSE)Final Year)
BCET Bangalore-560081

29 Dec 2004 Bakhtiyar Tokpayev  
31 Jul 2004 vinod kumar

please provide pdf help files and pseudo codes and comments on each step.

29 Jun 2004 Andrew Odjo  
02 Jul 2003 Atanas Chervenkov  
01 Jul 2003 Nguyen Quoc Vo  
03 Dec 2002 H hasper  
19 May 2002 George Pau

Very good basic implementation of branch and bound.

Updates

mod desc

16 Nov 2001

Found some bugs and added an example.

Contact us