|
Improper equation ".." statements - error I |
Top Previous Next |
|
Each declared equation must be specified with a statement, which contains certain elements. Omitting the ".." causes error $36. Omitting the equation type ("=L=", "=E=", or "=G=") causes error $37. Omitting the specification of a declared equation is marked with messages $71 and $256. The example shorterr11.gms illustrates the first two such errors under the use of the errmsg=1 option which repositions the error message explanatory text.
25 OBJT PROFIT=E= SUM(PROCESS,(PRICE(PROCESS)*yield(process) **** $36 **** 36 '=' or '..' or ':=' or '$=' operator expected **** rest of statement ignored 26 -PRODCOST(PROCESS))*PRODUCTION(PROCESS)) ; 27 AVAILABLE(RESOURCE).. SUM(PROCESS,RESOURUSE(RESOURCE,PROCESS) 28 *PRODUCTION(PROCESS)) = RESORAVAIL(RESOURCE); **** $37 **** 37 '=l=' or '=e=' or '=g=' operator expected
while the example shorterr12.gms illustrates the last two
22 EQUATIONS OBJT OBJECTIVE FUNCTION ( PROFIT ) 23 AVAILABLE(RESOURCE) RESOURCES AVAILABLE 24 notthere one i forgot ; 25 OBJT.. PROFIT=E= SUM(PROCESS,(PRICE(PROCESS)*yield(process) 26 -PRODCOST(PROCESS))*PRODUCTION(PROCESS)) ; 27 AVAILABLE(RESOURCE).. SUM(PROCESS,RESOURUSE(RESOURCE,PROCESS) 28 *PRODUCTION(PROCESS)) =l= RESORAVAIL(RESOURCE); 29 MODEL RESALLOC /ALL/; 30 SOLVE RESALLOC USING LP MAXIMIZING PROFIT; **** $71,256 **** 71 The symbol shown has been declared as an equation, but no **** Symbolic equation (..) was found. hint - look for commas in the **** Documentation text for the equations. use quotes around the **** Text or eliminate the commas. **** 256 Error(s) in analyzing solve statement. More detail appears **** Below the solve statement above **** The following LP errors were detected in model RESALLOC: **** 71 notthere is an undefined equation |