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
EXECERROR, division by zero (0)
-
- User
- Posts: 12
- Joined: 5 years ago
EXECERROR, division by zero (0)
- Attachments
-
- WAZ4.gms
- (79.41 KiB) Downloaded 150 times
Re: EXECERROR, division by zero (0)
Hi,
line 920 reads as follows:
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
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;
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
-
- User
- Posts: 12
- Joined: 5 years ago
Re: EXECERROR, division by zero (0)
Thank you Dr. Fred.
Very very grateful.
Regards,
Moyo.
Very very grateful.
Regards,
Moyo.