import com.imsl.math.*; public class LinearProgrammingEx1 { public static void main(String args[]) throws Exception { double[][] a = { {1.0, 1.0, 1.0, 0.0, 0.0, 0.0}, {1.0, 1.0, 0.0, -1.0, 0.0, 0.0}, {1.0, 0.0, 0.0, 0.0, 1.0, 0.0}, {0.0, 1.0, 0.0, 0.0, 0.0, 1.0} }; double[] b = {1.5, 0.5, 1.0, 1.0}; double[] c = {-1.0, -3.0, 0.0, 0.0, 0.0, 0.0}; LinearProgramming zf = new LinearProgramming(a, b, c); zf.solve(); new PrintMatrix("Solution").print(zf.getPrimalSolution()); } }