## Search found 6 matches

8 months ago
Forum: Modeling
Topic: Newbie with GAMS
Replies: 3
Views: 409

### Re: Newbie with GAMS

Hi again,

I think infeasibility comes from the constraints below:

Code: Select all

``````r5.up   = 2.40;
r5.lo   =0;
``````
if you comment these two constraints there is no infeasibility.
I do not know exactly but r5 make the objective function badly constrained.
8 months ago
Forum: Modeling
Topic: How to ranging variables
Replies: 5
Views: 579

### Re: How to ranging variables

Hi again. Now I know what is your problem. I'm afraid you can not use ".lo" or ".up" for doing this but I think there is an alternative solution: foe example suppose you have an equation on X in your problem. X + Y * Z >= 6 ; firstly you define : positive variable X , Y , Z; Equations eq1 ; eq1\$(X =...
8 months ago
Forum: Modeling
Topic: Newbie with GAMS
Replies: 3
Views: 409

### Re: Newbie with GAMS

Hi

I'm afraid that some of your equations have been entered wrongly!
for example look at constraint 40!
Am I right?
8 months ago
Forum: Modeling
Topic: How to ranging variables
Replies: 5
Views: 579

### Re: How to ranging variables

Hi

I'm afraid you did not explain your problem well.
would you mind making it more clear?
8 months ago
Forum: Modeling
Topic: GAMS modeling of an conditional equation
Replies: 2
Views: 460

### Re: GAMS modeling of an conditional equation

Thanks a million. Hi, You have two strict inequalities there: one comparing parameters, the other comparing variables. The parameters can be compared this way, but not the variables. So you could do something like: set i / blah /; alias (i,j); parameter a(i); variables x(i); equation f(i,j); f(i,j)\$...
8 months ago
Forum: Modeling
Topic: GAMS modeling of an conditional equation
Replies: 2
Views: 460

### GAMS modeling of an conditional equation

Hi everyone.
I want to model the equation below in GAMS:

Code: Select all

``````equation1..
if(  x(i) > x(j),
y(i) > y(j);
);``````
it means if x(i) > x(j), then y(i) should be greater than y(j).
here y(i) is a variable and x(i) is a parameter.

I would be appreciated if someone can help how to model it in GAMS.