New to GAMS to create simple LP program
Posted: Sat Jul 08, 2017 9:27 am
Hi all,
I'm new to LP and GAMS software. I intend to create a simple linear program
the objective function is to minimize the summation of b(i) where b(i) is binary variables (values either 0 or 1) and i is a set from (1 to 57)
the constaints are that each b(i) should satisify the following equation "(1-b(i))*(sum(j, line(i,j)*(line(i.j)-b(j))) = 0" where line(i,j) is taken from a table provided in code, (j) is simply a repeated set of i in order to use the table.
once I ran the model, I get error
" 56 Endogenous operands for * not allowed in linear models " regarding the equation"(1-b(i))*(sum(j, line(i,j)*(line(i.j)-b(j))) = 0"
Is there any way to deal with that error?
Also I get error 71 " The symbol shown has been declared as an equation, but no Symbolic equation (..) was found. hint - look for commas in the Documentation text for the equations. use quotes around the Text or eliminate the commas." regarding the same equation.
any suggestions about both errors or the code in general.
Thanks a lot for your help.
the file is attached to this post.
I'm new to LP and GAMS software. I intend to create a simple linear program
the objective function is to minimize the summation of b(i) where b(i) is binary variables (values either 0 or 1) and i is a set from (1 to 57)
the constaints are that each b(i) should satisify the following equation "(1-b(i))*(sum(j, line(i,j)*(line(i.j)-b(j))) = 0" where line(i,j) is taken from a table provided in code, (j) is simply a repeated set of i in order to use the table.
once I ran the model, I get error
" 56 Endogenous operands for * not allowed in linear models " regarding the equation"(1-b(i))*(sum(j, line(i,j)*(line(i.j)-b(j))) = 0"
Is there any way to deal with that error?
Also I get error 71 " The symbol shown has been declared as an equation, but no Symbolic equation (..) was found. hint - look for commas in the Documentation text for the equations. use quotes around the Text or eliminate the commas." regarding the same equation.
any suggestions about both errors or the code in general.
Thanks a lot for your help.
the file is attached to this post.