MATLAB: Linprog give answer not satify the constrains

linear programmingoptimization

The optimazation problem is:
min 10×1 + 0x2 + 20×3 + 11×4 + 12×5 + 7×6 + 9×7 + 20×8 + 0x9 + 14×10 + 16×11 + 18×12
s.t.
x1 + x2 + x3 + x4 <= 25
x5 + x6 + x7 + x8 <= 60
x9+ x10 + x11 + x12 <= 35
x1 + x5 + x9 = 15
x2 + x6 + x10 = 45
x3 + x7 + x11 = 30
x4 + x8 + x12 = 25
And below is my code:
f = [10 0 20 11 12 7 9 20 0 14 16 18]';
A = [[1 1 1 1 0 0 0 0 0 0 0 0];[0 0 0 0 1 1 1 1 0 0 0 0];[0 0 0 0 0 0 0 0 1 1 1 1]];
b = [25 60 35]';
Aeq = [1 0 0 0 1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0 0 1 0 0
0 0 1 0 0 0 1 0 0 0 1 0
0 0 0 1 0 0 0 1 0 0 0 1];
beq = [15 45 30 25]';
lb = [0 0 0 0 0 0 0 0 0 0 0 0]';
ub = [25 25 25 25 60 60 60 60 35 35 35 35]';
%ub = [];
options = optimoptions('linprog','Algorithm','interior-point');
[x, f] = linprog(f,[],[],Aeq,beq,lb,ub,options);
disp(x);
disp(f);
Run this code in matlab and it will give an answer of
x =
0.0000
25.0000
0.0000
25.0000
0.0000
20.0000
30.0000
0.0000
15.0000
0.0000
0.0000
0.0000
I find that 0 + 25 + 0 + 25 is bigger than 25, obviously this answer does not satisfy the constrain. Why could this happen?

Best Answer

Because you never pass constraints A*x <= b in LINPROG
[x, f] = linprog(f,[],[],Aeq,beq,lb,ub,options);