New to GAMS to create simple LP program

Problems with modeling
Fady
User
User
Posts: 4
Joined: 2 months ago

New to GAMS to create simple LP program

Postby Fady » 2 months ago

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 10 times

User avatar
Renger
Posts: 32
Joined: 11 months ago

Re: New to GAMS to create simple LP program

Postby Renger » 2 months ago

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

Fady
User
User
Posts: 4
Joined: 2 months ago

Re: New to GAMS to create simple LP program

Postby Fady » 2 months ago

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


Return to “Modeling”

Who is online

Users browsing this forum: No registered users and 1 guest