|
No variable, parameter, or equation definition - error M |
Top Previous Next |
|
When a variable, parameter, or equation is used which has not been declared one gets error $140. The example shorterr17.gms illustrates such errors under the use of the errmsg=1 option which repositions the error message explanatory text.
20 POSITIVE VARIABLES PRODUCTION(PROCESS) ITEMS PRODUCED BY PROCESS; 21 VARIABLES PROFIT TOTALPROFIT; 22 EQUATIONS OBJT OBJECTIVE FUNCTION ( PROFIT ) 23 ; 24 OBJT.. PROFIT=E= SUM(PROCESS,(PRICE(PROCESS)*yield(process) 25 -PRODCOST(PROCESS))*PRODUCTION(PROCESS)) ; 26 AVAILABLE(RESOURCE).. SUM(PROCESS,RESOURUSE(RESOURCE,PROCESS) **** $140 **** 140 Unknown symbol 27 *PRODUCTION(PROCESS)) =L= RESORAVAIL(RESOURCE); 28 MODEL RESALLOC /ALL/; |