$ operator

Hello everyone!!

I recently have write my model in Gams but due to computational time I am trying to simplify some constraints. These constraints are using binary variables that I want to exclude of the mode. So my idea was to do something like:

eq1(j,t)(pt(j,t) not eq 0).. prod(utt(ord(utt)<=UT(j)), pt(j,t++ord(utt))) =n= 0;
eq2(j,t)(pt(j,t) eq 0).. sum(utt(ord(utt)<=DT(j)), pt(j,t++ord(utt))) =e= 0;

The problem is that in first $ operator, pt(j,t) is a variable and for what I understood, Gams gives error because of that.

Can someone give me an idea how to solve my problem?

Cheers
Sérgio


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Sergio, this is not a gams error but a conceptual optimization issue.

Having different constrains according to a variable’s current value, turns a problem into what is called a disjunctive programming problem.
There are several strategies for solving these (including the use of binary variables, turning them into a minlp or a milp, which is what you probably had).

Research any advanced optimization text for this and more :slight_smile:

Hope to be helpful
Claudio
El sep 16, 2013 7:39 a.m., “Sérgio” escribió:

Hello everyone!!

I recently have write my model in Gams but due to computational time I am trying to simplify some constraints. These constraints are using binary variables that I want to exclude of the mode. So my idea was to do something like:

eq1(j,t)(pt(j,t) not eq 0).. prod(utt(ord(utt)<=UT(j)), pt(j,t++ord(utt))) =n= 0;
eq2(j,t)(pt(j,t) eq 0).. sum(utt(ord(utt)<=DT(j)), pt(j,t++ord(utt))) =e= 0;

The problem is that in first $ operator, pt(j,t) is a variable and for what I understood, Gams gives error because of that.

Can someone give me an idea how to solve my problem?

Cheers
Sérgio


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Claudio,



Thanks for your help.



Cheers

Sérgio



De: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Em nome de Claudio Delpino
Enviada: segunda-feira, 16 de Setembro de 2013 21:42
Para: gamsworld@googlegroups.com
Assunto: Re: $ operator



Hi Sergio, this is not a gams error but a conceptual optimization issue.

Having different constrains according to a variable’s current value, turns a problem into what is called a disjunctive programming problem.
There are several strategies for solving these (including the use of binary variables, turning them into a minlp or a milp, which is what you probably had).

Research any advanced optimization text for this and more :slight_smile:

Hope to be helpful
Claudio

El sep 16, 2013 7:39 a.m., “Sérgio” escribió:

Hello everyone!!

I recently have write my model in Gams but due to computational time I am trying to simplify some constraints. These constraints are using binary variables that I want to exclude of the mode. So my idea was to do something like:

eq1(j,t)(pt(j,t) not eq 0).. prod(utt(ord(utt)<=UT(j)), pt(j,t++ord(utt))) =n= 0;
eq2(j,t)(pt(j,t) eq 0).. sum(utt(ord(utt)<=DT(j)), pt(j,t++ord(utt))) =e= 0;

The problem is that in first $ operator, pt(j,t) is a variable and for what I understood, Gams gives error because of that.

Can someone give me an idea how to solve my problem?

Cheers
Sérgio


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.