## New to GAMS to create simple LP program

Problems with modeling
User
Posts: 4
Joined: 10 months ago

### New to GAMS to create simple LP program

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.
Attachments
PMU.gms

Renger
Posts: 113
Joined: 1 year ago

### Re: New to GAMS to create simple LP program

You write "... to create a simple LP program", but your constraints are not linear (they have a multiplication of variables).
So, it is obviously not a simple LP.
MIP is Mixed Integer Linear Program, so this will not work. This is a RMINLP (see https://www.gams.com/latest/docs/usergu ... _using.htm).

Cheers
Renger