Division by zero execution error

Hi,

Need help in correcting the division by zero execution time error in my code attached
The errors occur in equation 43-47. I have declared the variables in denominator as positive variable and also bounded in constraints.
:frowning:

e43.. CE1 =e= Alpha*((Q12/(U12*(0.5*Theta11*Theta21*(Theta11+Theta21))**0.33))**Beta);

Thanks
HEN_3_Ali.gms (4.89 KB)

Hi,

you should set actual variable bounds like

Theta11.lo = 10;
Theta21.lo = 10;
Theta12.lo = 10;
Theta22.lo = 10;
Theta13.lo = 10;
Theta23.lo = 10;
Theta14.lo = 10;
Theta24.lo = 10;
Theta15.lo = 10;
Theta25.lo = 10;

instead of trying to enforce bounds via constraints like

e14.. Theta11=g=10;
e15.. Theta21=g=10;
e16.. Theta12=g=10;
e17.. Theta22=g=10;
[...]

By default, variable levels are at the lower bound. Hence, if you do not provide proper lower bounds, you run into the division by zero error right at the start point.

I hope this helps!

Fred