User Tools

Site Tools


gams:undefined_real_power

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

gams:undefined_real_power [2008/10/24 15:45] (current)
support created
Line 1: Line 1:
 +====== UNDEFINED REAL POWER ======
 +<​code>​
 + **** ERRORS(S) IN EQUATION XXX(S,M)
 +      1 INSTANCE OF - UNDEFINED REAL POWER (RETURNED ​ 0.0E+00)
 +</​code>​
  
 +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 NOTICEPRIVACY POLICY gams/undefined_real_power.txt ยท Last modified: 2008/10/24 15:45 by support