Commonly found errors and their cause

Top  Previous  Next

A number of errors are commonly found in GAMS that frequently confuse new users.  Here I present a table of those errors with a brief indication of cause and a hyperlink cross-reference to longer sections that follow on common causes of such error messages.  In using this table, readers should also look at the GAMS error message text as it may indicate additional causes.

 

GAMS

Error Message

Potential Causes Discussion

   Common Cause of Error

8

  H  

Mismatched parentheses-too many "(" found

36

  I  

Missing elements in equation definition

37

  I  

Missing equation type ("=L=", "=E="  "=G=")  in equation specification

51-60

  J  

Illegal nonlinear specification

66

  K  

Item which has not been given numerical data appears in equation

71

  I  

Equation has been declared, but not algebraically specified with ".." statement

96

  B  

A statement ended and another began but no ; was included.

120

 C, L

Cannot find a set with this name -- often a set element is referenced without properly being enclosed in "

125

  F  

Set is already in use in a sum or an equation definition

140

 C,  K , M

GAMS looking for a keyword or declared element and cannot find it.  Check spelling and declarations.

141

  K  

Parameter without data used, or SOLVE does not proceed .L, and .M references

148

  E  

Item referenced with more or less indexed sets than in declaration

149

 G, L

The set identified is not indexed either in a sum or an equation definition

170

 C, D

Set element referred to cannot be found in set defined for this index position, check for misspelling, omissions, and references to wrong set

171

 E,  L, O

A domain error, Wrong set being referenced for this index position

195

  N  

Name used here duplicates that of an already defined item

198

P

Using ORD on a set that is not ordered

256

 I,  J,  K

Something wrong with model specification.  Look for other error messages immediately after solve statement

257

A-N

Solver not checked.  Happens in conjunction with any GAMS error

340

  L  

Quotes likely forgotten around a specific set reference

408

  H  

Mismatched parentheses-too many ")" found

 

1The entry below indicates when one gets error 8 a common cause of that error is discussed under the common error H section below.