# # Numerical Mathematics and Computing, Fifth Edition # Ward Cheney & David Kincaid # Brooks/Cole Publ. Co. # (c) 2003 # # file: lin_prog3 # # Minimize the objective function subject to given equality constraints: obj := u1 + v1 + u2 + v2 + u3 + v3; consts := {2*y1 + 3*y2 - 5*y3 - u1 + v1 = 4, y1 - y2 - u2 +v2 = 2, y1 + 2*y2 - 3*y3 - u3 + v3 = 7}; simplex[minimize](obj, consts, NONNEGATIVE);