CREW SCHEDULING CONSIDERING BOTH CREW DUTY TIME DIFFERENCE AND COST ON URBAN RAIL SYSTEM

Urban rail crew scheduling problem is to allocate train services to crews based on a given train timetable while satisfying all the operational and contractual requirements. In this paper, we present a new mathematical programming model with the aim of minimizing both the related costs of crew duty and the variance of duty time spreads. In addition to iincorporating the commonly encountered crew scheduling constraints, it also takes into consideration the constraint of arranging crews having a meal in the specific meal period of one day rather than after a minimum continual service time. The proposed model is solved by an ant colony algorithm which is built based on the construction of ant travel network and the design of ant travel path choosing strategy. The performances of the model and the algorithm are evaluated by conducting case study on Changsha urban rail. The results indicate that the proposed method can obtain a satisfactory crew schedule for urban rails with a relatively small computational time.


INTRODUCTION
Urban rail crew schedule optimization problem (URCSOP) aims to find the lowest cost crew schedule covering all trips of trains specified in a train timetable subject to various constraints such as crew rest and meal time requirements.It is difficult to solve URCSOP with a large number of train trips and complicated operational and contractual requirements.Fischetti et al. [1] have pointed out that the URCSOP is an NP-hard problem.Nevertheless, the URCSOP has still become one of the most important topics in urban rail transport because crew cost is the main variable operation expenses, and a small improvement to the crew schedule essentially leads to accumulated savings producing large annual cost savings for urban rail enterprise.
Both the solving difficulty and the remarkable practical significance of URCSOP have attracted a lot of interest from many researchers.Morgado and Martins [2] attempted to generate multiple alternative crew schedules based on different scheduling criteria for the Portuguese rail.However, URCSOP was more frequently formulated as either set covering problem or set partitioning problem with binary integral decision variables, and each decision variable represents whether or not a duty is chosen as the service for a crew.Both problems were solved by either an exact or a heuristic method, or their combination.For example, Kroon and Fischetti [3] built a set covering model of crew scheduling for the Dutch railway, and solved it using dynamic column generation techniques, Lagrangean relaxation and powerful heuristics respectively.Alfieri et al. [4] also proposed a set covering problem based on an implicit column generation solution approach for scheduling train crews on a rail network.Nishi et al. [5] proposed a column generation with dual inequality for rail crew scheduling, and Jütte et al. [6] adopted a column generation based decomposition algorithm to solve URCSOP which was decomposed into overlapping regions and optimized in parallel in this method.Column-generation-based methods have higher solving efficiency than other exact approaches, and they are widely used to solve the allocation problems, but as stated in study [7], they are not efficient for solving URCSOP whose decision variables are only determined as 0 or 1, rather than any real number.
As enormous train trips should be serviced by crews in URCSOP, the solving efficiencies of exact methods are not satisfactory.They usually suit to handle small to medium size problems.Therefore, some researchers tried to apply other types of approaches to solve the large-scale real-word URCSOP with a large number of train trips and many types of constraints.For instance, Freling et al. [8] tried to use a decision support system to solve rail and airline crew planning problems.Vaidyanathan et al. [9] proposed a network flow-based approach to solve the URCSOP, in which crew duties satisfied the first-in-first-out rule on the network.And Jütte and Thonemann [10] proposed a graph partitioning strategy for the large-scale crew scheduling problems.
In addition, meta-heuristics has nowadays become a popular method because of its good performance in solving the complicated, large-scale real-world problems although they usually only find the near-optimal solutions.Regarding their application in crew scheduling problems, Emden-Weinert et al. [11] used a simulated annealing approach to solve the airline crew scheduling problem, and Dias et al. [12] proposed a genetic algorithm for bus driver scheduling problem.Moreover, Elizondo et al. [13] presented a constructive hybrid method to address the URCSOP, and provided better results with regard to idle time than both the hybrid and greedy methods.Hanafi and Kozan [14] applied a hybrid constructive heuristic with the simulated annealing search algorithm to solve the rail crew scheduling problem.
Ant colony optimization (ACO) algorithm proved by Dorigo [15,16] to have higher efficiency in solving combinatorial optimization problems.Comparing with other heuristic methods, it has some nice features such as parallel computing, high robustness and simplicity of operation.However, very few works in literature applied the ACO algorithm to solve the crew scheduling problems.The aim of this paper is to apply an ACO algorithm to solve the URCSOP considering both crew cost and duty time difference.Compared with the existing studies, our research has the following three main improvements.1) Aim to minimize not only the related costs of crew duties, but also the variance of duty time spreads, which contributes to make crews of different duties have nearly equal service time, and improves the equity of crew service.2) Consider the requirement of crews being arranged to have a meal in the specific meal periods of one day rather than after a minimum continuous service time.Obviously, the former is more in accordance with the crews' healthy eating habits.3) Design an ACO algorithm to solve our proposed model for obtaining a higher solving efficiency based on the construction of ant travel network with the aim of minimizing the number of directed arcs, and the design of a strategy of ant choosing travel path.
The rest of this paper is organized as follows.First, a brief description of URCSOP is presented, and then the costs related to crew duty are analysed in Section 2. Next, URCSOP is modelled as a set partitioning problem minimizing both crew costs and duty time differences in Section 3.After that, a solving algorithm based on the ACO algorithm is given in Section 4. Computational results of the Changsha urban railway on this proposed approach are introduced in Section 5. Finally, the conclusion and recommendations for further studies are provided in Section 6.

PROBLEM DESCRIPTION AND CREW DUTY COST ANALYSIS
The urban rail consists of a set of crew home stations, a set of meal stations, a set of rest stations and a set of transition stations, which are denoted by S h , S m , S r and S t respectively.Each crew has to start and end their duty at a home station, have a meal at a meal station, and have a rest at a rest station.Moreover, each crew is only allowed to switch to another train for continuing their duty at a transition station after they complete the current duty for one train.Generally, a station can simultaneously belong to multiple different types of stations.For example, generally a meal or rest station is also a transition station.As crews are only allowed to start and end their duties or change their service trains at the above four types of stations, we uniformly call them duty-division stations for description purposes in this paper.
The whole trip of each train predetermined by the train timetable must be serviced by either a group of crews or multiple groups of crews.A train trip can be divided into a sequence of trip segments by the duty-division stations, and each trip segment can be serviced by different groups of crews.As illustrated in Figure 1  in which seven types of lines are used to display trips of different trains, the whole trip of the train represented by dotted lines is divided into two trip segments numbered 2 and 3 by the meal station.Each train trip segment has to correspond to a crew duty segment which is the basic composition unit of crew duty and can be viewed as crew minimum continuous service unit.Therefore, crews only start and stop or change their duties at both ends of each duty segment.
Generally, the URCSOP is to specify the service sequence of train trip segments to form a duty for each group of crews with the aim of minimizing the related costs of crew duty while satisfying urban rail operational and contractual requirements.The set of train trip segments is denoted by P. For trip segment p, its corresponding train is denoted by h(p), its starting and ending times are expressed by t s (p), t t (p), respectively, and its starting and ending stations are denoted by s s (p), s t (p), respectively.Define N as the number of crew duties, and for the i-th crew duty, denote P i as its service sequence of train trip segments, and K i as the number of trip segments in sequence P i .The crew schedule is defined as Ω={P i |i=1,2,…,N}.
For guaranteeing crew service safety and high-efficiency, a crew is required to have a rest when their total continuous service time reaches its lower limit, and must finish the rest before reaching its upper limit.For example, a crew signs on at 8:00 AM and the lower and upper limits of their continuous service time are 3 hours and 4 hours, respectively, and then they have to have a rest at the earliest time of 11:00 AM and at the latest time of 12:00 AM.Crew lower and upper limits of continuous service times are denoted by min s x , max s x , respectively.Moreover, if crew duty enters a specified meal period, then crew should be arranged to have a meal in that meal period.For instance, a crew signs on at 8:00 AM and signs off at 3:00 PM, and crew lunch period ranges from 11:30 AM to 1:00 PM, then they must be arranged to have a lunch during this lunch period.Suppose that crew breakfast period is from time tb s to time tb t , lunch period is from time… tl s to time tl t , and dinner period is from time td s to time td t .In addition, crew time lengths for meal and rest are also restricted to be between their minimum and maximum values.as these for having a rest.It should be noticed that crew minimum time lengths for meal and rest cover the necessary time for transiting a new service train after having a rest and having a meal.
As illustrated in Figure 2, there are four crew duties displayed with different colour lines.Regarding the duty shown with blue colour lines, crews sign on at 7:15 AM and sign off at 8:45 AM, and have service four trip segments.The first one is from home station 3 at 7:15 AM to the meal station (home station 2) at 7:30 AM, and then they have a meal there, and after that transit to another train for continuing duty service.When they come back to home station 3 which is also a transition station, they transit to another train again and finally finish their duty at home station 1 at 8:45 AM.It should be noticed that the duty parts from home station 3 to home station 1 cover two trip segments, which are just serviced by the same group of crews.
Generally, crew service work in one day is divided into three shifts, i.e., morning shift, day shift and night shift in the urban rail.The earliest and latest times of morning shift are denoted by Tm e , Tm l , respectively, these of day shift are separately expressed by Td e , Td l , and these of night shift are described with Tn e , Tn l , respectively.A crew duty in the morning shift should sign on after this shift's earliest time Tm e and sign off before its latest time Tm l .This requirement is also adopted in day and night shifts.
A crew schedule should reduce the number of crew duties as far as possible because each duty corresponds to a large number of costs, and the more duties the crew schedule contains, the more costs the enterprise has to undertake.
The costs related to crew duty mainly consist of the following three parts.

1) Duty basic cost
Duty basic cost includes the fixed payment of crews and the expense related to the consumption of some required materials for crew duty organization.It is not affected by the time spread and transition count of duty etc., and thus it is set as a fixed value.Denote c 0 as the basic cost for a crew duty, and then 2) Duty spread time Duty time spread is the time elapsed from the crew sign-on to the crew sign-off in a crew duty.It covers crew service time, rest time, meal time and transition time, in which the latter three parts usually should be compressed for improving the duty efficiency.For the i-th crew duty, its time spread cs i is calculated by where pi k (k=1,2,…,K i ) represents the k-th trip segment in sequence P i .
Then the total duty time spread C s of crew schedule can be given by 3) Transition additional cost Duty transition among trains not only leads to the increase of duty spread time, but also brings more inconvenience to crews.Therefore, an additional cost with regard to transition is defined to measure crew inconvenience brought by duty transition.Denote c a as the additional cost per transition, and then the transition additional costs ca i of the i-th crew duty is given by And the total transition additional cost C a of crew schedule is calculated by where M i is the number of transitions in the i-th crew duty.Note that transitions caused by having a rest and meal should be excluded as they are necessary.

OPTIMIZATION MODEL
The URCSOP is more frequently modelled as either set partitioning problem or set covering problem.Please see for example Kroon and Fischetti [3], Alfieri et al. [4], Freling et al. [8] and Hanafi et al. [14].Their main difference is that each trip segment is covered exactly by only one duty in the former while the latter allows it to be included into more than one duty.In other words, the set covering problem allows crews to take a trip to another station for starting their duties.Considering this case will lead to more duty time spread and reduce crew service efficiency, this paper also models the URCSOP as the set partitioning problem.
Before detailing the model, we first introduce some assumptions as follows.
1) Crews must continue their duties at the stations where they pause their duties because they finish servicing a train trip segment, or have a rest or meal there.That is, they are not allowed to travel to another station for continuing their duties when they pause their duties at a station.
2) All rest (meal) stations have enough supporting facilities to simultaneously satisfy the rest (meal) requirement of crews staying there at the same time.

Optimization objectives
Minimizing crew total duty cost is usually taken as the objective for optimizing crew schedule in most of the existing literature such as Freling et al. [8]  and Hanafi et al. [14].This paper also takes it as one optimization objective, namely, where ρ is the average time value of crews.Furthermore, in order to make crew duties in the same shift to have nearly equal time spread for improving the equity of crew service work, another optimization objective of crew schedule is to minimize the variance D of duty time spreads.That is, In summary, the objective function can be expressed as the weighted summation of crew duty costs and the variances of duty time spreads in the three shifts.That is where α is the weight of duty costs compared to the variance of duty time spreads.

Analysis of constraints
Firstly, each train trip segment should be allocated into exactly one duty for making it serviced by a group of crews, namely, , p P 1 where p i d is a 0-1 binary variable used to indicate whether or not trip segment p belongs to the i-th duty.If it is included in the i-th crew duty, then 1 Each crew duty must start and end at the same or two different home stations, so both the starting station of the first trip segment and the ending station of the last one in a duty should be the home station.That is, ( ) , , , , As crews are not allowed to travel to another station for continuing to service the next trip segment after serving one trip segment, the ending station of a trip segment is just the starting station of its next trip segment in a duty, namely, ( ) , , , , ; , , , Crews have to have a meal at the meal station and have a rest at the rest station once they satisfy the time requirement of meal and rest.Denote i k f as a 0-1 binary variable indicating whether or not crews of the i-th duty have a meal after servicing the k-th trip segment.If yes, then its value is set as 1; otherwise, its value is 0. Similarly, the 0-1 binary variable i k v is defined to express whether or not crews of the i-th duty have a rest after servicing the k-th trip segment.If yes, then 1 Based on these, the constraints related to stations for meal and rest are given by ( ) , | ( , , , ; ); , , , , , ,  ; ); , , , Obviously, if a crew has a meal and rest at the same station, then it should satisfy ( Moreover, each duty no matter which shift it belongs to should be located in the time range of its corresponding shift.For example, a duty in the morning shift has to be located in the time period of the morning shift.Thus, its starting and ending times should satisfy And for the duty in the day shift and night shift, this constraint also has to be satisfied.That is, In addition, most studies related to rail crew scheduling such as Alfieri [4] and Hanafi [14] arranged crews to have a meal after the completion of a few continuous service hours relative to the start of their duties.However, considering that crews usually have the same regular time periods for meals, for instance, the breakfast time is generally from 7:30 AM to 8:30 AM, our research requires that crew meal times must be arranged in the corresponding meal period.Thus, crew meal starting time meets ( ) , | ( , , , ; ); , , , , , , Regarding the crew rest, its starting time must be after the minimum of continuous duty service time and before its maximum value.That is , , ,  ; ); , , , Finally, the interval from the end time of one trip segment to the start time of its next trip segment in a duty should be sufficient for crews to finish the corresponding task during it, such as having meal, having rest or transition.That is , , , ; , , , where ω is the minimum transition time between two neighbouring trip segments in a duty.Based on the above analysis, the optimization model of urban rail crew scheduling consists of the objective function 8 and all constraints of 9 through 14 and 16 through 23.Due to the great number of decision variables and constraints of the proposed model, it is difficult to solve this model using exact methods, especially for large-sized urban rail network.Hence, we propose a heuristic algorithm based on the ACO algorithm for solving the problem in the next section.

ACO-BASED OPTIMIZATION ALGORITHM
The ACO algorithm proposed by Dorigo inspired by ant colony behaviours is a distributed intelligent simulation algorithm.Its main idea is to simulate the mutual cooperation of ants relying on the pheromone of path which makes ants originally distributed on multiple paths gradually gather on the shortest path with a higher density of pheromone.As to its advantages such as parallel computing, high robustness and simple operation in solving combinatorial optimization problems, this section applies it to optimize the sequence of train trip segments which corresponds to ant travel path, and then a crew schedule can be determined based on the sequence of train trip segments.

The construction of ant travel network
Ant travel network consists of a set of nodes including a virtual node and many non-virtual nodes and a set of directed arcs.The virtual node is not only the travel origin of all ants, but also their travel destination.Each non-virtual node corresponds to a trip segment, and is characterized by the train, start time, end time, start station and end station determined in its corresponding trip segment.For reducing the difference of duty time spreads and improving the solving efficiency of the algorithm, the nodes whose start times are located in the latter half of the shift period are not allowed to be the origin of a duty, and the nodes whose start times are located in the first half of the shift period are also forbidden to be duty destination.
Two nodes are linked by a directed arc only when they satisfy some specific requirements.For example, two nodes whose trains are the same and of which the former's end station is the latter's start station should be connected by a directed arc.Specifically, directed arcs are constructed as follows: 1) For virtual node u 0 , it is connected by directed arcs to the non-virtual nodes which satisfy that: i) their start stations are crew's home station, which ensures all possible duties start from a home station; and ii) their start times are in the first half of the shift period.
2) For non-virtual node u, its corresponding train trip segment is denoted by p(u), and then it is linked to node v which has to satisfy at least one following requirement.
a) Its train is the same as that of node u, namely, Moreover, if a non-virtual node u whose start time is in the latter half of one shift's period and end station is a home station, it can still be connected to nodes satisfying that: i) their start stations are the home station, and ii) their start times are within period's first half of either the same shift with node u or its next shift.For instance, the day shift follows the morning shift, and the night shift follows the day shift.
In addition, for non-virtual node u whose start time is in the latter half of the shift period and end station is a home station, it still has to be connected to the virtual node.A sample train schedule and its corresponding travel network for ants are given in Figure 3 and Figure 4, respectively.Figure 3 shows a crew schedule consisting of 13 train trip segments, and the start times of segments 1 through 8 are located in the first half of the morning shift period, while the others are in the latter half.The trip segments shown with the same colour and type lines, e.g.segments 1, 4 and 10, constitute a crew duty.Crews can have breakfast during the period from 7:30 AM to 8:50 AM.The corresponding ant travel network of this crew schedule shown in Figure 4 has fourteen nodes of which the node numbered 0 is the virtual node and the other nodes numbered 1 through 13 correspond to the trip segments, respectively.As the interval from node 4 to node 7 is not enough for a crew to have breakfast, node 4 is not connected to node 7, and it is also not linked to nodes 12 and 13 because their duration times exceed the maximum of breakfast time.Thus, it is only connected to nodes 6 and 10.

Ant choosing strategy of travel path
Firstly, all ants start their trip from the virtual node u 0 .For ant a, when it arrives at node u, its next travel node is determined as follows: 1) If node u is the virtual node and its travel node set denoted by L a contains all non-virtual nodes, then it finishes its travel and stops.
2) If its travel node set L a contains all non-virtual nodes, but node u is not the virtual node, then it chooses the virtual node as its final travel node.
3) If its travel node set L a does not contain all non-virtual nodes, it chooses node v from the connected node set U u of node u as its next travel node based on the following choosing probability / / (24) where au v t is the probability of ant a choosing node ν as its next travel node when it is at node u, ε uν is the accumulated amount of pheromone on directed arc (u,ν), η υν is the quantity of heuristic information on directed arc (u,ν), and β,γ are two parameters controlling the weights of pheromone and heuristic information, respectively on the choosing probability of the node.
The pheromones on directed arcs represent ant search experience during the process in the past, and its accumulated amount partly influences the choosing probability of this arc.The more pheromone one arc has, the greater chosen probability it has.The pheromones on directed arcs are initialized as ( ) , , where |A| is the number of directed arcs in set A.
After all ants finish their travel during iteration n, arc pheromones have to be updated uniformly.Denote L * as the best travel path of ants with the minimum value of objective Z.Then, the pheromones on arcs belonging to path L * must be strengthened, and those on other arcs should be volatilized.That is, ( ) , , where φ∈(0,1) is the recession coefficient of pheromone, and |L * | is the arc number of the best travel path L * .The heuristic information on arcs represents a priori information for guiding ants choosing travel arcs.The number η uν of heuristic information on arc (u,ν) depends on the time interval from the end time of node u to the start time of node v, and the priority ratios for arranging crews having a meal and having a rest during the interval of nodes u and v.It can be given by where t uν is the time interval from the end time of node u to the start time of node v, if one of nodes u and v is the virtual node, then t uν =0; otherwise, t uν =t t (p(v)) -t s (p(u)).uv t and μ uν are the priority ratios for arranging crews having a meal and having a rest during the interval of nodes u and v, respectively.Their values can be determined as follows: 1) If the end time of node u is in the meal period, its end station is a meal station, and the time interval from the end time of nodes u to the start time of node v satisfies the time requirement of meal, but the crew does not have a meal after finishing the service of trip segment corresponding to node u, then uv t is set as a value more than 1, which is 1.2 in this paper; otherwise, 1 2) If crew continuous serving time has reached its maximum value, but they do not have a rest after finishing the service of trip segment corresponding to node u, and the end station of node u is a rest station, the time interval between nodes u and v satisfies the time requirement of rest, then μ uν is set as a value more than 1, which is 1.3 in this paper; otherwise, μ uν =1.For a travel path of ant which is a sequence of nodes starting and ending with the virtual node, and covering all non-virtual nodes only once, we can obtain a crew schedule by making each sub-sequence of nodes between two neighbouring virtual nodes in it form one crew duty.For example, the travel path of ant composed by the sequence of nodes {0, 2, 4, 7, 0, 1, 5, 8, 0, 3, 6, 9, 0} in which node 0 is a virtual node and nodes 1 through 9 are the nodes of train trip segments, can determine a crew schedule of three duties which are 2-4-7, 1-5-8 and 3-6-9, respectively.

The general algorithm based on ACO
Based on the travel network and the initial pheromone on each arc, all ants start their travel from the virtual node, and then repeatedly choose their travel nodes until they go through all non-virtual nodes and return back to the virtual node.During the travel process of ants, each non-virtual node is allowed to be passed only once, while the virtual node can be passed more than one time.After ants finished their trips, we determine the corresponding crew schedule according to each ant travel path, and then calculate the crew duty costs and the variance of duty time spreads.In addition, considering that some crew duties in some crew schedules may not satisfy the requirement of meal and rest, an additional penalty cost M is added into the objective value when a crew schedule has this case.Then the best travel path L * can be found by comparing the objective value; namely, the weighted summation of the duty costs, variance of duty time spreads and penalty cost, and then according to it, the pheromones of directed arcs can be updated with For- mula 26.Based on the updated pheromones, all ants search their travel paths again from the virtual node, and then determine crew schedules and calculate the objective values based on ant travel paths.This process is repeatedly executed until one of the following termination conditions is satisfied.1) The count of iterations reaches its maximum value G.
2) The count of the best travel path continually unchanging reaches its maximum value Ψ.In summary, the steps of the general algorithm for optimizing the crew schedule based on ACO are given in Table 1.

EXAMPLE ANALYSIS
This section applies Changsha urban railway as an example to analyze the convergence and effectiveness of our proposed optimization method of urban rail crew schedule.In terms of the plan of Changsha urban railway, it will consist of 6 backbone lines and 6 supplement lines in the future.However, only Line 2 with the total mileage of 22.2 km has been put into operation until today.It is made up of 19 stations including 2 home stations, 2 transition stations, 4 meal stations and 3 rest stations which are shown in Table 2.For more information related to Line 2, please refer to http: //www.hncsmtr.com.In this example, we optimize the crew schedule of Line 2 with the proposed method and analyze its performance.As seen from Table 2, crews not only can have a meal and have a rest at Guangda station and Wangcheng station which are also the home stations of Line 2, but can also transit their service trains there.
The crew scheduling is to generate a crew schedule consisting of a set of crew duties to cover 156 train trips determined by the implemented train schedule.All train trips can be divided into 724 trip segments by the duty-division stations shown in Table 2.The numbers of trip segments in the morning shift, day shift and night shift are 174, 406 and 273, respectively.Obviously, their summation is more than the total number of trip segments because the time periods of three shifts shown in Table 3 partially overlap.For example, the time period from 9:30 AM to 10:00 AM is the overlap between the morning shift and the day shift.Thus, some trip segments belong to two shifts at the same time.The meal time periods in the morning shift, day shift and night shift are 7:30-8:30, 11:30-13:00 and 18:30-19:30, respectively.Crews have to be arranged to have a meal when they have to continue their duty after the meal time period.Meanwhile, crews have to have a rest when their continuous service time is between 4 and 5 hours.Other parameter values in our proposed model and algorithm are given in Table 4.
The proposed algorithm shown in Table 1 is developed with computer language C# on the platform of Microsoft Visual Studio.net, and runs on the computer with the system of Microsoft Windows XP(Home Edition) operating system, Pentium(R) Dual-Core CPU E5800, 3.19GHz, Processor with 2.96GB of RAM.
First, some observations on the convergence process of the algorithm are made based on the change

Table 1 -The general algorithm for optimizing the crew schedule based on ACO
Input an urban rail network, its train schedule, and all parameter values.Construct ant travel network N=(U,A), initialize the pheromone uv e (0) of all directed arcs, and set ant number as S.
Set G as the maximum iteration count, g=0 as the current iteration count, Ψ as the maximum count of the best travel path continually unchanging, and φ=0 as the current unchanged count of the best path.
While true Move to node v(v∉L a and v∈U u ) with probability of    In order to analyze the optimization quality and efficiency of the ACO-based algorithm proposed in this paper, we optimize the crew schedule with the ACObased algorithm and the hybrid constructive simulated annealing (HCSA) algorithm proposed by Hanafi and Kozan [14], respectively.As seen from Table 5, the duty numbers of morning shift, day shift and night shift obtained by ACO-based algorithm are 25, 26 and 24, respectively, which are almost the same with these obtained by HCSA algorithm except the one of morning shift which has a little decrement.The objective value (715.5×10 3 ¥) of ACObased algorithm is also very close to that (716.8×10 3 ¥) of HCSA algorithm.However, the computing time of ACO-based algorithm is decreased by 12.9% from 9.3 min to 8.1 min comparing to HCSA algorithm.Therefore, the ACO-based algorithm has a relatively higher solving efficiency comparing with the HCSA algorithm regarding the computing time.
Table 6 and Table 7 give the optimization results about crew duty costs and the variance of duty time spreads respectively obtained by both the HCSA algorithm and the ACO-based algorithm.The service time rate in Table 6 is used to measure crew productivity rate whose value is the ratio between the total service time and the total time spread of duties.As seen from Table 6, the averages of crew cost, transition count, time spread and service time rate of ACO-based algorithm are all very close to these of HCSA algorithm.Hence, it is hard to say that the ACO-based algorithm has improvements regarding the crew's duty costs comparing with the HCSA algorithm.However, the variances of duty time spreads of the former are observably smaller than these of the latter as seen from Table 7. Obviously, the minimum duty time spreads of three shifts obtained by HCSA algorithm are all under these obtained by ACO-based algorithm, which means that the former has larger difference than the latter one.

CONCLUSIONS
In this paper, we proposed an urban rail crew schedule optimization model after analyzing its optimization objectives and all types of constraints.It has the following improvements based on the existing literature.
1) It aimed to reduce the variance of duty time spreads for ensuring the equity among crew services in addition to minimizing the total crew cost which was widely used in the existing studies.
2) It accommandated crews to have a meal in some specified meal periods of one day in accordance with their healthy eating habits.
This model was solved using an ACO-based algorithm whose design had to deal with the construction of ant travel network and choosing strategy of ant paths.The numerical results on Changsha urban rail indicated this ACO-based algorithm had better convergence, and took only seven minutes around to find a satisfactory crew schedule for a problem with about 724 train trip segments.Moreover, it took less comput-ing time comparing with the HCSA algorithm proposed by Hanafi and Kozan [14].
Our proposed model and algorithm are mainly for solving the crew scheduling problem in urban rail system.However, we still have to adjust their parameter values in order to better fit specific practical circumstances before applying them to solve the real cases.In addition, the proposed model and solving algorithm can also be applied in the intercity and high-speed rail systems which have great similarities with urban rail system by making some minor adjustments.1) The crew's start and end stations of their service duty should be the same or in the same city which contributes to making crews return back to their resident city after finishing their service work.
2) The formulation of crew schedule must be based on the whole intercity or high-speed rail network rather than a rail line every time, because crews can service trains of any rail line in intercity and high-speed rail systems.Therefore, adding these above requirements and proposing the detailed scheduling methods of crews for intercity and high-speed rail systems are going to be done in the near future.In addition, the capacity restriction of meal and rest stations and other special requirements to crew schedule in urban rail system should further be considered in further research.

Figure 1 -
Figure 1 -An example of the division of train trip

Figure 2 -
Figure 2 -An example of crew duties in the morning shift where D m , D d and D n are the variances of duty time spreads in the morning shift, day shift and night shift, respectively, and N m , N d and N n are separately the numbers of crew duties in these three shifts.

Figure 4 -
Figure 4 -The travel network of ants corresponding to the sample crew schedule

Figure 3 -
Figure 3 -A sample of crew schedule

t
and set L(a)=L(a) , {v}, u=v.If V⊆L(a) and u=u 0 , then, break.Endwhile Determine the crew schedule by path L(a), and calculate its objective value Z(L(a)).Endfor Compare Z(L(a)) among all ant travel paths, and find ant a * with the minimum of objective value.If Z(L(a * ))≤Z(L * ), Set L * =L(a * ) and φ=1; else set φ=φ+1.Update the pheromone uv e (n) of each arc in set A by formula 26, and set g=g+1.Endwhile Determine crew schedule Ω * according to the best path L * , and calculate its objective function Z(L * ).Output the optimized crew schedule Ω * , and its duty costs and variance of duty time spreads.
relations between the objective values and the total computing times of algorithm shown in Figure5.The black and red tracks respectively express the change relations of the maximum and minimum of objective value among all ant travel paths with the total computing time, while the blue track shows the relationship between their average and the total computing time.As seen from it, the objective values decline sharply with the computing time in the first four minutes or so, and then drop slowly until about eight minutes.Moreover, the gap between the minimum and maximum of the objective value becomes smaller with the increase of iteration.And after 6 minutes, the minimum value nearly does not change, although the maximum and average values have little fluctuations.

Figure 5 -
Figure 5 -The convergence process of the algorithm This research has been supported by the Natural Science Foundation of China (Grant No. 71401182, U1334207, 71471179), Doctoral Scientific Foundation of the Ministry of Education of China (Grant No. 20120162120042) and Research Fund for Fok Ying Tong Education Foundation of Hong Kong, China (Grant No. 132017).
CREW SCHEDULING CONSIDERING BOTH CREW DUTY TIME DIFFERENCE AND COST ON URBAN RAIL SYSTEM Crew Scheduling Considering both Crew Duty Time Difference and Cost on Urban Rail System W. Zhou, et al.: W. Zhou, et al.: Crew Scheduling Considering both Crew Duty Time Difference and Cost on Urban Rail System

Table 3 -
The service time periods and meal time periods of shifts

Table 2 -
All types of stations on Line 2

Table 4 -
Parameter values of model and algorithm

Table 5
gives the numbers of duties in each shift, objective values and computing times obtained by the HCSA algorithm and the ACObased algorithm.

Table 5 -
Computational results of HCSA and ACO-based algorithms

Table 7 -
Computation results related to the variance of duty time spreads

Table 6 -
Computation results about crew duty costs