Hello everybody

I try to write this model in gams, I think it has an error in objective function, could you help me?

–

eepi_5.gms (4.88 KB)

Hello everybody

I try to write this model in gams, I think it has an error in objective function, could you help me?

–

eepi_5.gms (4.88 KB)

Hi Ela

Gams is quite clear about your error:

51 objective…sum(einp,(e0(einp)/sum(einp,e0(einp)))*TETA(einp))=e=EEPI ;

**** $125

Set is under control already

You want to sum over einp and then within this sum, you sum again over einp. Think of summing as a loop: you start with the first element of the set, and add the term with this element to you sum, then in the loop you take the next element of the set, add the next term and so on. In your objective function, Gams starts with summing over einp (taking the first element of einp) and then comes at the next sum, where it should start summing over the same set einp again. This causes confusion, as it canâ€™t keep track over two loops with the same set. Therefore, you should introduce an alias and sum over the alias:

alias(einp, aeinp);

objective… sum(einp,(e0(einp)/sum(aeinp,e0(aeinp)))*TETA(einp))=e=EEPI ;

Cheers

Renger

Von: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Im Auftrag von Ela

Gesendet: Thursday, January 15, 2015 22:11

An: gamsworld@googlegroups.com

Betreff: error in DEA model

Hello everybody

I try to write this model in gams, I think it has an error in objective function, could you help me?

–

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/d/optout.

–

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/d/optout.

Hi Renger

thanks a lot for your help

On Friday, January 16, 2015 at 11:02:51 AM UTC+3:30, Renger van Nieuwkoop wrote:

Hi Ela

Gams is quite clear about your error:

51 objective…sum(einp,(e0(einp)/sum(einp,e0(einp)))*TETA(einp))=e=EEPI ;

**** $125

Set is under control already

You want to sum over einp and then within this sum, you sum again over einp. Think of summing as a loop: you start with the first element of the set, and add the term with this element to you sum, then in the loop you take the next element of the set, add the next term and so on. In your objective function, Gams starts with summing over einp (taking the first element of einp) and then comes at the next sum, where it should start summing over the same set einp again. This causes confusion, as it canâ€™t keep track over two loops with the same set. Therefore, you should introduce an alias and sum over the alias:

alias(einp, aeinp);

objective… sum(einp,(e0(einp)/sum(aeinp,e0(aeinp)))*TETA(einp))=e=EEPI ;

Cheers

Renger

Von: gams...@googlegroups.com [mailto:gams...@googlegroups.com] Im Auftrag von Ela

Gesendet: Thursday, January 15, 2015 22:11

An: gams...@googlegroups.com

Betreff: error in DEA model

Hello everybody

I try to write this model in gams, I think it has an error in objective function, could you help me?

–

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.

To post to this group, send email to gams...@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/d/optout.

–

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/d/optout.