Hi there, I want to solve this equation, by finding the value of each x1, x2, x3, lb1, lb2, lb3, lb4 (lb stands for lambda), as written down in the following system. I have tried to write down some syntax as follow: proc optmodel;
var x{1..3} >= 0;
var lb{1..4} >= 0;
con r1: 2*x[1]-8+lb[1]-lb[2]=0;
con r2: 3*lb[1]-2-lb[3]=0;
con r3: (2*lb[1])-1-lb[4]=0;
con r4: x[1]+3*x[2]+2*x[3]<=12;
con r5: lb[1]*(x[1]+3*x[2]+2*x[3])=0;
con r6: lb[2]*x[1]=0;
con r7: lb[3]*x[2]=0;
con r8: lb[4]*x[3]=0;
solve;
print x;
print lb;
quit; Even though the program could run without any error, it resulted unexpected value: x[1] = -2.2223E-14 x[2] = -7.3896E-15 x[3] = -1.3411E-14 I'm expecting that x[1] = 11/3, x[2] = 25/9, and x[3] = 0. I'm not really sure what to do with my code, so any suggestion would be helpful. Regards.
... View more