Uncontrolled Set Error Message

I am stuck on this one error message and cannot figure out what I am doing wrong.

Thanks!

GAMS 24.4.6 r52609 Released Jun 26, 2015 WEX-WEI x86 64bit/MS Windows 11/10/15 19:09:36 Page 1
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n


1 set Language /12/;
2 set Period /1
7/;
3 set Shift /1*7/;
4
5
6 parameter rate(Period) /1=20,2=20,3=20,4=20,5=20,6=24,7=24/;
7 table req(Language,Period)
8 1 2 3 4 5 6 7
9 1 6 12 10 13 11 5 2
10 2 2 3 3 4 3 2 1
11
12 table W(Shift,Period)
13 1 2 3 4 5 6 7
14 1 1 0 1 0 0 0 0
15 2 0 1 0 1 0 0 0
16 3 0 0 1 0 1 0 0
17 4 0 0 0 1 0 1 0
18 5 0 0 0 0 1 0 1
19 6 0 0 0 0 1 1 0
20 7 0 0 0 0 0 1 1
21
22 integer variable X(Shift, Language), z;
23 free variable cost, epay;
24
25 equations defobj, apay(Shift), nospanish5, nospanish6, nospanish7, operators, object;
26
27 nospanish5…X(‘5’,‘2’) =e= 0;
28 nospanish6…X(‘6’,‘2’) =e= 0;
29 nospanish7…X(‘7’,‘2’) =e= 0;
30 apay(Shift)… epay=e= sum(Period, W(Shift,Period)rate(Period));
31 defobj… cost =e= sum((Language,Shift), epay
X(Shift, Language));
32 operators… sum((Shift, Language, Period), W(Shift,Period)*X(Shift, Language)) =g= req(Language, Period);
**** $149 $149
33
34
35 model calls /all/;
36 solve calls using lp minimizing cost;
**** $257

**** LIST OF STRAY NAMES - CHECK DECLARATIONS FOR SPURIOUS COMMAS
**** STRAY NAME z OF TYPE VAR
GAMS 24.4.6 r52609 Released Jun 26, 2015 WEX-WEI x86 64bit/MS Windows 11/10/15 19:09:36 Page 2
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Error Messages


149 Uncontrolled set entered as constant
257 Solve statement not checked because of previous errors

**** 3 ERROR(S) 0 WARNING(S)


COMPILATION TIME = 0.000 SECONDS 3 MB 24.4.6 r52609 WEX-WEI


USER: GAMS Development Corporation, Washington, DC G871201/0000CA-ANY
Free Demo, 202-342-0180, sales@gams.com, www.gams.com DC0000


**** FILE SUMMARY

Input C:\Users\crispy1103\Downloads\GAMS Project.gms
Output C:\Users\crispy1103\Documents\gamsdir\projdir\GAMS Project.lst

**** USER ERROR(S) ENCOUNTERED


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hi Christopher



In your equation, you sum over Shift, Language and Period on the LHS. On the right hand side you have req(Language, Period), but how should Gams know which req to take (for which pair of Language and Period)? You should have something like



…. =g= sum((language, period), req(language, period)); to make sense.



Cheers

Renger





From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Christopher Lee
Sent: Mittwoch, 11. November 2015 01:11
To: gamsworld
Subject: Uncontrolled Set Error Message



I am stuck on this one error message and cannot figure out what I am doing wrong.



Thanks!



GAMS 24.4.6 r52609 Released Jun 26, 2015 WEX-WEI x86 64bit/MS Windows 11/10/15 19:09:36 Page 1
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
C o m p i l a t i o n




1 set Language /12/;
2 set Period /1
7/;
3 set Shift /1*7/;
4
5
6 parameter rate(Period) /1=20,2=20,3=20,4=20,5=20,6=24,7=24/;
7 table req(Language,Period)
8 1 2 3 4 5 6 7
9 1 6 12 10 13 11 5 2
10 2 2 3 3 4 3 2 1
11
12 table W(Shift,Period)
13 1 2 3 4 5 6 7
14 1 1 0 1 0 0 0 0
15 2 0 1 0 1 0 0 0
16 3 0 0 1 0 1 0 0
17 4 0 0 0 1 0 1 0
18 5 0 0 0 0 1 0 1
19 6 0 0 0 0 1 1 0
20 7 0 0 0 0 0 1 1
21
22 integer variable X(Shift, Language), z;
23 free variable cost, epay;
24
25 equations defobj, apay(Shift), nospanish5, nospanish6, nospanish7, operators, object;
26
27 nospanish5…X(‘5’,‘2’) =e= 0;
28 nospanish6…X(‘6’,‘2’) =e= 0;
29 nospanish7…X(‘7’,‘2’) =e= 0;
30 apay(Shift)… epay=e= sum(Period, W(Shift,Period)rate(Period));
31 defobj… cost =e= sum((Language,Shift), epay
X(Shift, Language));
32 operators… sum((Shift, Language, Period), W(Shift,Period)*X(Shift, Language)) =g= req(Language, Period);
**** $149 $149
33
34
35 model calls /all/;
36 solve calls using lp minimizing cost;
**** $257



**** LIST OF STRAY NAMES - CHECK DECLARATIONS FOR SPURIOUS COMMAS
**** STRAY NAME z OF TYPE VAR

GAMS 24.4.6 r52609 Released Jun 26, 2015 WEX-WEI x86 64bit/MS Windows 11/10/15 19:09:36 Page 2
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
Error Messages




149 Uncontrolled set entered as constant
257 Solve statement not checked because of previous errors



**** 3 ERROR(S) 0 WARNING(S)




COMPILATION TIME = 0.000 SECONDS 3 MB 24.4.6 r52609 WEX-WEI




USER: GAMS Development Corporation, Washington, DC G871201/0000CA-ANY
Free Demo, 202-342-0180, sales@gams.com, www.gams.com DC0000




**** FILE SUMMARY



Input C:\Users\crispy1103\Downloads\GAMS Project.gms
Output C:\Users\crispy1103\Documents\gamsdir\projdir\GAMS Project.lst



**** USER ERROR(S) ENCOUNTERED


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.