demo/lp_demo.cc
changeset 2377 83775fab25dc
parent 1956 a055123339d5
child 2391 14a343be7a5a
equal deleted inserted replaced
8:b583d37318df 9:54ae23d424b1
    63   //Nonnegativity of the variables
    63   //Nonnegativity of the variables
    64   lp.colLowerBound(x1, 0);
    64   lp.colLowerBound(x1, 0);
    65   lp.colLowerBound(x2, 0);
    65   lp.colLowerBound(x2, 0);
    66   lp.colLowerBound(x3, 0);
    66   lp.colLowerBound(x3, 0);
    67   //Objective function
    67   //Objective function
    68   lp.setObj(10*x1+6*x2+4*x3);
    68   lp.obj(10*x1+6*x2+4*x3);
    69   
    69   
    70   //Call the routine of the underlying LP solver
    70   //Call the routine of the underlying LP solver
    71   lp.solve();
    71   lp.solve();
    72 
    72 
    73   //Print results
    73   //Print results