A heuristic method for solving airline crew pairing problems

The airline crew pairing problem is one of the optimization problems which classified as a NP-hard problem. Since the number of feasible pairings in flight schedules can be numerous, the exact methods will not efficient to solve the problem. We propose a heuristic method for solving crew pairing problems. Initially, we generate a feasible solution by maximizing the covered flights. Then, we improve the solution by constructing a procedure to avoid the local optimal solution. We test our method to an airline schedules. The computational results show that our method can give the optimal solution in short period of time.


Introduction
The airline crew pairing problem can be modelled as a set covering problem (SCP): where its columns matrix A = (afp) represent all possible pairings in flight schedules, in which afp = 1 if flight f in pairing r, and afp = 0 otherwise. The element xp of x is a decision variable that has value 1 if pairing p is selected as a solution, and xp= 0 otherwise. The element cp of c is cost associated to pairing p. One pairing consists a sequence of flights starting and ending at a specific airport which called as a crew base. A number of regulations and airline working rules must be complied when a pairing is constructed (see [1]). Generally, the SCP is an NP-hard problem. Many algorithms have been resulted for solving it. The exact algorithms are mostly based on branch-and-bound or branch-and-cut [2,3]. Other researchers have applied column generation to find global optimal [4,5]. The integer solution are found by applying branch-and-bound where column generation is allowed in the search tree. This method is referred to as branch-and-price. In column generation technique, it is not easy to find an initial feasible solution. Solving the linear relaxation of the model in column generation technique is straightforward, but to get the integer solution another algorithm is needed.
Since exact methods require substantial computational effort to solve large-scale SCP, heuristic algorithms are often used to find a good or a near-optimal solution in a short time. The greedy algorithms are the most natural heuristic approach for quickly solving SCP. The simplest greedy approach is the algorithm proposed by Chvatal [6]. The algorithm is fast and easy to code, but it could rarely generate a good solution. Some researchers have tried to improve greedy algorithms by introducing some randomness. Modern heuristics, often classified as Meta-heuristics, introduce randomness in a systematic manner to improve the solution quality. They include genetic algorithms [7,8], Meta RaPS [9], Simulated annealing [10], Neural Network algorithm [11], and ant colony algorithm [12]. Other heuristics are developed based on Lagrangian relaxation [13]. Beasley [3,7] points out that their algorithms based on the Lagrangian relaxation and genetic algorithm were not recommended for SCP with the same column costs, since the cost play an important role in these algorithms [9]. From these literatures, most heuristics that could generate good solutions are difficult to implementation. On the other hand, some simple heuristics often could not find good results.
In this paper, we propose a new heuristic method for solving airline crew pairing problem. We allow the deadhead flights, and we want to minimize the total selected pairing cost and deadhead cost. The method works iteratively based on random search, and it consists two procedures. The first procedure is used to generate a feasible solution and to maximize the covered flights in selected pairings. Then, the solution will be improved by the second procedure. To avoid the local optimal solution, we define same parameters and criteria functions. We test our method to an airline schedules. We found that our method can work effectively and it gives good solutions.
This paper is organized as follows. We discuss the airline crew pairing model in Section 2. Section 3 explains how our method works to find the optimal solution. We present our computational results in Section 4. We give a conclusion in the last section.

Crew pairing problem with deadhead
We consider a crew pairing problem with deadhead. A deadhead is a set of crew who flies as a passenger in a flight. The deadhead is used to the airline for repositioning the crew to work to another flight or to return the crew to the crew base.
Let F be a set of flights and P be a set of possible pairings. For all iF and pP, let cp be the cost of the pairing p and df be the deadhead cost of the flight f. let afp has value one if flight f in pairing p, and zero otherwise. We define decision variables xp which have value one if pairing p is selected as the optimal solution and zero otherwise. We model the crew pairing problem with deadhead as follow: subject to: , The objective function (2) is to minimize total selected pairing cost. The cost consists of the operating pairing cost and the deadheading cost. Constrains (3) ensure that all flights are covered by the selected pairings. In fact, the number of feasible pairings can be numerous, even though we have a few number of flights. This condition makes the crew pairing problem hard to be solve by exact methods. In this paper, we propose a heuristic method for solving the crew pairing problem. This method is constructed to solve the problem effectively and it can give an optimal (near optimal) solution.

The heuristic method for solving crew pairing problem
One of the most representative construction algorithms for SCP is the greedy algorithm proposed by Chvatal [6], which iteratively selects the most effective column until all rows are covered. In our case, a row represents a flight and a column represent a possible pairing. However fast, simple, and easy to implemented, greedy algorithm is often far from optimal solution. We also note that the solution resulted by greedy algorithm may contain redundant columns because the columns selected in a certain iteration to cover uncovered rows, can lead previously-selected column to become redundant, [14]. In our computational experience, when we work with large number of columns, implementation of removing redundant columns procedure is relatively time consuming. Based on greedy algorithm by omitting the removing redundant columns procedure, we construct a heuristic algorithm for solving crew pairing optimization problem. We also modify the greedy score in [6] for each pairing p by , ) ( where tf is the number of deadhead flight f which resulted by pairing p if it will be selected in the next iteration, and Fp is a set of flights covered by pairing p. Our method consists two main procedures. The first procedure construct to obtain feasible solution. Then the feasible solution will be improved by the second procedure. Before two main procedure are invoked, we order rows F increasingly according the number of pairings which cover each flight. Let Pi be a set of pairings which cover flight i. In first procedure, for each uncover flight iF, we list candidate pairing set (CP). Then randomly, we choose one pairing in CP. To decreasing possibility of the solution is local optimal, we use two parameters in Meta-RaPS algorithm, i.e %priority and %restriction [9]. Meta-RaPS is a meta-heuristic developed by DePuy et. al. [15]. The %priority parameter defines the percentage of time the pairings with lowest greedy score will be added in CP. The remaining time (i.e 100 -%priority) defines the percentage of time pairings with larger greedy score according %restriction will be selected in the next iteration. So, we have two types of elements CP, that is atau {jP : f(j)  (1 + %restriction.min f(p), pPi}.
For example, if we set %priority = 30 and %restriction = 40, then the probability of choosing one pairing in first type is 0.3. The remaining 0.7 define the probability one pairing will be selected in second CP. The following algorithm gives complete explanation about procedure for constructing feasible solution.
Constructing feasible solution procedure The second procedure is called as the improvement procedure. The purpose of constructing second procedure is to improve solution quality of the selected pairings resulting from first procedure. First, a number of selected pairings in S, as determined by user, randomly removed. The parameter %removed is used to define how percentage of pairings in S will be deleted. The exactly number of removed pairings in S given by the following formula:

Computational results
We use flight schedules of an airline in Indonesia as the computational study. We list all possible pairings that can be constructed from the flight schedules. The number of flights and the number of possible pairings are shown in Table 1. We obtain that each possible pairing in Table 1 contain 2-6 flights. We implement our algorithm to obtain the optimal solution of the problem in Table 1. We set the parameter of our algorithm by %priority = 40, %removed = 50, %restriction = 50, and max_iter = 12000. For each data, we record the number of selected pairings and the value of objective function in the optimal solution (see Table 2). As the comparison, we also solve the problems by implementing Greedy Algorithm [6], and intlinprog function of Matlab R2015b. According our experiments, we found that, the intlinprog function can't solve the problem 4-10, because of the memory limitation. The data in Table 2 shows that the algorithm with the smallest value of the objective functions does not always give the less number of selected pairings in the optimal solutions, since our crew pairing optimization model is solved to determine the selected pairings with minimum cost. According the smallest value of objective function we conclude that our algorithm can give the good solution and it works efficiently, since the computation time of our algorithm for solving the above problems is not up to 4 minutes.