|
Summing over sets already indexed - error F Controlled set |
Top Previous Next |
|
Errors occur when one treats the same SET more than once [(i.e., process is summed over twice in the expression
sum((resource,process),SUM(PROCESS,RESOURUSE(RESOURCE,PROCESS)));]
or where an equation is defined over a set and one tries to sum over it. For example in the following case RESOURCE defines the equation and is summed over
resource2(resource,process)=sum(process,RESOURUSE(RESOURCE,PROCESS));
Such errors are marked with message $125. The example shorterr08.gms illustrates such errors under the use of the errmsg=1 option which repositions the error message explanatory text.
26 AVAILABLE(RESOURCE).. SUM((PROCESS,RESOURCE),RESOURUSE(RESOURCE,PROCESS) **** $125 **** 125 Set is under control already 27 *PRODUCTION(PROCESS)) =L= RESORAVAIL(RESOURCE); 28 scalar x; 29 x=sum((resource,process),SUM(PROCESS,RESOURUSE(RESOURCE,PROCESS))); **** $125 **** 125 Set is under control already 30 parameter resource2(resource,process); 31 resource2(resource,process)=sum(process,RESOURUSE(RESOURCE,PROCESS)); **** $125 **** 125 Set is under control already |