Although I wrote everything correctly, the program finds errors for each line. Error 141, Error 37, Error 257, Error 140. I am sure that I did everything right. Anyone have any idea about this?
Variable x1;
Free Variable x2,z;
Negative Variable x3;
Equations
con1,
con2,
con3,
obj;
con1..x1+x2+x3+L=7;
Con2..4*x1+2*x2=E=40;
Con3..10*x1+x3=G=30;
obj..30*x1+100*x2-50*x3=E=z;
Model SampleProblem1 /
con1,
con2,
con3,
obj/;
Options Lp = Cplex;
Solve SampleProblem1 using LP maximizing z ;
Display x1.L, x2.L, x3.L, z.L;
-----------------------------------------------------------------------
Error in all lines Topic is solved
Re: Error in all lines
well, I see that in con1 you have +L=7 instead of =L= 7
The error message must have showed that L is an unknown symbol. Best way to debug is to read errors.
- Atharv
The error message must have showed that L is an unknown symbol. Best way to debug is to read errors.
- Atharv