A flexible mathematical model for the planning and designing of a sporting fixture by considering the assignment of referees

This paper deals with the problems faced with the designing and planning of a sporting fixture considering correct referee assignments. A non-linear binary program model is proposed to solve the problems, which aims to minimize the sums of the differences that exist between the requirements of each match and the quality of the referee assigned achieving the design of the most adequate referee for each match. The efficiency of the proposed model is proved using some real data obtained from various fixtures for sports such as soccer, volleyball, and basketball. The mathematical model is solved by using CPLEX 12.7.0., which allows the automatic linearization of the problems. The results obtained demonstrate the efficiency of the proposed methodology for tackling problems, as well as its extension to other sporting disciplines, which require a similar type of planning. Similarly, given the robust nature of the proposed model, it is possible to implement other objective functions in accordance with the requirements of each league.


Introduction
One of the greatest problems in sports is the planning and designing of a fixture by considering the correct assignment of referees.The offer of activities comprising a direct competition generates the use of mathematical techniques that permit an efficient sports administration, to reduce costs and mitigate logistical difficulties that include but are not limited to the trips that each team must make per championship, as well as those of the respective referees.Every country has a Professional Association or Federation responsible for the administration, coordination, organization, and direction of their respective championships.For example, in Chile, the organization in charge of planning the soccer fixture is the National Professional Soccer Association (ANFP).In 2015, the ANFP succeeded in raising US$ 58 million for television concepts (Copesa, 2016).Therefore, the optimization of operational and transportation costs, as well as of the assignment of teams and referees, is of interest to the scientific community, and several studies related to this issue already exist (Alarcón et al., 2009, Durán et al, 2005;Durán et al., 2010).For example, the main problem studied pertains toward assigning referees to the first division of Chilean soccer using an integral linear optimization model (Durán et al., 2005).This model aims to impart transparency and objectivity to the assignment by balancing both the number of matches directed by each referee and the distances traveled.Soccer associations are associated with scandals involving the transparency of team and referee assignments (Halliday, 2005); therefore, a proposal containing an efficient algorithm to solve this problem would contribute to the transparency of the sport.For each championship, the ANFP must assemble the corresponding fixture and assign the referees for each match weekly.
In other sports, such as volleyball and basketball, assignment of referees and adequate scheduling of the fixture are essential to ensure transparency and equality, particularly when such sports hold the attention of thousands of fans and sponsors around the world, as is the case with USA major league basketball.However, few studies have explored this field, and there exist many research issues to explore, for which this current work seeks to fill by using a flexible model, which may be changed to accommodate the characteristics of each individual sport.
This paper proposes a flexible mathematical model for designing, planning, and achieving an integrated administration of the scheduling of a sports fixture, which incorporates an adequate assignment of referees.The efficiency of the proposed methodology is verified using real data obtained from the National Championship of the First Division of Chilean Soccer, the World Volleyball League, and the National Chilean Basketball League.The model minimizes the sums of the differences that exist between the requirements of each match and the quality of the assigned referee; in addition, it contributes to the development of attractive and transparent championships with regard to the assignment of teams and professional referees.The proposal meets a current need, i.e., the current crisis involving the lack of trust experienced by sports such as world soccer (Lutz et al., 2015).
Several studies have already proposed mathematical models for scheduling soccer fixtures; however, these methodologies do not take into account the optimal assignment of referees for each match as an integral part of the fixture's design according to the type of championship (Single Tournament or Double Tournament).Furthermore, no flexible mathematical model was found in the literature that allows solving the problem for different fixtures in various types of sports.Examples of flexible mathematical model for other mathematical problems could be explored in (Soto et al., 2013).
The following section presents a review of the current literature related to the problem being discussed.Section 3 presents the non-linear binary scheduling model and the results obtained.Finally, the conclusions drawn from the study are presented in Section 4.

Review of Literature
Sports scheduling is the discipline that studies the design of sporting event championships and focuses on several different areas, according to the requirements and goals unique to each case ( Leung et al., 2004).Ferland and Fleurent (1991) described a computer-assisted model for sports scheduling using a heuristic technique.In addition, a two-phase algorithm for scheduling sporting leagues was proposed by Schaerf (1999).In the first phase, a "location" pattern (home or away) was generated, and in the second, the teams were assigned to each pattern using a ramification and narrowing scheme.Alarcón et al. (2017), Ribeiro (2012), Goossens andSpieksma (2012), andKendall et al. (2010) considered reviews that are relevant to the applications and achievements of the current research developments related to the scheduling of sporting events.Alarcón et al. (2017) presented a compendium of models and methods proposed for the scheduling of the Chilean Soccer League and the qualifying matches of the World Cup Russia 2018.This work specifically emphasizes the achievement regarding of the solution of practical problems in sporting events using effective operational research techniques.Ribeiro (2012) proposed a general overview of the fundamental problems regarding the scheduling of sporting events and their different formulations, as well as the different methods or optimization techniques used in different sports.Goossens and Spieksma (2012) provided a general introduction concerning competition formats and scheduling methods used in European championships during the 2008-2009 seasons.It should be noted that this study deals exclusively with the scheduling of soccer leagues.Finally, Kendall et al. (2010) undertook a complete review of the literature, giving special attention to the increasing number of publications and their contribution to the optimization of the logistics of sporting events.Duarte et al. (2006) defined the problem of assigning referees (RAP) by mentioning that the number of referees depends on the type of sport (for example, soccer considers four referees: the main referee, two assistant referees, and a fourth referee) and that certain rules and goals must be considered when they are assigned, e.g., each referee must meet a minimum requirement of ability and understanding for the game to which has been assigned.
Several studies related to the assignment of referees of the professional baseball major-league, have been conducted by Evans (1984) and Evans (1988), and more recently by Trick et al. (2012).In Evans (1984) and Evans (1988), the problem was solved using optimization techniques, heuristic rules, and human judgment, with the help of a support system for decisions.The considered constraints were related to the rest time required for each referee; example e.g., if a referee must travel from east to west, the scheduling must include a day of rest between the two matches.Trick et al. (2012) used an approach based on network optimization and an approximate simulation and recognition algorithm for the scheduling of Major League Baseball in USA.
A heuristic algorithm for solving the problem of referee scheduling for cricket matches in England by considering several goals was proposed by Wright (1991).Duarte et al. (2006) proposed an integral model for the problem of scheduling of referees.The proposed solution focuses on a heuristic model that includes three phases.In the first phase, a heuristic procedure is used to find a preliminary solution that may violate several constraints.If the initial solution is infeasible, the second phase uses an algorithm based on an iterated local search to repair the solution.Finally, the third phase improves the quality of the solution using another metaheuristic algorithm.An extension of this work was proposed by Duarte et al. (2007), for which an integral mixed linear scheduling model was used for the third phase instead of the metaheuristic algorithm proposed by Duarte et al. (2006).Duarte and Ribeiro (2008) formulated the problem of assigning referees using a double objective by considering a multi-criteria partition model.An integral model for the scheduling of referees for the Turkish soccer league was proposed by Yavuz et al. (2008).This formulation avoids the frequent assignment of the same referee to matches involving the same team.The problem was solved using constructive heuristics and a local search procedure.Finally, Lamghari and Ferland (2005), Lamghari and Ferland (2007) and Lamghari and Ferland (2010), dealt with the problem of assigning referees in the International Competition of Molson by describing a mathematical formulation that solves the problem using a tabu search algorithm with different strategies for diversification based on several neighborhoods.Atan and Hüseyinoǧlu (2017) showed that the combined decision of assigning referees and the scheduling of matches is extremely difficult to solve.This work proposed an integral mixed linear scheduling model to solve the problem of scheduling matches while simultaneously assigning referees using rules specific to the Turkish league.More specifically, the methodology employs a genetic algorithm to solve the problem due to its computational difficulty.Similar difficult problems by using approximate algorithms were proposed by Bolaños et al. (2015), Paz et al. (2018) and Chávez et al. (2016).The work proposed by Atan and Hüseyinoǧlu (2017) contains a similar study of the current work; the main difference is that our solution approach solves the problem optimality while at the same time is flexible enough.Indeed, the proposed approach could be adapted to the data of any sports league and any type of sport around the world.Durán et al. (2017) proposed an integral mathematical model to schedule the qualifying matches of the South American teams for the FIFA 2018 World Cup.Specifically, the work proposes a scheme that is based on the French calendar.Nurmi et al. (2010) introduced a solution scheme for of a highly constrained scheduling problem.The scheme was obtained from the modeling of various requirements that are associated with the different requirements of sporting leagues.
In Chile, the scheduling of soccer championships using sport-scheduling techniques has been under continuous development since 2005 (Durán et al., 2005).The tournament studied in this project includes 20 teams that are divided into four groups according to a play-off system.Its goal is to assign matches on the final dates to teams from the same group, minimizing the travel time involved with consecutive visiting matches.Similarly, it develops a fixture for the second division of professional soccer (Durán et al., 2010) using "location" patterns (home or away) to minimize the number of times a home or away match is repeated.It should be noted that no previous works had considered the assignment of referees simultaneously with the scheduling of the fixture.Also, few works have considered this problem together but their proposed approaches are based on heuristic or metaheuristic algorithms offering only approximate solutions.

Proposed Mathematical Model
The proposed mathematical model is explained below.Each sub-section appropriately describes each of the components., : Pairs of teams , that must play crosswise., : Pairs of excluding teams , .: Set of teams, which are at "home" in a specific city.

Sets
, : Referee cannot referee team ., : Relation between zones and teams, teams belong to zones .
: Set of large teams.: Set of strong teams , : Pairs of teams that play in "classic" matches Parameters : Quality of referee .
: Level required for directing the match between team and team ., : Distance traveled by a team to the city of team ., : Distance traveled by a referee to work in city .

Decision variables
1 if team plays at home against team in match 0 o t h e r w i s e

Objective function
The objective function of the integrated model minimizes the sums of the differences existing between the requirement of each match and the quality of the assigned referee to provide a referee from the adequate category for each match.The quality of the referee is determined by a grade that is given when the referees in charge are assigned in each championship, whereas the requirement level for each match is given by the yield coefficient of each team in the previous four tournaments.
In mathematical terms, the objective function is as follows: (1)

General constraints
The general constraints refer to the minimal conditions necessary to meet the scheduling demands of a fixture.Specifically, a maximum number of matches per championship are established, which is the number of times that a team plays and the encounters with the locations (either home or away) interchanged.
 Each match will be assigned a pair of teams.
 Each team plays (Nrounds x Ndates) match over the course of a championship  Each team plays once per date  Each team plays more times, once per round.

∀ , ∈
 Each team play once more against the same team on the same date of the second half of the championship but with the locations (either home or away) interchanged.

Constraints involving home matches and visits
These constraints refer to the combination of the home (H) and away (A) matches for a given team.For example, for any four dates, the pattern may be either H-H-A-A or A-H-A-H, the second of which is preferred since an alternating pattern does not appreciably affect a championship, keeping it just and balanced while maintaining economic stability in the clubs.The constraints used in the model in this classification are as follows:  Of the Nfechas dates, each team plays at home at least 1 times.
 For each team, it is impossible to play at home for more than two consecutive dates.
 For each team, it is impossible to play as a visiting team for more than two consecutive dates.
 For each team, it is impossible to play more than three matches at home for five consecutive dates.
 For each adjusted date (1,12 and 14), each team must play at home, either on the date itself or on the one, which follows Constraints related to the teams Proceeding with the given requirements for creating an adequate fixture, the following are those associated with the teams.The constraints used are as follows:  Excluding teams: If team h plays at home against team i, it must play away against team j (and vice-versa).
 Teams must play crosswise: If team plays at home on a given date, team must play away (and vice-versa).
∀ , ∈ 0, … , 1  The classics play on the central dates of the championship since having them play each other at the beginning of the championship is not attractive to the public.In the current case, this places the dates between days 7 and 13.
 Each large team plays a classic match at home.

, , ∈
 Minimum distance between matches versus popular teams.
 Minimum distance between matches versus strong teams.

Constraints of the referees
As occurs with the teams, the constraints of the referees must be adhered to achieve an adequate assignment of referees.The constraints used for assigning the referees are as follows:  Each team needs only one referee.

∀ ∈ * (18)
 Each referee could be assigned only once per date.
 If a referee is assigned to match k, not could be assigned to the match k Nmatches .

∀ ∈ (20)
 If for some reason, a referee it is no able to referee a given match.
 A referee may not remain more than three consecutive dates without being assigned to a match.
 A referee may not be assigned to the same team on two consecutive dates.
Note that constraints ( 23) and ( 25) may be easily transformed into linear equations by means of the linearization proposed by Fortet (1960).This transformation is performed easily using CPLEX for the solution of the model.

Geographical constraints
In countries characterized by an unusual geography wherein the distances between cities are very large (due to the great length and narrowness of the territory), the effects of the distance must be considered when developing an adequate fixture.Similarly, within these constrains, it is necessary to consider the number of matches played in certain cities due to both the police force locally available and the use of the same stadium by two different teams.
 On any given date, no more than four matches may be played in any given city.
 The teams in the central zone may not play two consecutive matches away if the first is in the northern zone and the second is in the southern zone due to the longer travel times and the resulting fatigue for the team members.
 The teams in the northern zone (south) may not play two consecutive matches away in the south (north)

Results and Discussion
The mathematical model was implemented in the C++ programming language and was solved using the commercial solver IBM Cplex12.7.0.In order to demonstrate its flexibility, it was tested using real data from the Chilean National Soccer Championship.Table 1 shows the sizes of the considered instances, as well as their particular characteristics.Chilean soccer falls into the category of a Double Round Robin Tournament Problem (double RRTP), in which the teams play against each other on 15 dates (Opening Championship) and then repeat the process, this time with the locations inverted (Closure Championship).In order to make the championship more attractive, the teams are divided into four categories (large teams, strong teams, popular teams, and teams from Santiago).The large teams do not play against each other on the first and final dates; the teams do not play more than two consecutive matches either away or at home; the number of matches played away is equal to the number of matches played at home; the teams labeled "small" may play at least once at home against the large teams, in addition to other restrictions.
In its most basic form, the RRTP resolves the sport-scheduling problem by comprising teams ( being an even number), that must play against each other 1 times.A total of 1 dates are available for organizing the 1 matches, in which all teams must play one match.Therefore, for every date 1, … , 1 , one must determine which teams will play among themselves and which teams will play at home.If 1 indicates a Single RRTP and if 2 indicates a Double RRTP, the case occurs in which the championship may be either "not mirrored" or "mirrored."In the second option, the same matches are maintained but the teams which are playing either at home or away are inverted.Each meeting requires four referees, the main referee being the one responsible for naming his assistants.In addition, the fourth referee may be the one who has served before as a referee at the location or any available judge.Constraints are placed on the main referees, including a limit on the number of matches they may direct for each team, a prohibition on serving as referee for a given team on two consecutive matches, a limit on the number of consecutive dates without being assigned during the championship, and the requirement that the referees with the best performance be those who judge the matches labeled "classic." Currently, the central referees of each match are designated according to a public drawing, which takes place every week at the headquarters of the National Association of Professional Soccer.The drawing consists of dividing the matches into two groups, one which requires referees with more experience and the other which requires less experience.The names of the referees are then drawn in a raffle and are then assigned according to the order in which they were drawn, corresponding to the preset order of the matches, as in a lottery.This drawing does not take into account aspects such as the number of matches directed, the number directed for a given team, the distances that must be traveled, or the number of consecutive dates the referee either must work or remains unassigned.The proposed model contains a total of 73,747 decision variables (73,505 of which are binary variables) and 47,662 constraints.The result obtained after 693.58 sec of calculation was a perfect assignment, with an objective function value of zero.The obtained results balance the number of matches directed by each referee while avoiding and preventing the physical and mental fatigue which results from alternating days of travel and days of rest.The number of matches directed by each referee, contrasting with the number of matches directed by the referees in the previous season, may be seen in Fig. 1; it may also be seen that the lack of this optimization in the 2014-2015 championship (blue) resulted in serious discrepancies in the number of matches directed by each referee, a problem which was solved by the model used for the 2015-2016 championship (red), without increasing logistical costs for the organizing entity.

World Volleyball League
The World Volleyball League is a male competition, which takes place annually and includes the largest selections in the world.It is the longest competition organized by the International Volleyball Federation, in addition to being the most lucrative.Twenty-eight teams participate in the World Volleyball League, and these are divided into seven groups of four participants each, which for purposes of this instance will be counted as a group.In each group, the participants encounter each other four times, two of which are at home and two are away, the championship being a quadruple Round Robin.However, each group may be taken to be a double Round Robin since it has two consecutive matches on the same weekend (the date is repeated).A further important characteristic that differentiates it from the other instances is the fact that the volleyball matches make use of two referees per match, who in turn direct the same match twice (the repeating date).In this case the objective function ( 1) is recalculated by means of EQ. (31): Likewise, constraints ( 11)-( 15), ( 17), ( 18), ( 25)-( 27), and (30) are eliminated.
In this instance, two referees are required for each match, and the teams play against each other four times among themselves, two of which are at home and two are away.This problem is reduced due to the fact that the two home matches of one team against the same rival take place on the same weekend, and same referees are responsible for both matches.In other words, a quadruple Round Robin occurs, in which the two matches for which teams and play against each other, with team as the home team, make use of the two referees.
The proposed model contains a total of 1,375 decision variables (1,350 of which are binary variables) and 1,839 restrictions.The result obtained after 7.5 s of calculation was optimal (the value of the objective function (31) = 45,208 km).A comparison of the results obtained to the actual results from the 2014 World Volleyball League may be seen in Fig. 2. In Fig 2, one may appreciate a difference of more than 230,000 km in distance traveled by the referees, demonstrating the dependence on the referee's country of origin and his quality.This example demonstrates the robust nature and functionality of the proposed model when two referees are required per match and when more than a double Round Robin is involved.

World basketball league
The National Basketball League (NBL) is the highest professional category for the sport in Chile and is organized by the Basketball Federation of Chile.In this championship, 12 teams playing matches each other at home and away over the course of 22 dates.The difference in this instance is that on the second date, a match is played against a team from the same zone, followed by two matches played away (at Instancia home) and then two matches at home (away).This pattern is repeated successively until the end of the championship.
Two referees are needed for each basketball match; therefore, it may be shown using the same model that it is possible to have two referees while maintaining the same conditions of home/away required by the NBL.In this case, the same objective function as that of the main problem will be used, i.e., minimizing the difference between the requirements of the match and the quality of the referee.
As for the restrictions, equations ( 11)-( 18) and ( 25)-( 30) are eliminated, while restrictions ( 9), (21), and ( 22) are modified according to the specific requirements of the league.The proposed model contains a total of 51,941 decision variables (51,675 of which are binary) and 43,317 restrictions.The results of the instance were obtained after 32.73 s, resulting in an optimal value of 0 for the objective function.
The data regarding the referees' city of origin and quality have been generated randomly in a structured manner.Despite this fact, the most important part of this exercise has demonstrated that the model is flexible regarding changes involving the alternation of location (home vs. away) and the double assignment of referees.This requirement is fully met by the model, as is thus demonstrated.

Concluding Remarks
In the world's main sporting leagues, a non-linear binary scheduling has been used to obtain an adequate calendar scheduling for the matches which are to be held.This model takes into account a number of restrictions imposed by the organizing entity, which vary according to the nature of each championship.Moreover, the organizing entities encounter various types of problems related to the assignment of referees, one of which is the questioning of the lack of neutrality characterizing the process.
This article proposes the use of a flexible mathematical model increasing transparency by scheduling the matches in sporting events, as well as the scheduling of referees, in a way which optimizes resources and avoids questioning regarding whether the level of competence of the referees is in fact in accordance with the importance of the match.It also avoids criticism from fans who claim a preference on the part of the referee for a certain team.The main strength of the model is that it permits the scheduling of various sports (by making small adjustments to the model) in addition to the assignment of referees.Due to its flexibility, the model presented may be applied to other sporting disciplines that require scheduling by means of small changes, which allow its implementation in different contexts.Likewise, given the robust nature of the proposed model, it is possible to implement other objective functions according to the individual requirements of each league.


A referee may not direct more than eight matches per team during a championship.

Fig. 1 .
Fig. 1. Results for the number of matches directed by each referee.Source: The authors

Fig. 2 .
Fig. 2. Comparison of the number of km traveled by referees in group A of the 2014 World Volleyball League (2014 WVL) to the result given by the model (Instance) Source: The authors

Table 1
Considered instances.Source: The authors