problem with undefined observations

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

problem with undefined observations

Post by Archiver »


I am calculate some índices of exportation, but the GAMS is Reading like undefined the obsevatons that not be in my sample, when the country doesn’t export to other country of my sample. This is resulting in some erros of the program when I divide a number by the other number that is undefined (zero), or I multiply, or I make the log, or I use this number with expoente.


I would like to know what I need to do for the GAMS doesn’t read this undefineds observations.



I already transform the unefined on scalar, but this problem isn’t resolve.

--
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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Archiver
User
User
Posts: 7876
Joined: 7 years ago

RE: problem with undefined observations

Post by Archiver »


Hi Anacarolina

Take a good look at the $-sign in the manual.

Example:

set i /1*5/;

parameter b(i), c(i);

b("1") = 1; b("2") = 1;

c(i)$b(i) = 1/b(i);

cheers

Renger


____________________

Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch

blog.modelworks.ch
From: gamsworld@googlegroups.com [gamsworld@googlegroups.com] on behalf of anacarolina.alimg@gmail.com [anacarolina.alimg@gmail.com]
Sent: Sunday, February 14, 2016 14:05
To: gamsworld
Subject: problem with undefined observations

I am calculate some índices of exportation, but the GAMS is Reading like undefined the obsevatons that not be in my sample, when the country doesn’t export to other country of my sample. This is resulting in some erros of the program when I divide a number by the other number that is undefined (zero), or I multiply, or I make the log, or I use this number with expoente.


I would like to know what I need to do for the GAMS doesn’t read this undefineds observations.



I already transform the unefined on scalar, but this problem isn’t resolve.

--
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 https://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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Post Reply