clear all
clc
diary tr01polic.txt
echo on
f = [7 9 8 3 4 6];
Beq = [ 1 0 0 1 0 0; 0 1 0 0 1 0; 0 0 1 0 0 1;
1 1 1 0 0 0; 0 0 0 1 1 1];
lb = zeros(6,1);
beq = [500; 200; 100; 300; 500];
[ x, fval] = linprog(f',[],[],Beq,beq, lb, [])
diary off
f = [7 9 8 3 4 6];
Beq = [ 1 0 0 1 0 0; 0 1 0 0 1 0; 0 0 1 0 0 1;
1 1 1 0 0 0; 0 0 0 1 1 1];
lb = zeros(6,1);
beq = [500; 200; 100; 300; 500];
[ x, fval] = linprog(f',[],[],Beq,beq, lb, [])
Warning: CHOLINC(X, 'inf') will be removed in a future release.
Warning: CHOLINC(X, 'inf') will be removed in a future release.
Warning: CHOLINC(X, 'inf') will be removed in a future release.
Warning: CHOLINC(X, 'inf') will be removed in a future release.
Warning: CHOLINC(X, 'inf') will be removed in a future release.
Warning: CHOLINC(X, 'inf') will be removed in a future release.
Optimization terminated.
x =
200.0000
0.0000
100.0000
300.0000
200.0000
0.0000
fval =
3.9000e+03
diary off