Division by zero Error

Hello,

I have an integer variable n(i), which comes in the denominator of the
objective function. n(i) is based on the set i having values 1,2,…,m
i.e n(1),n(2),…,n(m).

I looked over solutions to division by zero error but none of them
talk about handling this situation. I will highly appreciate if
someone has a way.

Thank you

\

I am also facing same problem. Can someone suggest a solution?

On Apr 6, 11:30 am, USMZ wrote:

Hello,

I have an integer variable n(i), which comes in the denominator of the
objective function. n(i) is based on the set i having values 1,2,…,m
i.e n(1),n(2),…,n(m).

I looked over solutions to division by zero error but none of them
talk about handling this situation. I will highly appreciate if
someone has a way.

Thank you

\

Reply-to: gamsworld@googlegroups.com

hey all

Im using division in a lp. i am getting a compilation error as

endogenous operands for / is not allowed in linear models.

Does that mean i cant use division in linear models?
If i cross multiply an inequation (with all positive variables) and thereby remove any dision operation will the optimal values of my objective function affected???

Regards

On Wed, Apr 6, 2011 at 4:53 PM, Arne Stolbjerg Drud wrote:

You must require your variable to be strictly positive. For an integer
variables this means that the lower bound must be at least 1 (no difficulty
with tolerances!). So try

n.lo(i) = 1;

Good luck


Arne Stolbjerg Drud
ARKI Consulting & Development A/S
Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark
Phone: (+45) 44 49 03 23, Fax: (+45) 44 49 03 33, email: adrud@arki.dk

-----Oprindelig meddelelse-----
Fra: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] PÃ¥ vegne
af deepak mishra
Sendt: 6. april 2011 12:04
Til: gamsworld
Emne: Re: Division by zero Error

I am also facing same problem. Can someone suggest a solution?

On Apr 6, 11:30 am, USMZ wrote:

Hello,

I have an integer variable n(i), which comes in the denominator of the
objective function. n(i) is based on the set i having values 1,2,…,m
i.e n(1),n(2),…,n(m).

I looked over solutions to division by zero error but none of them
talk about handling this situation. I will highly appreciate if
someone has a way.

Thank you


“gamsworld” group.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

check the values of your parameters,
specially those that are denominators, because the default value of a parameter is zero. so untill you give or compute an initial value for them you’ll get division by zero error.

Merci et bonne réception!


M. Hervé Jean-Louis GUENE
Ingénieur Statisticien - Economiste
Institut National de la Statistique et de la Démographie/ Burkina-Faso
cel:(+226) 71 31 53 52/ 75 503 803/ 78 35 77 76



De : Mohd Shuaib
À : gamsworld@googlegroups.com
Envoyé le : Lundi 2 juillet 2012 18h12
Objet : Division by zero error

Hi All,
I encountered a division by zero error when i tried to run my model.
Specifically, the error takes me to the following lines in my gams code:

tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))
psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))

I have also defined them under variable assignment as follows:
YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));

Can someone please assist towards rectifying this errors.

Thank you in advance.

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Shuaib,

The parameter in denominator having some zeros. So that this error is occurring.

Prepare one set of H whose YHO is more than 0, then use that set with $

Ex- positive_H
tyh(H) =e= DTHO(H)/(YHO(H)$ positive_H);

Do it same for other equation.

Regards
Dileep Damayyawar




On 2 July 2012 23:42, Mohd Shuaib wrote:

Hi All,
I encountered a division by zero error when i tried to run my model.
Specifically, the error takes me to the following lines in my gams code:

tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))
psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))

I have also defined them under variable assignment as follows:
YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));

Can someone please assist towards rectifying this errors.

Thank you in advance.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.



\




\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Thanks a lot Herve Guene.
Mohammed I. Shuaibu
PhD Candidate, Department of Economics & Research Fellow, Trade Policy Research and Training Programme (TPRTP)
University of Ibadan
P: +2348033147465

“Above every possessor of knowledge there is One”
Sent from my BlackBerry wireless device from MTN
From: herve guene
Sender: gamsworld@googlegroups.com
Date: Mon, 2 Jul 2012 21:40:00 +0100 (BST)
To: gamsworld@googlegroups.com
ReplyTo: gamsworld@googlegroups.com
Subject: Re: Division by zero error

check the values of your parameters,
specially those that are denominators, because the default value of a parameter is zero. so untill you give or compute an initial value for them you’ll get division by zero error.

Merci et bonne réception!


M. Hervé Jean-Louis GUENE
Ingénieur Statisticien - Economiste
Institut National de la Statistique et de la Démographie/ Burkina-Faso
cel:(+226) 71 31 53 52/ 75 503 803/ 78 35 77 76



De : Mohd Shuaib
À : gamsworld@googlegroups.com
Envoyé le : Lundi 2 juillet 2012 18h12
Objet : Division by zero error

Hi All,
I encountered a division by zero error when i tried to run my model.
Specifically, the error takes me to the following lines in my gams code:

tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))
psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))

I have also defined them under variable assignment as follows:
YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));

Can someone please assist towards rectifying this errors.

Thank you in advance.

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Thanks a lot Dileep!
Mohammed I. Shuaibu
PhD Candidate, Department of Economics & Research Fellow, Trade Policy Research and Training Programme (TPRTP)
University of Ibadan
P: +2348033147465

“Above every possessor of knowledge there is One”
Sent from my BlackBerry wireless device from MTN
From: Dileep Damayyawar
Sender: gamsworld@googlegroups.com
Date: Tue, 3 Jul 2012 11:31:27 +0530
To:
ReplyTo: gamsworld@googlegroups.com
Subject: Re: Division by zero error

Shuaib,

The parameter in denominator having some zeros. So that this error is occurring.

Prepare one set of H whose YHO is more than 0, then use that set with $

Ex- positive_H
tyh(H) =e= DTHO(H)/(YHO(H)$ positive_H);

Do it same for other equation.

Regards
Dileep Damayyawar




On 2 July 2012 23:42, Mohd Shuaib wrote:

Hi All,
I encountered a division by zero error when i tried to run my model.
Specifically, the error takes me to the following lines in my gams code:

tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))
psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))

I have also defined them under variable assignment as follows:
YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));

Can someone please assist towards rectifying this errors.

Thank you in advance.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.



\




\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Reply-to: gamsworld@googlegroups.com

Hello Mr. Herve,

I’m also having a similar error. This is my objective function code:

Objfunction … z =e= sum((i), ( x(i)*((m(i)/c(i))) ) )

The x(i) is my variable.
The m(i) and c(i) are both parameters.

However, I’ve already read in data from excel for each parameter. Would this still cause the c(i) to be zero? How can I fix this?

Thanks,
Jackson

On Monday, July 2, 2012 4:40:00 PM UTC-4, Herve wrote:

check the values of your parameters,
specially those that are denominators, because the default value of a parameter is zero. so untill you give or compute an initial value for them you’ll get division by zero error.

Merci et bonne réception!


M. Hervé Jean-Louis GUENE
Ingénieur Statisticien - Economiste
Institut National de la Statistique et de la Démographie/ Burkina-Faso
cel:(+226) 71 31 53 52/ 75 503 803/ 78 35 77 76



De : Mohd Shuaib
À : gamsworld@googlegroups.com
Envoyé le : Lundi 2 juillet 2012 18h12
Objet : Division by zero error

Hi All,
I encountered a division by zero error when i tried to run my model.
Specifically, the error takes me to the following lines in my gams code:

tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))
psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))

I have also defined them under variable assignment as follows:
YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));

Can someone please assist towards rectifying this errors.

Thank you in advance.

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/90W3M2OxjzQJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hi Jackson

It looks like one of the c(i) is zero…

Just display them and see if one of them is zero (be sure to add eps to the values, so Gams reports the zero values ( e.g. c(i) = c(i) + EPS)

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:22 PM
To: gamsworld@googlegroups.com
Cc: herve guene
Subject: Re: Division by zero error



Hello Mr. Herve,



I’m also having a similar error. This is my objective function code:



Objfunction … z =e= sum((i), ( x(i)*((m(i)/c(i))) ) )



The x(i) is my variable.

The m(i) and c(i) are both parameters.



However, I’ve already read in data from excel for each parameter. Would this still cause the c(i) to be zero? How can I fix this?



Thanks,

Jackson

On Monday, July 2, 2012 4:40:00 PM UTC-4, Herve wrote:

check the values of your parameters,

specially those that are denominators, because the default value of a parameter is zero. so untill you give or compute an initial value for them you’ll get division by zero error.



Merci et bonne réception!


M. Hervé Jean-Louis GUENE

Ingénieur Statisticien - Economiste

Institut National de la Statistique et de la Démographie/ Burkina-Faso

cel:(+226) 71 31 53 52/ 75 503 803/ 78 35 77 76






De : Mohd Shuaib
À : gamsworld@googlegroups.com
Envoyé le : Lundi 2 juillet 2012 18h12
Objet : Division by zero error



Hi All,

I encountered a division by zero error when i tried to run my model.

Specifically, the error takes me to the following lines in my gams code:



tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))

psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))



I have also defined them under variable assignment as follows:

YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));



Can someone please assist towards rectifying this errors.



Thank you in advance.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/90W3M2OxjzQJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hi Renger,

Thanks for helping me out today.

I ran the display for parameter c(i) and none of the values are zero. Where do I add the eps to values? Under parameters or equations?

Thanks,
Jackson

On Tuesday, July 3, 2012 4:28:21 PM UTC-4, Renger van Nieuwkoop wrote:

Hi Jackson

It looks like one of the c(i) is zero…

Just display them and see if one of them is zero (be sure to add eps to the values, so Gams reports the zero values ( e.g. c(i) = c(i) + EPS)

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:22 PM
To: gamsworld@googlegroups.com
Cc: herve guene
Subject: Re: Division by zero error



Hello Mr. Herve,



I’m also having a similar error. This is my objective function code:



Objfunction … z =e= sum((i), ( x(i)*((m(i)/c(i))) ) )



The x(i) is my variable.

The m(i) and c(i) are both parameters.



However, I’ve already read in data from excel for each parameter. Would this still cause the c(i) to be zero? How can I fix this?



Thanks,

Jackson

On Monday, July 2, 2012 4:40:00 PM UTC-4, Herve wrote:

check the values of your parameters,

specially those that are denominators, because the default value of a parameter is zero. so untill you give or compute an initial value for them you’ll get division by zero error.



Merci et bonne réception!


M. Hervé Jean-Louis GUENE

Ingénieur Statisticien - Economiste

Institut National de la Statistique et de la Démographie/ Burkina-Faso

cel:(+226) 71 31 53 52/ 75 503 803/ 78 35 77 76






De : Mohd Shuaib
À : gamsworld@googlegroups.com
Envoyé le : Lundi 2 juillet 2012 18h12
Objet : Division by zero error



Hi All,

I encountered a division by zero error when i tried to run my model.

Specifically, the error takes me to the following lines in my gams code:



tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))

psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))



I have also defined them under variable assignment as follows:

YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));



Can someone please assist towards rectifying this errors.



Thank you in advance.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/90W3M2OxjzQJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/8JwCjqGicmYJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

HI Jackson



Assume you have a set I /i1, i2,i3/ and a parameter c(i) that is initialized as follows:



c(“i1”) = 2;

c(“i2”) = 0;

c(“i3”) = 3;



If you do a display, gams will display this as follows:



---- 9 PARAMETER c



i1 2.000, i3 3.000



The value for i2 is not reported. Here it is easy to spot this missing value, as you only have 3 set elements, but if you have lots of I’s it gets harder to spot the zeros.



If you do the following

c(i) = c(i) + EPS;



Gams adds a very, very small figure to c(i), which does not impact the results. Your output will now be:



i1 2.000, i2 EPS, i3 3.000



and you see the “zero” easily.



Another way would be:



Parameter testforzeros(i);



Testforzeros(i)$(c(i) eq 0) = 1;

Display testforzeros;



With the following output (even if you added EPS!)



---- 16 PARAMETER testforzeros



i2 1.000



Hope, this helps. If you still have this error message, send the model and I have a look at it.



Cheers

Renger





From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:42 PM
To: gamsworld@googlegroups.com
Subject: Re: Division by zero error



Hi Renger,



Thanks for helping me out today.



I ran the display for parameter c(i) and none of the values are zero. Where do I add the eps to values? Under parameters or equations?



Thanks,

Jackson

On Tuesday, July 3, 2012 4:28:21 PM UTC-4, Renger van Nieuwkoop wrote:

Hi Jackson

It looks like one of the c(i) is zero…

Just display them and see if one of them is zero (be sure to add eps to the values, so Gams reports the zero values ( e.g. c(i) = c(i) + EPS)

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:22 PM
To: gamsworld@googlegroups.com
Cc: herve guene
Subject: Re: Division by zero error



Hello Mr. Herve,



I’m also having a similar error. This is my objective function code:



Objfunction … z =e= sum((i), ( x(i)*((m(i)/c(i))) ) )



The x(i) is my variable.

The m(i) and c(i) are both parameters.



However, I’ve already read in data from excel for each parameter. Would this still cause the c(i) to be zero? How can I fix this?



Thanks,

Jackson

On Monday, July 2, 2012 4:40:00 PM UTC-4, Herve wrote:

check the values of your parameters,

specially those that are denominators, because the default value of a parameter is zero. so untill you give or compute an initial value for them you’ll get division by zero error.



Merci et bonne réception!


M. Hervé Jean-Louis GUENE

Ingénieur Statisticien - Economiste

Institut National de la Statistique et de la Démographie/ Burkina-Faso

cel:(+226) 71 31 53 52/ 75 503 803/ 78 35 77 76






De : Mohd Shuaib
À : gamsworld@googlegroups.com
Envoyé le : Lundi 2 juillet 2012 18h12
Objet : Division by zero error



Hi All,

I encountered a division by zero error when i tried to run my model.

Specifically, the error takes me to the following lines in my gams code:



tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))

psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))



I have also defined them under variable assignment as follows:

YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));



Can someone please assist towards rectifying this errors.



Thank you in advance.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/90W3M2OxjzQJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/8JwCjqGicmYJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hi Loveness



You could add a $z(i) to your equation



Myequation(i)$z(i)…



Cheers



Renger



Von: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Im Auftrag von Loveness
Gesendet: Montag, 28. September 2015 00:31
An: gamsworld
Betreff: Division by zero error



Dear all,



I get a division by zero error on the following equation



a(i)=e= b(i)*(1 - c(i))/ z(i)

;

The problem is z is parameter (table with values).How do I resolve this error?



Thanks for helping me.



kind regards,



Loveness


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 Loveness.

You might have to initialize or put bounds to your z(i), such as

z.lo(i) = lowvalue

Cheers

On Monday, September 28, 2015 at 3:45:02 AM UTC-3, Loveness wrote:

Dear all,

I get a division by zero error on the following equation

a(i)=e= b(i)*(1 - c(i))/ z(i)
;
The problem is z is parameter (table with values).How do I resolve this error?

Thanks for helping me.

kind regards,

Loveness


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.

I am trying to calculate a parameter x=y/(y^2+z^2).
I have written x=y/(sqr(y)+sqr(z))

the values of y & z parameters are already defined. y contains some zeros, but z contains no zeros. still I am getting UNDF as the output (i.e. x). Any help?

On Wednesday, 4 July 2012 14:39:44 UTC+5:30, Renger van Nieuwkoop wrote:

HI Jackson



Assume you have a set I /i1, i2,i3/ and a parameter c(i) that is initialized as follows:



c(“i1”) = 2;

c(“i2”) = 0;

c(“i3”) = 3;



If you do a display, gams will display this as follows:



---- 9 PARAMETER c



i1 2.000, i3 3.000



The value for i2 is not reported. Here it is easy to spot this missing value, as you only have 3 set elements, but if you have lots of I’s it gets harder to spot the zeros.



If you do the following

c(i) = c(i) + EPS;



Gams adds a very, very small figure to c(i), which does not impact the results. Your output will now be:



i1 2.000, i2 EPS, i3 3.000



and you see the “zero” easily.



Another way would be:



Parameter testforzeros(i);



Testforzeros(i)$(c(i) eq 0) = 1;

Display testforzeros;



With the following output (even if you added EPS!)



---- 16 PARAMETER testforzeros



i2 1.000



Hope, this helps. If you still have this error message, send the model and I have a look at it.



Cheers

Renger





From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:42 PM
To: gams...@googlegroups.com
Subject: Re: Division by zero error



Hi Renger,



Thanks for helping me out today.



I ran the display for parameter c(i) and none of the values are zero. Where do I add the eps to values? Under parameters or equations?



Thanks,

Jackson

On Tuesday, July 3, 2012 4:28:21 PM UTC-4, Renger van Nieuwkoop wrote:

Hi Jackson

It looks like one of the c(i) is zero…

Just display them and see if one of them is zero (be sure to add eps to the values, so Gams reports the zero values ( e.g. c(i) = c(i) + EPS)

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:22 PM
To: gams...@googlegroups.com
Cc: herve guene
Subject: Re: Division by zero error



Hello Mr. Herve,



I’m also having a similar error. This is my objective function code:



Objfunction … z =e= sum((i), ( x(i)*((m(i)/c(i))) ) )



The x(i) is my variable.

The m(i) and c(i) are both parameters.



However, I’ve already read in data from excel for each parameter. Would this still cause the c(i) to be zero? How can I fix this?



Thanks,

Jackson

On Monday, July 2, 2012 4:40:00 PM UTC-4, Herve wrote:

check the values of your parameters,

specially those that are denominators, because the default value of a parameter is zero. so untill you give or compute an initial value for them you’ll get division by zero error.



Merci et bonne réception!


M. Hervé Jean-Louis GUENE

Ingénieur Statisticien - Economiste

Institut National de la Statistique et de la Démographie/ Burkina-Faso

cel:(+226) 71 31 53 52/ 75 503 803/ 78 35 77 76






De : Mohd Shuaib
À : gams...@googlegroups.com
Envoyé le : Lundi 2 juillet 2012 18h12
Objet : Division by zero error



Hi All,

I encountered a division by zero error when i tried to run my model.

Specifically, the error takes me to the following lines in my gams code:



tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))

psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))



I have also defined them under variable assignment as follows:

YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));



Can someone please assist towards rectifying this errors.



Thank you in advance.


To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/90W3M2OxjzQJ.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/8JwCjqGicmYJ.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


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.

Actually I have the following issue:
I am calculating p(z) from the table as follows with no error,
set z /b1b6/ ;
table t(z,
) dat

r x
b1 0.005 0.17
b2 0.001 0.037
b3 0.003 0.258
b4 0.007 0.197
b5 0.001 0.037
b6 0.002 0.14 ;

parameter p(z);
p(z)=t(z,‘r’)/(sqr(t(z,‘r’))+sqr(t(z,‘x’)));

but when we define the table like the following I have division by zero error
set z /b1b6/ ;
table t(z,z,
) dat

r x
b1.b2 0.005 0.17
b2.b3 0.001 0.037
b1.b4 0.003 0.258
b2.b4 0.007 0.197
b4.b5 0.001 0.037
b5.b6 0.002 0.14
b3.b6 0.001 0.018 ;

parameter p(z,z);
p(z,z)=t(z,z,‘r’)/(sqr(t(z,z,‘r’))+sqr(t(z,z,‘x’)));

Any clue?

On Thursday, 5 November 2015 19:00:27 UTC+5:30, Partha Das wrote:

I am trying to calculate a parameter x=y/(y^2+z^2).
I have written x=y/(sqr(y)+sqr(z))

the values of y & z parameters are already defined. y contains some zeros, but z contains no zeros. still I am getting UNDF as the output (i.e. x). Any help?

On Wednesday, 4 July 2012 14:39:44 UTC+5:30, Renger van Nieuwkoop wrote:

HI Jackson



Assume you have a set I /i1, i2,i3/ and a parameter c(i) that is initialized as follows:



c(“i1”) = 2;

c(“i2”) = 0;

c(“i3”) = 3;



If you do a display, gams will display this as follows:



---- 9 PARAMETER c



i1 2.000, i3 3.000



The value for i2 is not reported. Here it is easy to spot this missing value, as you only have 3 set elements, but if you have lots of I’s it gets harder to spot the zeros.



If you do the following

c(i) = c(i) + EPS;



Gams adds a very, very small figure to c(i), which does not impact the results. Your output will now be:



i1 2.000, i2 EPS, i3 3.000



and you see the “zero” easily.



Another way would be:



Parameter testforzeros(i);



Testforzeros(i)$(c(i) eq 0) = 1;

Display testforzeros;



With the following output (even if you added EPS!)



---- 16 PARAMETER testforzeros



i2 1.000



Hope, this helps. If you still have this error message, send the model and I have a look at it.



Cheers

Renger





From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:42 PM
To: gams...@googlegroups.com
Subject: Re: Division by zero error



Hi Renger,



Thanks for helping me out today.



I ran the display for parameter c(i) and none of the values are zero. Where do I add the eps to values? Under parameters or equations?



Thanks,

Jackson

On Tuesday, July 3, 2012 4:28:21 PM UTC-4, Renger van Nieuwkoop wrote:

Hi Jackson

It looks like one of the c(i) is zero…

Just display them and see if one of them is zero (be sure to add eps to the values, so Gams reports the zero values ( e.g. c(i) = c(i) + EPS)

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:22 PM
To: gams...@googlegroups.com
Cc: herve guene
Subject: Re: Division by zero error



Hello Mr. Herve,



I’m also having a similar error. This is my objective function code:



Objfunction … z =e= sum((i), ( x(i)*((m(i)/c(i))) ) )



The x(i) is my variable.

The m(i) and c(i) are both parameters.



However, I’ve already read in data from excel for each parameter. Would this still cause the c(i) to be zero? How can I fix this?



Thanks,

Jackson

On Monday, July 2, 2012 4:40:00 PM UTC-4, Herve wrote:

check the values of your parameters,

specially those that are denominators, because the default value of a parameter is zero. so untill you give or compute an initial value for them you’ll get division by zero error.



Merci et bonne réception!


M. Hervé Jean-Louis GUENE

Ingénieur Statisticien - Economiste

Institut National de la Statistique et de la Démographie/ Burkina-Faso

cel:(+226) 71 31 53 52/ 75 503 803/ 78 35 77 76






De : Mohd Shuaib
À : gams...@googlegroups.com
Envoyé le : Lundi 2 juillet 2012 18h12
Objet : Division by zero error



Hi All,

I encountered a division by zero error when i tried to run my model.

Specifically, the error takes me to the following lines in my gams code:



tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))

psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))



I have also defined them under variable assignment as follows:

YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));



Can someone please assist towards rectifying this errors.



Thank you in advance.


To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/90W3M2OxjzQJ.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/8JwCjqGicmYJ.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


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 Partha



Two remarks:

  •      In your second calculation you will have zeros for alle combinations of the set z and itself that are not available in the table (e.g. b1.b1) which causes the error. You just add a $-condition on the left hand side to get rid of the errors.
    
  •      In your second calculation of t you only calculate the diagonal elements (b1.b1, b2.b2, etc.). If you want to calculate all the elements, you should define an alias for z.
    




Here is the way it works for me:



alias(z,z1);

parameter p(z,z);

p(z,z1)$(sqr(t(z,z1,‘r’))+sqr(t(z,z1,‘x’)))=t(z,z1,‘r’)/(sqr(t(z,z1,‘r’))+sqr(t(z,z1,‘x’)));



Chees

Renger







From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Partha Das
Sent: Freitag, 6. November 2015 07:23
To: gamsworld
Subject: Re: Division by zero error



Actually I have the following issue:

I am calculating p(z) from the table as follows with no error,

set z /b1*b6/ ;

table t(z,*) dat



r x

b1 0.005 0.17

b2 0.001 0.037

b3 0.003 0.258

b4 0.007 0.197

b5 0.001 0.037

b6 0.002 0.14 ;



parameter p(z);

p(z)=t(z,‘r’)/(sqr(t(z,‘r’))+sqr(t(z,‘x’)));



but when we define the table like the following I have division by zero error

set z /b1*b6/ ;

table t(z,z,*) dat



r x

b1.b2 0.005 0.17

b2.b3 0.001 0.037

b1.b4 0.003 0.258

b2.b4 0.007 0.197

b4.b5 0.001 0.037

b5.b6 0.002 0.14

b3.b6 0.001 0.018 ;



parameter p(z,z);

p(z,z)=t(z,z,‘r’)/(sqr(t(z,z,‘r’))+sqr(t(z,z,‘x’)));



Any clue?


On Thursday, 5 November 2015 19:00:27 UTC+5:30, Partha Das wrote:

I am trying to calculate a parameter x=y/(y^2+z^2).

I have written x=y/(sqr(y)+sqr(z))



the values of y & z parameters are already defined. y contains some zeros, but z contains no zeros. still I am getting UNDF as the output (i.e. x). Any help?

On Wednesday, 4 July 2012 14:39:44 UTC+5:30, Renger van Nieuwkoop wrote:

HI Jackson



Assume you have a set I /i1, i2,i3/ and a parameter c(i) that is initialized as follows:



c(“i1”) = 2;

c(“i2”) = 0;

c(“i3”) = 3;



If you do a display, gams will display this as follows:



---- 9 PARAMETER c



i1 2.000, i3 3.000



The value for i2 is not reported. Here it is easy to spot this missing value, as you only have 3 set elements, but if you have lots of I’s it gets harder to spot the zeros.



If you do the following

c(i) = c(i) + EPS;



Gams adds a very, very small figure to c(i), which does not impact the results. Your output will now be:



i1 2.000, i2 EPS, i3 3.000



and you see the “zero” easily.



Another way would be:



Parameter testforzeros(i);



Testforzeros(i)$(c(i) eq 0) = 1;

Display testforzeros;



With the following output (even if you added EPS!)



---- 16 PARAMETER testforzeros



i2 1.000



Hope, this helps. If you still have this error message, send the model and I have a look at it.



Cheers

Renger





From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:42 PM
To: gams...@googlegroups.com
Subject: Re: Division by zero error



Hi Renger,



Thanks for helping me out today.



I ran the display for parameter c(i) and none of the values are zero. Where do I add the eps to values? Under parameters or equations?



Thanks,

Jackson

On Tuesday, July 3, 2012 4:28:21 PM UTC-4, Renger van Nieuwkoop wrote:

Hi Jackson

It looks like one of the c(i) is zero…

Just display them and see if one of them is zero (be sure to add eps to the values, so Gams reports the zero values ( e.g. c(i) = c(i) + EPS)

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:22 PM
To: gams...@googlegroups.com
Cc: herve guene
Subject: Re: Division by zero error



Hello Mr. Herve,



I’m also having a similar error. This is my objective function code:



Objfunction … z =e= sum((i), ( x(i)*((m(i)/c(i))) ) )



The x(i) is my variable.

The m(i) and c(i) are both parameters.



However, I’ve already read in data from excel for each parameter. Would this still cause the c(i) to be zero? How can I fix this?



Thanks,

Jackson

On Monday, July 2, 2012 4:40:00 PM UTC-4, Herve wrote:

check the values of your parameters,

specially those that are denominators, because the default value of a parameter is zero. so untill you give or compute an initial value for them you’ll get division by zero error.



Merci et bonne réception!


M. Hervé Jean-Louis GUENE

Ingénieur Statisticien - Economiste

Institut National de la Statistique et de la Démographie/ Burkina-Faso

cel:(+226) 71 31 53 52/ 75 503 803/ 78 35 77 76






De : Mohd Shuaib
À : gams...@googlegroups.com
Envoyé le : Lundi 2 juillet 2012 18h12
Objet : Division by zero error



Hi All,

I encountered a division by zero error when i tried to run my model.

Specifically, the error takes me to the following lines in my gams code:



tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))

psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))



I have also defined them under variable assignment as follows:

YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));



Can someone please assist towards rectifying this errors.



Thank you in advance.


To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/90W3M2OxjzQJ.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/8JwCjqGicmYJ.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


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.

It is a great help Renger. Thank you so much.

On Friday, 6 November 2015 14:08:10 UTC+5:30, Renger van Nieuwkoop wrote:

Hi Partha



Two remarks:

  •      In your second calculation you will have zeros for alle combinations of the set z and itself that are not available in the table (e.g. b1.b1) which causes the error. You just add a $-condition on the left hand side to get rid of the errors.
    
  •      In your second calculation of t you only calculate the diagonal elements (b1.b1, b2.b2, etc.). If you want to calculate all the elements, you should define an alias for z.
    




Here is the way it works for me:



alias(z,z1);

parameter p(z,z);

p(z,z1)$(sqr(t(z,z1,‘r’))+sqr(t(z,z1,‘x’)))=t(z,z1,‘r’)/(sqr(t(z,z1,‘r’))+sqr(t(z,z1,‘x’)));



Chees

Renger







From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Partha Das
Sent: Freitag, 6. November 2015 07:23
To: gamsworld
Subject: Re: Division by zero error



Actually I have the following issue:

I am calculating p(z) from the table as follows with no error,

set z /b1*b6/ ;

table t(z,*) dat



r x

b1 0.005 0.17

b2 0.001 0.037

b3 0.003 0.258

b4 0.007 0.197

b5 0.001 0.037

b6 0.002 0.14 ;



parameter p(z);

p(z)=t(z,‘r’)/(sqr(t(z,‘r’))+sqr(t(z,‘x’)));



but when we define the table like the following I have division by zero error

set z /b1*b6/ ;

table t(z,z,*) dat



r x

b1.b2 0.005 0.17

b2.b3 0.001 0.037

b1.b4 0.003 0.258

b2.b4 0.007 0.197

b4.b5 0.001 0.037

b5.b6 0.002 0.14

b3.b6 0.001 0.018 ;



parameter p(z,z);

p(z,z)=t(z,z,‘r’)/(sqr(t(z,z,‘r’))+sqr(t(z,z,‘x’)));



Any clue?


On Thursday, 5 November 2015 19:00:27 UTC+5:30, Partha Das wrote:

I am trying to calculate a parameter x=y/(y^2+z^2).

I have written x=y/(sqr(y)+sqr(z))



the values of y & z parameters are already defined. y contains some zeros, but z contains no zeros. still I am getting UNDF as the output (i.e. x). Any help?

On Wednesday, 4 July 2012 14:39:44 UTC+5:30, Renger van Nieuwkoop wrote:

HI Jackson



Assume you have a set I /i1, i2,i3/ and a parameter c(i) that is initialized as follows:



c(“i1”) = 2;

c(“i2”) = 0;

c(“i3”) = 3;



If you do a display, gams will display this as follows:



---- 9 PARAMETER c



i1 2.000, i3 3.000



The value for i2 is not reported. Here it is easy to spot this missing value, as you only have 3 set elements, but if you have lots of I’s it gets harder to spot the zeros.



If you do the following

c(i) = c(i) + EPS;



Gams adds a very, very small figure to c(i), which does not impact the results. Your output will now be:



i1 2.000, i2 EPS, i3 3.000



and you see the “zero” easily.



Another way would be:



Parameter testforzeros(i);



Testforzeros(i)$(c(i) eq 0) = 1;

Display testforzeros;



With the following output (even if you added EPS!)



---- 16 PARAMETER testforzeros



i2 1.000



Hope, this helps. If you still have this error message, send the model and I have a look at it.



Cheers

Renger





From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:42 PM
To: gams...@googlegroups.com
Subject: Re: Division by zero error



Hi Renger,



Thanks for helping me out today.



I ran the display for parameter c(i) and none of the values are zero. Where do I add the eps to values? Under parameters or equations?



Thanks,

Jackson

On Tuesday, July 3, 2012 4:28:21 PM UTC-4, Renger van Nieuwkoop wrote:

Hi Jackson

It looks like one of the c(i) is zero…

Just display them and see if one of them is zero (be sure to add eps to the values, so Gams reports the zero values ( e.g. c(i) = c(i) + EPS)

Renger



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Jackson
Sent: Tuesday, July 03, 2012 10:22 PM
To: gams...@googlegroups.com
Cc: herve guene
Subject: Re: Division by zero error



Hello Mr. Herve,



I’m also having a similar error. This is my objective function code:



Objfunction … z =e= sum((i), ( x(i)*((m(i)/c(i))) ) )



The x(i) is my variable.

The m(i) and c(i) are both parameters.



However, I’ve already read in data from excel for each parameter. Would this still cause the c(i) to be zero? How can I fix this?



Thanks,

Jackson

On Monday, July 2, 2012 4:40:00 PM UTC-4, Herve wrote:

check the values of your parameters,

specially those that are denominators, because the default value of a parameter is zero. so untill you give or compute an initial value for them you’ll get division by zero error.



Merci et bonne réception!


M. Hervé Jean-Louis GUENE

Ingénieur Statisticien - Economiste

Institut National de la Statistique et de la Démographie/ Burkina-Faso

cel:(+226) 71 31 53 52/ 75 503 803/ 78 35 77 76






De : Mohd Shuaib
À : gams...@googlegroups.com
Envoyé le : Lundi 2 juillet 2012 18h12
Objet : Division by zero error



Hi All,

I encountered a division by zero error when i tried to run my model.

Specifically, the error takes me to the following lines in my gams code:



tyh(H) = DTHO(H)/YHO(H); (**** Exec Error at line 28078: division by zero (0))

psi(H) = SHO(H)/YDHO(H); (**** Exec Error at line 28138: division by zero (0))



I have also defined them under variable assignment as follows:

YHO(H) = lambda_w(H)+lambda_r(H)+TGO(H)+TRHO(H);
SHO(H) = YHO(H)-DTHO(H)-SUM(TR,CO(H,TR));



Can someone please assist towards rectifying this errors.



Thank you in advance.


To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.




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.