MILP-error with constraints

First approach with MILP and intlinprog in R2015a.
I keep having the same error. Here it is an example:
intcon=2;
f=[100;70];
Aeq = [1,1];
beq = 1;
lb = zeros(2,1);
ub = lb+1;
x = intlinprog(f,intcon,Aeq,beq,lb,ub)
The error given is:
Error using intlinprog (line 121)
The number of columns in Aeq must be the same as the number of elements of f.
Error in patient2milp (line 26)
x = intlinprog(f,intcon,Aeq,beq,lb,ub)
What should I change?
Thank you and sorry if it is a silly question!

 采纳的回答

Torsten
Torsten 2016-3-8

0 个投票

x = intlinprog(f,intcon,[],[],Aeq,beq,lb,ub);
Best wishes
Torsten.

更多回答(0 个)

类别

在 帮助中心 和 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!

Translated by