I wish to write MATLAB codes to solve the following linear programming problem found in Bertsimas' lecture notes:
My attempt was as follows (sequence of variables for f' is A, B, C, D, E, Cash1, Cash2, Cash3):
f = [0 -1 0 -1.75 -1.4 0 0 -1.06]; A = [1 0 1 1 0 1 0 0; -0.3 1 -1.1 0 0 -1.06 1 0; -1 -0.3 0 0 1 0 -1.06 1; 1 0 0 0 0 0 0 0; 0 0 1 0 0 0 0 0; 0 0 0 0 1 0 0 0]; b = [1; 0; 0; 0.5; 0.5; 0.75]; lb = zeros(8, 1); linprog(f, A, b, [], [], lb)
Is it correct?
What would be a better solution? Thanks.