I'm trying to use branch-and-bound method to solve the following IP

2 views (last 30 days)
my code is;
f=-[9; 5; 6; 4];
A=[6 3 5 2; 0 0 1 1; -1 0 1 0; 0 -1 0 1];
b=[10; 1; 0; 0];
lb=zeros(1,4);
ub=[1 1 1 1];
Aeq=[]; beq=[]; x0=[];
options=optimoptions('linprog','Algorithm','Simplex');
[x, fval, exitflag, output]=linprog(f,A,b,Aeq,beq,lb,ub,x0,options);
z=-fval
But matlab gives me this error,
Error in Untitled4 (line 10)
[x, fval, exitflag, output]=linprog(f,A,b,Aeq,beq,lb,ub,x0);
I'm not sure why, help?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!