Sample Project 2
Sample Project 2
Team members:
Hozaifa Dekis
Karan Hirpara
Livia Menezes
Mohamad Sadek
Vivek Mendapara
TABLE OF CONTENTS
Abstract ......................................................................................................................................................... 2
1. Introduction ............................................................................................................................................... 3
1.1 Problem Definition & Assumptions.................................................................................................... 3
2. Literature Review...................................................................................................................................... 5
3. Modeling ................................................................................................................................................... 6
3.1 Objective Function .............................................................................................................................. 7
3.2 Constraints .......................................................................................................................................... 8
3.2.1 Schedule Constraints ............................................................................................................ 7
3.2.2 Sequence Constraints ........................................................................................................... 7
3.3 Decision Variables & Notation ........................................................................................................... 8
3.4 Objective Function Formulation ......................................................................................................... 8
3.5 Constraint Formulation ....................................................................................................................... 9
4. Solution Approach .................................................................................................................................. 10
4.1 Interpreting CPLEX Output .............................................................................................................. 10
5. Computational Results And Analysis ..................................................................................................... 10
5.1 Analyzing Different Options............................................................................................................. 10
5.2 First Feasible Solution Case.............................................................................................................. 11
5.3 Second Feasible Solution Case ......................................................................................................... 14
6. Conclusion .............................................................................................................................................. 16
Bibliography ............................................................................................................................................... 17
Appendix ..................................................................................................................................................... 18
LIST OF TABLES
1. Table 1: 2018 Bundesliga Team Listing ............................................................................................ 12
2. Table 2: First Proposed Solution Schedule ....................................................................................... 13
3. Table 3: Second Proposed Solution Schedule ................................................................................... 15
1|Page
Abstract
Germany’s professional soccer league Bundesliga league is an annual sport event tuned in and
enjoyed by millions across the globe. Besides, this national league is known particularly for having
the highest average stadium attendance worldwide. Similarly, to other sports event, developing its
matches scheduling considering the sequence and order of the matches between the teams is an
essential component for both teams of each match, their sponsors and fans. This project aims to
reach a feasible and superior master matches schedule using Operational Research analytical
techniques and development modeling tools. The mathematical models will be developed by using
2|Page
1. INTRODUCTION
Football, also known as soccer, is a sport that spreads union among nations beyond boundaries,
especially when it comes to international football leagues of the world. The teams involved in
national leagues or international championships spend a high amount of fortune with football
starts, as well as the clubs bringing all the best skills into one team builds the perfect recipe for the
Setting the entertainment and sports’ emotional aspect aside, the whole sports business
demands a management need for a tool to schedule and organize these leagues and, thus, a
scientific technique to build a reliable management structure, since football has stopped being a
mere entertainment source to become a business, which involves profit for sponsors and partners
For such management, there must be an optimal schedule for each regular season of the league,
considering the game calendar that must satisfy the fairness of it to the participating teams, that
also must be economically beneficial for every involved part, as both teams and fans. Such
scheduling would be nearly impossible if done by hand, which casts light for the need of an
The scheduling of a professional German soccer league using operation research techniques
will be performed on Bundesliga championship, which is the most tuned in sport event in the world
of soccer. There are eighteen different teams participating of this yearly basis league, and they play
against each other along the year. The season starts in August and it runs until May. Each team
3|Page
play 34 matches which includes home and away matches against the other seventeen teams. Thus,
Along the league, there’s a point system that is based on the results of the previous matches,
and it determines the ranking of the current participating teams. If a match results in a win for a
given team, this team earns 3 points as an outcome of it. If it’s a draw, the outcome will be 1 point,
This league is structured such a way that the final results will be determined according to the
obtained points of each teams with no Quarters, Semi or Final matches. Each team will face one
Home match and one Away match with the remaining 17 teams, which means each team will play
34 matches, 17 matches should be held on its own ground and the remaining 17 matches should
be held on the other team’s ground, and the one with the higher amount of points will be named
the champions of the year. The tie-breaker criterion if there are two teams with the same amount
Finally, as operations research (OR) involvement in scheduling sports events has grown
significantly due its increase of popularity of such events. Given that the German Bundesliga
League’s structure and constraints offers the perfect opportunity for the application of OR, the
project will focus on creating a master matches schedule for the German Bundesliga League by
solving a set of objective function and constraints using CPLEX software. The project will take
into consideration some of the issues encountered by previous years’ schedules, for instance, by
trying to decrease the travelling time of one team as compared to its opponents for a set of
consecutive games during previous seasons. Additionally, some constraints were added to the
model the scheduling process such as the concentration of the matches between two teams from
4|Page
certain regions they belong, among other constraints that should be explained along the project
report.
2. LITERATURE REVIEW
As the sport business is getting significant boom every year, effective scheduling of sports events
is happening on regular basis all over the world, for example the scheduling of the football and
basketball leagues of the United States of America is happening on a regular basis every season.
This scheduling is either done by the team management or by a specialized third party with the
objective of designing an efficient season schedules, currently there are some software’s and
An example of that application as mentioned by the authors of “Reducing travel costs and player
fatigue in the national basketball association” a total savings of $757,000 or 20% of costs over the
NBA’s current schedule has been achieved by developing a new model that optimize the travelling
There are other reports pertaining scheduling of sports events published in 1997 with titles
“Scheduling a major college basketball conference” and “Scheduling a major college basketball
The authors of the reports used a finite-domain constraint programming technique to complete the
scheduling (Henz).
In the past few years, the existence of sporting scheduling literature related academic publications
had significantly increased. The new articles have been published in this field highlighting some
new aspects of un famous leagues that can be a potential of future research topic.[4, 5, 6]
5|Page
Interests in the field of sports scheduling using Operation Research tools peaked when an article
titled “Travelling Tournament Problem” was published. The developed algorithms focused on the
minimizing the distances teams in the league should travel. Although they have not developed the
algorithm by considering the real case setup, the authors have developed range of methods and
algorithms. In the article “Solving the travelling tournament problem: a combined integer
constraint is used as a method of finding the optimal solution for leagues of up to 8 teams (Easton).
In the paper “Heuristics for the mirrored traveling tournament problem”, heuristics are developed
for the mirrored type of the travelling tournament problem for tournaments that has same order of
The authors for “A simulated annealing approach to the traveling tournament problem” proposed
(Anagnostopoulos). Whereas in a taboo search, application is utilized for the same purpose.
Another interesting publication is related to the matches’ concentration in specified location with
title “Scheduling the Chilean soccer league by integer programming” in 2012 (Cardemil) (Dur´an).
3. MODELING
The objective function’s goal is to minimize the occurrences of a Northern team travelling to a
Southern team’s field, or vice versa, during the rounds 11 to 17. The objective function is
minimizing the variable 𝑋𝑋𝑖𝑖𝑖𝑖𝑖𝑖 while the model also decides on the values of both 𝑌𝑌𝑖𝑖𝑖𝑖 & 𝑍𝑍𝑖𝑖𝑖𝑖 , as will
be shown in the next sections. All these three variables are binary values, so the final solution will
6|Page
3.2 Constraints
The Bundesliga, has its own set of governing rules, but many of the league’s and regulations are
set by UEFA (Union of European Football Associations) and overseen by FIFA (Fédération
Internationale de Football Association) as well. The following constraints will mimic such
o Each team has to play the match at its home or at the opponent’s home ground.
o Each team must play at least 8 of the 17 rounds at home while playing the remaining games
away. Or, the team must play a maximum of 9 matches of the 17 rounds at home and the
rest away.
o A team cannot play more than a set of two consecutive games at Home.
o A team from the North group cannot play 2 consecutive Away games against the South
group, only one game can be played at South and the other Away game has to be played
7|Page
3.3 Decision Variables & Notation
o North group teams are ranked from 1 to 9,and South group teams are ranked from 10 to 18
1; 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 "𝑖𝑖" 𝑖𝑖𝑖𝑖 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑡𝑡𝑡𝑡𝑡𝑡 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 𝑎𝑎𝑎𝑎 ℎ𝑜𝑜𝑜𝑜𝑜𝑜 (𝑘𝑘, 𝑘𝑘 + 1)
𝑦𝑦(𝑖𝑖𝑖𝑖) = �
0; 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒
The objective function is minimizing the variable 𝑋𝑋𝑖𝑖𝑖𝑖𝑖𝑖 , simply put, the number of matches
between team i against j from rounds 11 to 17, where i belongs to the northern group set (teams
𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚: � � � 𝑥𝑥(𝑖𝑖𝑖𝑖𝑖𝑖)
𝑖𝑖∈𝑁𝑁 𝑗𝑗∈𝑆𝑆 11≤𝑘𝑘≤17
8|Page
3.5 Constraint Formulation
o Each team is going to play against other 17 teams only once over the 17 rounds duration:
o Each team cannot play less than 8 games at home and each team cannot play more than 9
games at home:
o Each team plays at most one sequence of two consecutive games at home:
o Each team plays at most one sequence of two consecutive games away (Dur´an):
o When a North team is going to play 2 consecutive away rounds at least one of them should
9|Page
o When a South team is going to play 2 consecutive away rounds at least one of them should
An integer linear programming was constructed to obtain the practical and logical Bundesliga
league schedules and select the most optimal solution. After formulating a mathematical model,
In the formulated model, the set of decision variables will be equal to the binary value “1” when a
team “i” plays against team “j” in round “k” at home ground. The more complex scenarios are
the given team to reveal the number of rounds to be played on home-ground or away. Each
individual team possesses each sequence, which consists of 17 elements (H, A, A, H, ...., H, A)
which is depicted by blue color for home (H) and the black color for away (A) games.
In order to come up with a feasible schedule within the constraints listed above, an integer
programming (IP) model must be constructed and solved. To solve this IP model IBM’s CPLEX
is used. Multiple CPLEX runs were performed in order to acquire a feasible solution, which
10 | P a g e
resulted in two most feasible solutions. These two solutions were analyzed to meet the feasibility,
One thing to recall before proceeding is that the model is considering the last 17 matches and the
assumption is being made that the first 17 matches will be the same sequence as the last but with
home and opposition teams reversed. In other words, a team playing at home in match week 17,
The first solution (Figure 1) involved minimization of concentration of matches between two
groups i.e. North and South groups towards the final rounds was excluded in scope of this proposed
solution. The time duration for simulation run on CPLEX was 4 operating hours approximately.
The schedules of North and South groups with their respective serial numbers are exhibited in
below table.
11 | P a g e
Team Team
Team Name Team Name
Set No. Set No.
Eintracht
1 Hertha Berlin 10
Frankfurt
3 Hannover 96 12 Nurnburg
4 Wolfsburg 13 Hoffenhiem
South
North
6 Schalke 04 15 RB Leipzig
Borussia
7 16 FC Augsburg
Monchengladbach
Bayern
8 Fortuna Dusseldorf 17
Munich
12 | P a g e
Rounds
Team 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 9 15 2 12 11 5 6 8 4 14 10 17 18 3 13 16 7
2 12 3 1 6 8 15 9 16 18 10 17 14 5 4 11 7 13
3 4 2 16 5 12 10 7 18 13 15 8 11 6 1 14 9 17
4 3 18 13 7 5 11 10 17 1 8 9 15 16 2 12 14 6
5 6 17 9 3 4 1 12 14 8 13 18 7 2 15 16 11 10
6 5 11 16 2 13 17 1 10 15 9 16 8 3 7 18 12 4
7 10 13 18 4 16 8 3 12 9 11 15 5 14 6 17 2 1
8 18 16 10 11 2 7 17 1 5 4 3 6 9 12 15 13 14
9 1 14 5 13 17 18 2 15 7 6 4 16 8 11 10 3 12
10 7 12 8 14 15 3 4 6 16 2 1 13 11 18 9 17 5
11 17 6 15 8 1 4 16 13 12 7 14 3 10 9 2 5 18
12 2 10 17 1 3 14 5 7 11 16 13 18 15 8 4 12 9
13 15 7 4 9 6 16 18 11 3 5 12 10 17 14 1 8 2
14 16 9 6 10 18 12 15 5 17 1 11 2 7 13 3 4 8
15 13 1 11 17 10 2 14 9 6 3 7 4 12 5 8 18 16
16 14 8 3 18 7 13 11 2 10 12 6 9 4 17 5 1 15
17 11 5 12 15 9 6 8 4 14 18 2 1 13 16 7 10 3
18 8 4 7 16 14 9 13 3 2 17 5 12 1 10 6 15 11
Home Away
Table 2. First Proposed Solution Schedule
From figure 1, it was seen that the schedule consisted of each team playing with its opponent team
in every round. Furthermore, it is noted that the teams are playing at most two-consecutive home-
In addition, schedule is arranged in such a way that in each, all teams are allowed to play only
once. The other attribute of the schedule is that none of the teams are playing less than 8 and more
than 9 games in their respective home grounds over the entire league.
In this schedule, another constraint that was imposed is when a team played two consecutive
The figure only exhibits 17/34 rounds where as other 17 rounds will have exactly the same
sequence per team, but with inversed values for home-ground and home-away.
13 | P a g e
The first proposed solution is in fact feasible and abides all the rules and regulation of Bundesliga
league.
geographic locations is minimized towards end of the league rounds in second feasible solution.
The certain decision variables were inclined towards the end of the football league. At the end of
the rounds, the goal was to minimize the travel between locations to avoid the fatigue and
The simulation run on CPLEX for resulting feasible solution exhibited a run time of 23 hours
approximately. From figure 2, it is noted that the teams are playing at most two-consecutive home-
ground or home-away games in all rounds. Additionally, in first part of the league, the games from
round 11 to round 17 are played mostly within each group to avoid excess tiring and fatigue of the
players of the teams in league by eliminating the hectic travel from one location to another.
For example, let’s consider team number 14 which if from south region, the team will play against
team 10 in round 11 which is from North region group. But for rest of the rounds, team 11 will
play against team number 14, 16, 17, 15, 12 and 13 respectively which are from the same region
group for rounds 12th , 13th, 14th ,15th, 16th, 17th respectively.
14 | P a g e
Rounds
Team 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 16 13 18 17 12 10 14 15 11 9 7 6 2 3 8 5 4
2 15 14 12 16 11 18 17 7 10 13 8 9 1 5 4 6 3
3 18 4 16 11 15 12 10 9 17 14 6 13 8 1 5 7 2
4 12 3 13 14 17 6 18 11 8 15 5 7 16 9 2 10 1
5 17 12 14 13 10 15 16 18 7 11 4 8 9 2 3 1 6
6 14 10 17 18 13 11 15 8 16 12 3 1 4 7 9 2 5
7 11 16 10 15 18 14 9 2 5 17 1 4 12 6 13 3 8
8 10 17 15 12 14 13 11 6 4 18 2 5 3 16 1 9 7
9 13 15 11 10 16 17 7 3 14 1 12 2 5 4 6 8 18
10 8 6 7 9 5 1 3 17 2 16 11 18 15 13 12 4 14
11 7 18 9 3 2 16 8 4 1 5 10 14 6 17 15 12 13
12 4 5 2 8 1 3 13 16 18 6 9 17 7 14 10 11 15
13 9 1 4 5 6 8 12 14 15 2 18 3 17 10 7 16 11
14 6 2 5 4 8 7 1 13 9 3 16 11 18 12 17 15 10
15 2 9 8 7 3 5 6 1 13 4 17 16 10 18 11 14 12
16 1 7 3 2 9 4 5 12 6 10 14 15 11 8 18 13 17
17 5 8 6 1 4 9 2 10 3 7 15 12 13 11 14 18 16
18 3 11 1 6 7 2 4 5 12 8 13 10 14 15 16 17 9
Rounds
Team 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
1 16 13 18 17 12 10 14 15 11 9 7 6 2 3 8 5 4
2 15 14 12 16 11 18 17 7 10 13 8 9 1 5 4 6 3
3 18 4 16 11 15 12 10 9 17 14 6 13 8 1 5 7 2
4 12 3 13 14 17 6 18 11 8 15 5 7 16 9 2 10 1
5 17 12 14 13 10 15 16 18 7 11 4 8 9 2 3 1 6
6 14 10 17 18 13 11 15 8 16 12 3 1 4 7 9 2 5
7 11 16 10 15 18 14 9 2 5 17 1 4 12 6 13 3 8
8 10 17 15 12 14 13 11 6 4 18 2 5 3 16 1 9 7
9 13 15 11 10 16 17 7 3 14 1 12 2 5 4 6 8 18
10 8 6 7 9 5 1 3 17 2 16 11 18 15 13 12 4 14
11 7 18 9 3 2 16 8 4 1 5 10 14 6 17 15 12 13
12 4 5 2 8 1 3 13 16 18 6 9 17 7 14 10 11 15
13 9 1 4 5 6 8 12 14 15 2 18 3 17 10 7 16 11
14 6 2 5 4 8 7 1 13 9 3 16 11 18 12 17 15 10
15 2 9 8 7 3 5 6 1 13 4 17 16 10 18 11 14 12
16 1 7 3 2 9 4 5 12 6 10 14 15 11 8 18 13 17
17 5 8 6 1 4 9 2 10 3 7 15 12 13 11 14 18 16
18 3 11 1 6 7 2 4 5 12 8 13 10 14 15 16 17 9
Home Away
Table 3. Second Proposed Solution Schedule
15 | P a g e
6 CONCLUSIONS
With the application of Operation Research techniques to the Bundesliga scheduling problem
was given a great opportunity to demonstrate this subject’s utility by scheduling such a complex
sport event while increasing the fairness of the league, making it more attractive to football fans
and decreasing the fatigue to which the players are subject to.
Optimal results were gotten from this league’s scheduling, although the solution cases cast
some problems that need to be considered in further work related to this subject. For example, the
fact of this scheduling not being randomly made. There are certain criteria that should be respected
in order to proper schedule, like the fact of Bundesliga being based on geographic location of the
teams and therefore their scheduled being built according to the implementation of the proposed
algorithm is also based on geographic locations. Another important factor is the fatigue inflicted
to the players due to the travelling time on away matches. Hence, it was considered in this report
the importance of minimizing the travelling time of teams between South and North during the
• Sponsors’ preferences must be also considered according to their schedule and TV rights
• It is necessary to develop a more efficient coding and algorithm in order to get the fastest
• To increase the fairness of the scheduling process, no team should be scheduled with
16 | P a g e
Bibliography
[1] G. Nemhauser and M. Trick. Scheduling a major college basketball conference. Operations
Research, 46(1):1–8, 1998.
[2] D. Costa. An evolutionary tabu-search algorithm and the NHL scheduling problem. INFOR,
33:161–178, 1995.
[3] J. Bean and J. Birge. Reducing traveling costs and player fatigue in the National Basketball
Association. Data Mining and Knowledge Discovery, 10:98–102, 1980.
[4] M. Henz. Scheduling a major college basketball conference-revisited. Operations Research,
49:163–168, 2001.
[5] uefa.com. "President - About UEFA - Inside UEFA – UEFA.com". UEFA.com. Retrieved 7
July 2018.
[6] J. Schreuder. Combinatorial aspects of construction of competition Dutch professional football
leagues. Discrete Applied Mathematics, 35:301–312, 1992.
[7] K. Easton, G. Nemhauser, and M. Trick. Solving the travelling tournament problem: a
combined integer programming and constraint programming approach. In E. Burke and P. De
Causmaecker, editors, PATAT 2002, Lecture Notes in Computer Science, volume 2740, pages
100–109. Springer, 2003
[8] F. Della Croce and D. Oliveri. Scheduling the Italian football league: an ILP-based approach.
Computers and Operations Research, 33(7):1963–1974, 2006.
[9] C.C. Ribeiro and S. Urrutia. Heuristics for the mirrored traveling tournament problem. To
appear in European Journal of Operational Research, 2006.
[10] A. Cardemil and G. Dur ́an. Un algoritmo tab ́u search para el traveling tournament problem.
Revista Ingenier ́ıa de Sistemas, 18(1):95–115, 2004.
[11] Guillermo Dur´an, Mario Guajardo, Jaime Miranda, Denis Saur´e, Sebasti´an Souyris,
Andr´es Weintraub. Scheduling the Chilean soccer league by integer programming. Vol. 00, No.
0, Xxxxx 0000, pp. 000–000 issn 0092-2102 j eissn 1526-551X j 00 j 0000 j 0001.
[12] Robert A. Russell∗, Timothy L. Urban. A constraint programming approach to the multiple-
venue sport-scheduling problem. Computers & Operations Research 33 (2006) 1895 – 1906.
[13] Jae Cho, Kenneth Poon, Vaughn Ridings. Optimizing the premier league schedule. 21-393
Operations Research II, 17 December 2013.
[14] IBM ILOG CPLEX Optimization Studio Getting Started with CPLEX , Version 12
Release http://cedric.cnam.fr/~lamberta/MPRO/ECMA/doc/Interface.pdf , 2011
17 | P a g e
APENDIX
CPLEX Code
Case 1:
/*********************************************
* OPL 12.8.0.0 Model
* Author: OR Team
* Creation Date: Nov 15, 2018 at 7:43:27 PM
*********************************************/
int k = ...;
int e = ...;
int w = ...;
//**** Range of sets ****//
range K = 1..k;
range E = 1..e;
range W = e+1..w;
range I = 1..w;
//**** Decision Variables ****//
dvar boolean x[I][I][K];
dvar boolean y[I][K];
dvar boolean z[I][K];
//**** Constrains ****//
subject to{
forall (j in I, i in I : i!=j )
constr1: sum (k in K) x[i][j][k] + sum (k in K) x[j][i][k] == 1;
forall (i in I, k in K )
constr2: sum (j in I) x[i][j][k] + sum (j in I) x[j][i][k] == 1;
forall (i in I)
constr3: sum (j in I, k in K) x[i][j][k]<= 9;
forall (i in I)
constr33: sum (j in I, k in K) x[i][j][k]>= 8;
forall (i in I)
constr4: sum (k in K : k < 17) y[i][k]<= 1 ;
forall (i in I, k in K: k < 17)
constr44: sum (j in I) x[i][j][k] + sum (j in I) x[i][j][k+1] <= 1+y[i][k];
forall (i in I)
constr5: sum (k in K : k < 17) z[i][k]<=1 ;
forall (i in I, k in K : k < 17)
constr55: sum (j in I) x[j][i][k] + sum (j in I)x[j][i][k+1] <= 1+z[i][k];
forall (i in E, k in K : k < 17)
forall (i in E, k in K : k < 17)
constr6: sum (j in E ) x[i][j][k] + sum (j in E)x[i][j][k+1] >= z[i][k];
forall (i in W, k in K : k < 17)
constr66: sum (j in W) x[i][j][k] + sum (j in W)x[i][j][k+1] >= z[i][k];
}
18 | P a g e
Data File
/*********************************************
* OPL 12.8.0.0 Model
* Author: OR Team
* Creation Date: Nov 15, 2018 at 7:43:27 PM
*********************************************/
k = 17;
e = 9;
w = 18;
Case 2:
/*********************************************
* OPL 12.8.0.0 Model
* Author: OR Team
* Creation Date: Nov 20, 2018 at 11:33:17 PM
*********************************************/
int k = ...;
int e = ...;
int w = ...;
//**** Range of sets ****//
range K = 1..k;
range E = 1..e;
range W = e+1..w;
range I = 1..w;
//**** Decision Variables ****//
dvar boolean x[I][I][K];
dvar boolean y[I][K];
dvar boolean z[I][K];
//**** Objective Function ****//
minimize sum(k in K, i in E, j in W: k > 10 )x[i][j][k];
//**** Constrains ****//
subject to{
forall (j in I, i in I : i!=j )
constr1: sum (k in K) x[i][j][k] + sum (k in K) x[j][i][k] == 1;
forall (i in I, k in K )
constr2: sum (j in I) x[i][j][k] + sum (j in I) x[j][i][k] == 1;
forall (i in I)
constr3: sum (j in I, k in K) x[i][j][k]<= 9;
forall (i in I)
constr33: sum (j in I, k in K) x[i][j][k]>= 8;
forall (i in I)
constr4: sum (k in K : k < 17) y[i][k]<= 1 ;
forall (i in I, k in K: k < 17)
constr44: sum (j in I) x[i][j][k] + sum (j in I) x[i][j][k+1] <= 1+y[i][k];
forall (i in I)
constr5: sum (k in K : k < 17) z[i][k]<=1 ;
forall (i in I, k in K : k < 17)
constr55: sum (j in I) x[j][i][k] + sum (j in I)x[j][i][k+1] <= 1+z[i][k];
forall (i in E, k in K : k < 17)
forall (i in E, k in K : k < 17)
constr6: sum (j in E ) x[i][j][k] + sum (j in E)x[i][j][k+1] >= z[i][k];
forall (i in W, k in K : k < 17)
constr66: sum (j in W) x[i][j][k] + sum (j in W)x[i][j][k+1] >= z[i][k];
}
19 | P a g e
Data File:
/*********************************************
* OPL 12.8.0.0 Model
* Author: OR Team
* Creation Date: Nov 20, 2018 at 11:33:17 PM
*********************************************/
k = 17;
e = 9;
w = 18;
20 | P a g e