Power errors

Hello there,

I am building a mixed integer non linear programming model , in my objective function I have this term PalphaPower( P , (-e))

I’m keep getting the following errors ::

**** Exec Error at line 48: power: FUNC SINGULAR: pow(x,i), |x| tiny, i < 0
**** Exec Error at line 48: overflow in * operation (mulop)

would you please explain what these errors mean ?
Any suggestions to solve this issue ??!!


Thanks in advance,
Adei


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

On Thursday, July 19, 2012 8:33:38 AM UTC-7, Adei wrote:



Hello there,

I am building a mixed integer non linear programming model , in my objective function I have this term PalphaPower( P , (-e))

I’m keep getting the following errors ::

**** Exec Error at line 48: power: FUNC SINGULAR: pow(x,i), |x| tiny, i < 0
**** Exec Error at line 48: overflow in * operation (mulop)

would you please explain what these errors mean ?
Any suggestions to solve this issue ??!!


Thanks in advance,
Adei


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

hello friend.
I think that you should use double star instead of power means **.

— On Thu, 7/19/12, ali wrote:


From: ali
Subject: Re: Power errors
To: gamsworld@googlegroups.com
Date: Thursday, July 19, 2012, 5:59 PM



On Thursday, July 19, 2012 8:33:38 AM UTC-7, Adei wrote:



Hello there,

I am building a mixed integer non linear programming model , in my objective function I have this term PalphaPower( P , (-e))

I’m keep getting the following errors ::

**** Exec Error at line 48: power: FUNC SINGULAR: pow(x,i), |x| tiny, i < 0
**** Exec Error at line 48: overflow in * operation (mulop)

would you please explain what these errors mean ?
Any suggestions to solve this issue ??!!


Thanks in advance,
Adei


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

I assume the ‘e’ in your expression is non-integer. In gams, the POWER function requires the exponent to be an integer. As suggested by Samieh, using ** instead of power can work for you. But also in the later case, the root need to be positive real number (in your case, P).

HTH,
Destin

On Tue, Jul 24, 2012 at 9:41 AM, Samieh Amanaty wrote:

hello friend.
I think that you should use double star instead of power means **.

— On Thu, 7/19/12, ali wrote:


From: ali
Subject: Re: Power errors
To: gamsworld@googlegroups.com
Date: Thursday, July 19, 2012, 5:59 PM




On Thursday, July 19, 2012 8:33:38 AM UTC-7, Adei wrote:



Hello there,

I am building a mixed integer non linear programming model , in my objective function I have this term PalphaPower( P , (-e))

I’m keep getting the following errors ::

**** Exec Error at line 48: power: FUNC SINGULAR: pow(x,i), |x| tiny, i < 0
**** Exec Error at line 48: overflow in * operation (mulop)

would you please explain what these errors mean ?
Any suggestions to solve this issue ??!!


Thanks in advance,
Adei


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

You may learn more about the differences in the following link.
http://support.gams.com/doku.php?id=gams:difference_between_the_-operator_and_the_power_function

Bests,
Destin

On Tue, Jul 24, 2012 at 3:39 PM, Destin Zed wrote:

I assume the ‘e’ in your expression is non-integer. In gams, the POWER function requires the exponent to be an integer. As suggested by Samieh, using ** instead of power can work for you. But also in the later case, the root need to be positive real number (in your case, P).

HTH,
Destin


On Tue, Jul 24, 2012 at 9:41 AM, Samieh Amanaty wrote:

hello friend.
I think that you should use double star instead of power means **.

— On Thu, 7/19/12, ali wrote:


From: ali
Subject: Re: Power errors
To: gamsworld@googlegroups.com
Date: Thursday, July 19, 2012, 5:59 PM




On Thursday, July 19, 2012 8:33:38 AM UTC-7, Adei wrote:



Hello there,

I am building a mixed integer non linear programming model , in my objective function I have this term PalphaPower( P , (-e))

I’m keep getting the following errors ::

**** Exec Error at line 48: power: FUNC SINGULAR: pow(x,i), |x| tiny, i < 0
**** Exec Error at line 48: overflow in * operation (mulop)

would you please explain what these errors mean ?
Any suggestions to solve this issue ??!!


Thanks in advance,
Adei


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

Hey guys,
thanks for your suggestions.

I wrote Pe , where P is a positive variable and e is a scalar equals -3. and then I got the following error:
rPower: FUNC DOMAIN: x
y, x=0,y wrote:

hello friend.
I think that you should use double star instead of power means **.

— On Thu, 7/19/12, ali wrote:


From: ali
Subject: Re: Power errors
To: gams...@googlegroups.com
Date: Thursday, July 19, 2012, 5:59 PM




On Thursday, July 19, 2012 8:33:38 AM UTC-7, Adei wrote:



Hello there,

I am building a mixed integer non linear programming model , in my objective function I have this term PalphaPower( P , (-e))

I’m keep getting the following errors ::

**** Exec Error at line 48: power: FUNC SINGULAR: pow(x,i), |x| tiny, i < 0
**** Exec Error at line 48: overflow in * operation (mulop)

would you please explain what these errors mean ?
Any suggestions to solve this issue ??!!


Thanks in advance,
Adei


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


Adei, 2012-09-06 15:33:51
Subject:Re: Power errors

I wrote Pe , where P is a positive variable and e is a scalar equals -3.
and then I got the following error:
rPower: FUNC DOMAIN: x
y, x=0,y > Then I tried power(P,e) and then I got the following error:

                     FUNC SINGULAR: pow(x,i), |x| tiny, i < 0

the error message is clear,
pow(x,-3) means 1/x^3, it would be a huge number when x is tiny.
you may want to check why x has such a tiny value in your system, or init it with a bigger value.

HTH,

Yan

\

hi,
‘y’ is a set and you can not use it as number! I think, you want to write some thing like following:

sets
y index set of years within the planning horizon /1*5/;

parameters
DR nominal discount rate /0.02/
DF(y) discount factor for year y
year(y) /1 = 1, 2 = 2, 3 = 3, 4 = 4, 5 = 5/;


DF(y)=1/((1+DR)**year(y));

display DF


I hope, it be helpful.
From: “alyasivrikaya@gmail.com
To: gamsworld@googlegroups.com
Sent: Thursday, February 28, 2013 7:01 PM
Subject: power errors

Hi,
I’m just learning gams. This is a part of my code.

sets
y index set of years within the planning horizon /1*10/;

parameters
DR nominal discount rate /0.02/
DF(y) discount factor for year y;
DF(y)=1/((1+DR)**y);

I’m getting the following errors:

Error 148: dimension different
Error 128: exponent of power not a real number

how can i solve this issue?

Thanks.

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



\

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\

Hello,

Actually,It’s very simple.
Using the function ord(set),all you need is
change DF(y)=1/((1+DR)**y);
into DF(y)=1/((1+DR)**ord(y));

By the way,the GAMS user’s guide is really helpful!

Hope it helps!
Regards!

Philms

On Thursday, February 28, 2013 11:31:15 PM UTC+8, alyasi...@gmail.com wrote:

Hi,
I’m just learning gams. This is a part of my code.

sets
y index set of years within the planning horizon /1*10/;

parameters
DR nominal discount rate /0.02/
DF(y) discount factor for year y;
DF(y)=1/((1+DR)**y);

I’m getting the following errors:

Error 148: dimension different
Error 128: exponent of power not a real number

how can i solve this issue?

Thanks.


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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\