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