Guest User

Locatie constraints

a guest
Apr 1st, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.49 KB | None | 0 0
  1. /*********************************************
  2. * OPL 12.6.0.0 Model
  3. * Author: Stijn Berkvens
  4. * Creation Date: 1-apr.-2016 at 16:39:56
  5. *********************************************/
  6.  
  7. //############LOCATIONS############
  8.  
  9. //Sambodromo (v=1): Archery (s=1..4) and Marathons (s=47..48) not on the same day
  10. forall(i,j in SVR: i.Sportx in 1..4 && j.Sportx in 47..48,
  11. b,c in Times: b.Day == c.Day)
  12. (x[i,b] + x[j,c]) <= 1;
  13.  
  14. //Olympic Stadium (v=2): Athletics(s=5..46) and Football (s=132,133) not on the same day
  15. forall(i,j in SVR: i.Sportx in 5..46 && j.Sportx in 132..133,
  16. b,c in Times: b.Day == c.Day)
  17. (x[i,b] + x[j,c]) <= 1;
  18.  
  19. //Pontal (v=3): Steeplechases (s=49..51)and Time Trials (s=97,97) not on the same day
  20. forall(i,j in SVR: i.Sportx in 49..51 && j.Sportx in 96..97,
  21. b,c in Times: b.Day == c.Day)
  22. (x[i,b] + x[j,c]) <= 1;
  23.  
  24. //Lagoa Stadium (v=9): Canoe Sprint (s=78..89) and Rowing (s=174..187) not on the same day
  25. forall(i,j in SVR: i.Sportx in 78..89 && j.Sportx in 174..187,
  26. b,c in Times: b.Day == c.Day)
  27. (x[i,b] + x[j,c]) <= 1;
  28.  
  29. //Fort Copacabana (v=12): Road Race (s=94..95), Marathon Swimming (s=247..248) and Triathlon (s=268..269) not on the same day
  30. forall(i,j in SVR: i.Sportx in 94..95 && j.Sportx in 247..248,
  31. b,c in Times: b.Day == c.Day)
  32. (x[i,b] + x[j,c]) <= 1;
  33.  
  34. forall(i,j in SVR: i.Sportx in 94..95 && j.Sportx in 265..269,
  35. b,c in Times: b.Day == c.Day)
  36. (x[i,b] + x[j,c]) <= 1;
  37.  
  38. forall(i,j in SVR: i.Sportx in 247..248 && j.Sportx in 265..269,
  39. b,c in Times: b.Day == c.Day)
  40. (x[i,b] + x[j,c]) <= 1;
  41.  
  42. //Maria Lenk Aquatics Centre (v=14): Diving (s=108..115), Synchronized Swimming (s=249..250) and Water Polo (s=272..273) not on the same day
  43. forall(i,j in SVR: i.Sportx in 108..115 && j.Sportx in 249..250,
  44. b,c in Times: b.Day == c.Day)
  45. (x[i,b] + x[j,c]) <= 1;
  46.  
  47. forall(i,j in SVR: i.Sportx in 108..115 && j.Sportx in 272..273,
  48. b,c in Times: b.Day == c.Day)
  49. (x[i,b] + x[j,c]) <= 1;
  50.  
  51. forall(i,j in SVR: i.Sportx in 249..250 && j.Sportx in 272..273,
  52. b,c in Times: b.Day == c.Day)
  53. (x[i,b] + x[j,c]) <= 1;
  54.  
  55. //Olympic Equestrian Centre (v=15): Equestrian Dressage (s=116..117), Eventing (s = 118..119) and Jumping (s=120..121) not on the same day
  56. forall(i,j in SVR: i.Sportx in 116..117 && j.Sportx in 118..119,
  57. b,c in Times: b.Day == c.Day)
  58. (x[i,b] + x[j,c]) <= 1;
  59.  
  60. forall(i,j in SVR: i.Sportx in 116..117 && j.Sportx in 120..121,
  61. b,c in Times: b.Day == c.Day)
  62. (x[i,b] + x[j,c]) <= 1;
  63.  
  64. forall(i,j in SVR: i.Sportx in 118..119 && j.Sportx in 120..121,
  65. b,c in Times: b.Day == c.Day)
  66. (x[i,b] + x[j,c]) <= 1;
  67.  
  68. //Carioca Arena 3 (v=16): Fencing (s=122..132) and Taekwando (s=255..262)not on the same day
  69. forall(i,j in SVR: i.Sportx in 122..132 && j.Sportx in 255..262,
  70. b,c in Times: b.Day == c.Day)
  71. (x[i,b] + x[j,c]) <= 1;
  72.  
  73. //Rio Olympic Arena (v=24): Gymnastics Artistic (s=136..149), Rhythmic (s=150..151) and Trampoline (s=152..153) not on the same day
  74. forall(i,j in SVR: i.Sportx in 136..149 && j.Sportx in 150..151,
  75. b,c in Times: b.Day == c.Day)
  76. (x[i,b] + x[j,c]) <= 1;
  77.  
  78. forall(i,j in SVR: i.Sportx in 136..149 && j.Sportx in 152..153,
  79. b,c in Times: b.Day == c.Day)
  80. (x[i,b] + x[j,c]) <= 1;
  81.  
  82. forall(i,j in SVR: i.Sportx in 150..151 && j.Sportx in 152..153,
  83. b,c in Times: b.Day == c.Day)
  84. (x[i,b] + x[j,c]) <= 1;
  85.  
  86.  
  87. //Carioca Arena 2 (v=27): Judo (s=158..171), Wrestling Freestyle (s=289..300) and Wrestling G-R (s=301..306) not on the same day
  88. forall(i,j in SVR: i.Sportx in 158..171 && j.Sportx in 289..300,
  89. b,c in Times: b.Day == c.Day)
  90. (x[i,b] + x[j,c]) <= 1;
  91.  
  92. forall(i,j in SVR: i.Sportx in 158..171 && j.Sportx in 301..306,
  93. b,c in Times: b.Day == c.Day)
  94. (x[i,b] + x[j,c]) <= 1;
  95.  
  96. forall(i,j in SVR: i.Sportx in 289..300 && j.Sportx in 301..306,
  97. b,c in Times: b.Day == c.Day)
  98. (x[i,b] + x[j,c]) <= 1;
  99.  
  100. //Youth Arena (v=28): Basketball Women (s=58) and Modern Pentathlon (s=172..173) not on the same day
  101. forall(i,j in SVR: i.Sportx in 58..58 && j.Sportx in 172..173,
  102. b,c in Times: b.Day == c.Day)
  103. (x[i,b] + x[j,c]) <= 1;
  104.  
  105. //Deodoro Stadium (v=29): Modern Pentathlon (172..173) and Rugby (s=188..189) not on the same day
  106. forall(i,j in SVR: i.Sportx in 172..173 && j.Sportx in 188..189,
  107. b,c in Times: b.Day == c.Day)
  108. (x[i,b] + x[j,c]) <= 1;
  109.  
  110. //Olympic Aquatics Stadium (v=32): Swimming (s=215..246) and Water Polo (s=272..273) not on the same day
  111. forall(i,j in SVR: i.Sportx in 172..173 && j.Sportx in 188..189,
  112. b,c in Times: b.Day == c.Day)
  113. (x[i,b] + x[j,c]) <= 1;
Advertisement
Add Comment
Please, Sign In to add comment