EXECERROR, division by zero (0)

Problems with modeling
Post Reply
delelayo08
User
User
Posts: 12
Joined: 5 years ago

EXECERROR, division by zero (0)

Post by delelayo08 »

Hello Gurus,

I humbly request assistance on how to correct the execution error at line 924 (Exec Error at line 924: division by zero (0)) in my GAMS file

Please find attached a copy of my GAMS file (.gms)


Thank you in anticipation for your prompt and favorable response
Attachments
WAZ4.gms
(79.41 KiB) Downloaded 150 times
Fred
Posts: 372
Joined: 7 years ago

Re: EXECERROR, division by zero (0)

Post by Fred »

Hi,

line 920 reads as follows:

Code: Select all

  ZKMD(m,pd,t,ni)$tkp(t,pd)= capitalcost0(t)* (XCOMD(m,pd,t,ni)/capacity0(t))**capacity_exponent;
Since there is only one division in this line, the problem mst be caused by capacity0(t). Lookung at the code it turns out that set t has 7 elements

storage
sugar_milling
biochemical_Conversion
Thermochemical_Conversion
blending
crushing
pretreatment


parameter capacity0(t) has non-zero values for only 5 of the elements of t

storage,11446.215
biochemical_Conversion,123869.121
Thermochemical_Conversion,123869.121
crushing,56558.16
pretreatment,56558.16


In line 920 you try to carry out the division for all t that are in tkp(t,pd):

storage
sugar_milling
Thermochemical_Conversion


As you can see, there is no capacity0('sugar_milling') which means you try to divide by 0.

I hope this helps!

Best,
Fred
delelayo08
User
User
Posts: 12
Joined: 5 years ago

Re: EXECERROR, division by zero (0)

Post by delelayo08 »

Thank you Dr. Fred.


Very very grateful.


Regards,

Moyo.
Post Reply