gams:undefined_real_power

**** ERRORS(S) IN EQUATION XXX(S,M) 1 INSTANCE OF - UNDEFINED REAL POWER (RETURNED 0.0E+00)

Without seeing the definition of equation XXX, it is not possible to say what the problem is exactly, but I can speculate a bit. This type of message is often the result of raising a variable to a power less than one, and trying to evaluate this with a zero or negative argument. For example,

`x**0.5`

is not defined for `x=-.1`

, and if `x = 0,`

the derivative is not defined, so there is still going to be an evaluation error.

One common approach to fixing this is to place a bound on the variable in question (say `x.lo = 1e-5`

) and make sure that none of these bounds are active at the solution to the model.

If you are raising an expression to a power, you can either add an equation to bound that expression, or set this expression to a new variable you introduce (via a new equation) and bound the new variable as above.

IMPRESSUM / LEGAL NOTICE
PRIVACY POLICY
gams/undefined_real_power.txt · Last modified: 2008/10/24 13:45 by support