Error Messages/40099

Example warning message

Warning: -1 is not an element of the Time index.

Cause

Your model is evaluating a dynamic loop. During this evaluation, an expression attempted to access an element (e.g., using Subscript) that does not correspond to an element of the Time index. This might occur, for example, if you tried to use a value from a time period before your first time period.

Remedy

This might be exposing a logical error. But if this is intention, this is only a warning, so you can ignore it, e.g.:

Change:

X[Time = v]

to

IgnoreWarnings(X[Time = v])

or you can make the logic explicit:

If v >= 0 Then X[Time = v] Else Null

Or you can specify a default value:

X[Time = v, defval: 0]

The defval is used when v is not found in the Time index.

See Also

Comments


You are not allowed to post comments.