New to GAMS to create simple LP program

Problems with modeling
Post Reply
Fady
User
User
Posts: 4
Joined: 6 years ago

New to GAMS to create simple LP program

Post by Fady »

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
(21.76 KiB) Downloaded 300 times
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: New to GAMS to create simple LP program

Post by Renger »

Hi Fady

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
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Fady
User
User
Posts: 4
Joined: 6 years ago

Re: New to GAMS to create simple LP program

Post by Fady »

Dear Sir,

Thanks a lot for your reply. I've succesfully overcome the problem by using MINLP solver. thanks so much for your advice.

Kind regards,
fady
Post Reply