Can I apply branch and bound and use linprog function to minimize a function? if there is an example please share it
1 回表示 (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1525151/image.png)
I have to use linprog For branch and
bound optimization
2 件のコメント
回答 (1 件)
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')
1 件のコメント
Matt J
2023 年 10 月 30 日
If you are not familiar with the problem-based optimization framework, then you will find a starter example here,
参考
カテゴリ
Help Center および File Exchange で Surrogate Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!