Spelling mistakes - error C

Top  Previous  Next

Named sets, parameters, equations etc. may be referenced with a different spelling than in their declaration (i.e., the set CROPS is later referred to as CROP).  GAMS identifies set name misspellings with message $120, set element misspellings with $170 and other misspellings with $140.  The example shorterr05.gms provides a case where the set PROCESS (PROCES), one of its elements (salecontrt) and RESOURCEUSE (RESOURUS) are misspelled.

 

    7  SET PROCEsS   PRODUCTION PROCESSES /makechair,maketable,makelamp/

    8      RESOURCE  TYPES OF RESOURCES   /plantcap,salecontrct/;

    9  PARAMETER PRICE(PROCES)      PRODUCT PRICES BY PROCESS

****                        $120

   10                /makechair 6.5 ,maketable 3, makelamp 0.5/

   11            Yield(process)  yields per unit of the process

   12                /Makechair 2   ,maketable 6 ,makelamp 3/

   13          PRODCOST(PROCESS)     COST BY PROCESS

   14                /Makechair 10  ,Maketable 6, Makelamp 1/

   15          RESORAVAIL(RESOURCE)  RESOURCE AVAILABLITY

   16               /platcap 10 ,salecontrct 3/;

****                       $170

   17  TABLE RESOURUSE(RESOURCE,PROCESS) RESOURCE USAGE

   18                     Makechair   Maketable  Makelamp

   19       plantcap         3          2          1.1

   20       salecontrt       1         -1;

****                 $170

   21  POSITIVE VARIABLES PRODUCTION(PROCESS) ITEMS PRODUCED BY PROCESS;

   22  VARIABLES          PROFIT              TOTALPROFIT;

   23  EQUATIONS          OBJT OBJECTIVE FUNCTION ( PROFIT )

   24                     AVAILABLE(RESOURCE) RESOURCES AVAILABLE;

   25  OBJT.. PROFIT=E=   SUM(PROCESS,(PRICE(PROCESS)*yield(process)

   26                         -PRODCOST(PROCESS))*PRODUCTION(PROCESS)) ;

   27  AVAILABLE(RESOURCE).. SUM(PROCESS,RESOURUS(RESOURCE,PROCESS)

****                                            $140

 

Error Messages

 

120  Unknown identifier entered as set

140  Unknown symbol

170  Domain violation for element