How to define constraints that result integer numbers in Linear programming?
7 次查看(过去 30 天)
显示 更早的评论
Hello,
i need define the constraints in my linear programming problem, the constraints need to be integer numbers.
e.g.:
f = [28;31].*-1;
A = [3.5 4];
b = [50];
lb = [0;0];
x = linprog(f,A,b,[],[],lb,[])
x = [14.5 0]
if the constraint was integer the value of x become [12 2].
Thank you in advance.
0 个评论
采纳的回答
Shashank Prasanna
2013-7-16
Mixed Integer constraints is currently not possible with linprog. If you have the global optimization toolbox, you can use GA to solve the problem:
If you don't then you can surely find something in File Exchange:
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Programming and Mixed-Integer Linear Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!