필터 지우기
필터 지우기

Can I apply branch and bound and use linprog function to minimize a function? if there is an example please share it

조회 수: 1 (최근 30일)
I have to use linprog For branch and
bound optimization
  댓글 수: 2
Matt J
Matt J 2023년 10월 30일
편집: Matt J 2023년 10월 30일
Not linprog. You would want intlinprog (which does use branch-and-bound).
Torsten
Torsten 2023년 10월 30일
편집: Torsten 2023년 10월 30일
Well, you do not expect that we code branch-and-bound in combination with linprog for you, do you ?

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2023년 10월 30일
편집: Matt J 2023년 10월 30일
Add additional binary variables b1,b2 and equality constraints as below. Then it becomes a straightforward application of intlinprog.
x=optimvar('x',7);
b1=optimvar('b',[2,4],'Type','integer','Lower',0,'Upper',1);
b2=optimvar('c',[2,3],'Type','integer','Lower',0,'Upper',1);
Constraints.x1x2= [x(1);x(2)]==b1*[2,5,7,8]';
Constraints.x3x4= [x(3);x(4)]==b2*[3,4,6]';
Constraints.b1= sum(b1,2)==1;
Constraints.b2= sum(b2,2)==1;
...
other constraints
...
prob=optimproblem('Objective',___,'Constraints', Constraints);
sol=solve(prob,'Solver','intlinprog')

카테고리

Help CenterFile Exchange에서 Surrogate Optimization에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by