Domain error(s) in nonlinear functions

Hi All,
Please, I need some help in solving an error I encountered solving my model using GAMS.
Specifically, the error msg is

***Error at line 2028: power: FUNC DOMAIN: pow(x,i), i not integer

The line 2028 has the specification:
valPIXINV_PRI_C(t,‘sim1’) = valPIXINV_PRI_C(t-1,‘sim1’)*PROD[i$gamma_INV
PRI(i), (PC.l(i,t)/PC.l(i,t-1))**gamma_INVPRI(i)];
where: gamma_INVPRI(i) = INV_PRIO(i)/SUM[ij,INV_PRIO(ij)];

How do I resolve this error.

Many thanks

Samuel OMENKA
Department of Economics
University of Ibadan
Ibadan, Nigeria
+234-803-837-3456


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

Hi Samuel
Maybe you should check this link, explaining the difference between pow(x,i) and x**y.

http://support.gams.com/doku.php?id=gams:difference_between_the_-operator_and_the_power_function

basically, on one hand, pow(x,i) may use any real x (positive or negative) but needs to have an integere exponent i (which is not your case as your exponent is defined as a quotient). on the other hand, x**y does not require the exponent to be integer, but then x should be positive.

hope this helps.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/UWQcyiWgVdkJ.
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

Very many thanks Dax.
I realised that when I tried the alternative specification pow(x,i) i received the error msg saying ‘i’ not an integer. But leaving it at x**y gives me x<0. Really don’t know how to get around this.

Could there be an alternative specification for gamma_INVPRI(i) = INV_PRIO(i)/SUM[ij,INV_PRIO(ij)];

On Friday, July 6, 2012 8:40:28 AM UTC+1, Dax wrote:

Hi Samuel
Maybe you should check this link, explaining the difference between pow(x,i) and x**y.

http://support.gams.com/doku.php?id=gams:difference_between_the_-operator_and_the_power_function

basically, on one hand, pow(x,i) may use any real x (positive or negative) but needs to have an integere exponent i (which is not your case as your exponent is defined as a quotient). on the other hand, x**y does not require the exponent to be integer, but then x should be positive.

hope this helps.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/DKSeAAsozV8J.
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.