• No results found

The Shunting Crew Problem

N/A
N/A
Protected

Academic year: 2021

Share "The Shunting Crew Problem"

Copied!
40
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

The Shunting Crew Problem

Dave Lamberts

(2)

The Shunting Crew problem

Assigning shunting drivers to shunting tasks

Groningen, March 2007

Doctoraalscriptie: Dave Lamberts RijksUniversiteit Groningen

(3)

Summary

(4)

Preface

I started my study of Econometrics and Operations Research seven years ago at the Rijksuniversiteit Groningen. During the study I have developed a growing interest for the field of Operations Research. Solving practical problems by using mathematical models is a very challenging but interesting part of this study. In order to write my thesis, I have been looking for a research project that would include a practical problem.

The RINTEL project provided me such an opportunity. There was a pos-sibility to take part in this program which is being developed for the Dutch Railways. Wout van Wezel, who is the project leader of RINTEL in Groningen, introduced me to the problem of assigning shunting drivers to shunting tasks. During this project I visited the offices of the Dutch Railways in Zwolle and Utrecht to get an idea of how planners work.

When you start a project you always aim at solving a problem completely. This has also been my idea. Unfortunately I haven’t been able to solve the problem as I would have liked. Nevertheless it has been a great experience and I enjoyed working on this problem.

(5)

Contents

1 Introduction 6 2 Rintel 8 3 Dutch Railways 10 3.1 Planning . . . 10 3.2 Shunting . . . 11

4 The Shunting Crew Problem 13 4.1 Problem Description . . . 13

4.2 Literature on Crew Scheduling Problems . . . 15

4.3 Traveling Salesman Problem . . . 16

4.4 Heuristic or Exact Algorithm . . . 18

5 Assignment Problems 20 5.1 Definition of the Assignment Problem . . . 20

5.2 Review of the Assignment Problem . . . 22

5.3 Algorithm of Jonker and Volgenant . . . 22

6 Algorithm for the Shunting Crew Problem 24 6.1 Input . . . 24

6.2 Data . . . 24

6.3 Matrix . . . 25

6.4 Dummy Tracks and Dummy Tasks . . . 28

7 Computational Results 29 7.1 Different Parameter Values . . . 29

7.2 Output . . . 30

7.3 Scheduling Breaks . . . 31

(6)

8 Planning a Complete Day 33 8.1 Differences between a Night and a Day . . . 33 8.2 Exchanging Parts of Shifts using Dummy Tasks . . . 34 8.3 Exchanging Parts of Shifts without Dummy Tasks . . . 35

(7)

Chapter 1

Introduction

If a train isn’t used for transporting people, it has to be placed at a station. Trains have to be cleaned, washed and they have to be moved to a place out of the way of trains passing the station. Moving a train from one track to another at a station is called shunting and personnel concerning shunting can be divided into shunting drivers and people who assist shunting drivers. Shunting drivers are responsible for all tasks concerning shunting. This research will focus on shunting drivers, since they are the ones driving the trains, while the assistants aren’t allowed to do all of the shunting tasks.

The planner is responsible for all the activities concerning trains at the station. If a train has to be moved, he has to find a route and he has to assign a shunting driver to move the train. Furthermore, if something unexpected happens, like a changing departure train or the repairing of a train or railway, the planner has to look over the consequences. For all activities concerning shunting, personnel have to be assigned by the planner. The planner’s most important goal is to keep the shunting drivers’ walking time as low as possible. The program of RINTEL is being developed to support planners in a compu-tational way, instead of planning on paper. Algorithms are developed for all of the planners’ tasks. This thesis will attend to the matter of assigning shunting drivers to tasks. More specifically, the main research question will be:

Is it possible to develop an algorithm to assign shunting drivers to their tasks at a train station, while keeping the total walking time as low as possible?

In chapter one, the main idea behind the development of RINTEL will be discussed. In the second chapter, the way of planning at the Dutch Railways will be explained. Furthermore, all the activities concerning shunting will be explained. The actual formulation of the problem will be given in the third chapter. The objective of the algorithm and some rules the planner has to deal with, will be discussed. Furthermore, related problems like the traveling salesman problem and the crew rostering problem will be discussed. Finally, a choice is made to use an exact algorithm or a heuristic. There has been decided to solve this problem by using a natural relaxation of the traveling salesman problem, namely the assignment problem. Therefore, chapter four discusses these types of problems. A definition of the problem is given, as well as a review of assignment problems. Finally a specific algorithm which is used

(8)
(9)

Chapter 2

Rintel

The task of planning at the Dutch Railways is quite complex. It should be sup-ported adequately. But most of the planning is made using pencil and paper. This way of planning is time consuming and it may even lead to errors. Com-puters are only used for providing information like routing and processing data. Planners tend to prefer this manual planning to the use of algorithms and com-puters. Although many algorithms have been developed and have been tested on realistic data, very few are used in railway operations. Watson [25] concludes there are four reasons why algorithms aren’t used in railway scheduling:

• Lack of integration with software that fits the needs of users

• Lack of co-operation between software developers and model builders • Lack of extendibility of the models to real-life circumstances

• No international applicability of the models

It is obvious that planners want to be in control when using computational support. They need a good interface so they can see what is happening at the station. It is not useful to develop an algorithm where the planner’s only use is to supply the input.

Most of the designed algorithms make use of a problem-oriented ap-proach. This approach focuses on the total problem that has to be solved, although the problem is usually divided into smaller subproblems. Its main goal is to improve the quality of the manual solution. It doesn’t always take into account how the planner solves the problem in practice. An example of a problem-oriented approach is the algorithm designed by Lentink et al [16]. A four-step algorithmic approach is discussed where a different solution approach is used in every step. The paper focuses on the development of quantitative models and algorithms supporting the creation of shunt plans. The paper of Lentink et al [16] is part of one stream of a project called RINTEL. The goal of RINTEL is to support planners at the Dutch Railways in a computational way. Algorithms are included in planning support but planners should still be in con-trol. In other words, planners should still have influence in generating solutions.

(10)

In this way, some repeating calculations can be carried out by computers and planners will have more time to focus on unexpected events.

Another stream of research within RINTEL makes use of a planner-oriented approach. This stream is located in Groningen and algorithms are designed from the planner’s viewpoint. . At first, a task analysis of the shunting planner is made in [26]. They conclude that the task of planning can be divided into subtasks. Some of these subtasks cost a lot of time and effort to the planner. Algorithms can be designed for these subtasks. These algorithms should be able to perform these subtasks in a shorter time than manually. They claim that planners will accept these solutions easier while there is no risk of adopting all non-optimal habits [27]. The four subtasks of shunt planning are:

• Coupling and decoupling of carriages.

• Store trains on shunting tracks so they don’t block incoming or outgoing trains.

• Routing trains at a station.

• Assigning shunting drivers to shunting tasks.

Another conclusion of the task analysis is that different planners solve the planning problem in a different way. By developing algorithms for subtasks, these algorithms might be implemented in a different order. In this thesis, an algorithm is designed to solve the fourth subtask described above: Assigning shunting drivers to shunting tasks. It is part of the stream located in Groningen. Both streams of research use the railway station of Zwolle as their starting point. Zwolle is located at the center of the Netherlands, so a lot of trains pass by every day. This station consists of dead-end tracks and continuing tracks. Trains arrive and depart from the same side on dead-end tracks. On continuing tracks trains can arrive and depart from both sides. Not all stations in the Netherlands have both types of tracks. Having both these types of railways makes Zwolle a difficult station for planners.

(11)

Chapter 3

Dutch Railways

3.1

Planning

At the Dutch Railways, planning starts one year in advance. This planning is based on arrival and departure times of trains. It doesn’t change much from year to year; about 80% is the same as the year before. In this way, personnel will get used to the tasks they’ll have to complete.

Four weeks before a specific day, beginning times of shifts have to be known to the personnel. From that day, planning is constantly adjusted until three days before the actual day. Then schedules are given to traffic-control. This means that shunting drivers know the beginning times of their shifts four weeks in advance, but they don’t know which tasks they’ll have to complete yet.

At the last moment, shifts for the shunting drivers are scheduled. At this point, planning of trains has already been completed. If no good working sched-ule can be found, it is possible to change the beginning times of shifts or arrival times of trains. But usually planning of shunting drivers follows from the plan-ning of trains.

At this moment, planning of personnel is done with pencil and paper. Shunt-ing drivers receive a paper with all their tasks for that specific day. Problems arise because of this planning on paper. One problem is that the planner can’t see which shunting driver is completing a specific job. Another problem is that it isn’t clear which shunting drivers are free at a given moment if a new task has to be completed. The planner has to glance through the list of personnel and look for an available shunting driver. Computational support would help the planner with both of these questions.

(12)

3.2

Shunting

This section describes all the activities concerning shunting. All shunting activ-ities, performed by one shunting driver are called a shift. So it’s a planner’s job to make feasible shifts for all of the shunting drivers. The shunting activities are briefly discussed to give an idea what shunting drivers do.

A shunting driver needs some time to prepare before his first task. He needs to get his paper with tasks at the canteen for example. So there is some reporting time.

Then the shunting driver is ready to go to his first task. He’ll have to walk to the concerning track, so walking times have to be known from canteen to all tracks and from each track to another. The most important goal for the Dutch Railways is to keep the total walking time as low as possible, because of safety reasons.

The first activity is shunting itself. This means driving a train from one track to another at the station. These are usually very short trips.

Next to shunting there is an activity called shunting movement, which may seem confusing. But with a shunting movement, the train isn’t moved. It can be two things. Firstly, when a train has to be moved in another direction, the other driver’s cabin has to be used. It takes time to walk from one driver’s cabin to the other. The other movement is the preparation of the train to be shunted.

Sometimes, a locomotive is used to move a train. Then a shunting driver has to connect the locomotive to the train and afterwards he has to disconnect it.

When a train isn’t used during a shift anymore it has to be moved to a track where it doesn’t hinder other trains. It takes time to put away these trains.

It is possible that trains have to be connected or disconnected with other trains or parts of trains.

Then there are some activities concerning the preparation of the train for departure. It means that after these activities, the train can be used by personnel and by passengers.

When trains aren’t used for transporting passengers, they have to be washed and cleaned. It is not a shunting driver’s responsibility to wash or clean but he has to drive the train to the place where this is done. So this is actually the same as shunting.

Occasionally it may happen that a shunting driver will have to reverse a switch manually. Normally this is done by computer but sometimes it may be necessary to do it by hand.

(13)

Just like there is some time before the shifts starts, there has to be some time between completing the last task and the ending time of the shift. This is called sign off time.

(14)

Chapter 4

The Shunting Crew

Problem

In this chapter, the shunting crew problem will be discussed. It will start with a description of the problem. This includes the planner’s input, the objec-tive of the problem, the regulations and the demands the algorithm will have to satisfy. There hasn’t been paid a lot of attention to the problem of shunting in general and shunting crews in particular. There is almost no literature avail-able when it comes to assigning shunting crews to shunting tasks. On the other hand, a lot has been written about scheduling driving personnel for trains. The second section deals with this so called crew rostering problem. Studying this literature may help solving the shunting crew problem. In the third section of this chapter, a problem is discussed which has the same objective as the shunt-ing crew problem. It is a well known problem in operational research and it is called the traveling salesman problem. The final section discusses the choice for a heuristic or an exact algorithm. It is the first step when trying to develop an algorithm. Both ways have advantages and disadvantages.

4.1

Problem Description

The planning of shunting tasks is the final step in the planning process. At that moment, arrival and departure times of trains are already known. It is preferable not to change these times anymore, so tasks will have to be carried out within a certain time window. The planner receives a list of trains ordered by arrival time. For each train he’ll look for a solution. After finding a route, he’ll start looking for an employee to accomplish the tasks concerning this train. The same routine is carried out for all of the trains on the list. Each shunting task has to be assigned to one of the shifts. Of course, the planner is bound to regulations when scheduling shunting drivers. In this section, these regulations will be discussed.

The most important objective in planning shunting drivers is to minimize the total walking time. Because of safety reasons, management doesn’t want the employees to cross the tracks more than necessary. If a shunting driver has

(15)

the option to wait for another task at the same track or to go to another track immediately, the first option is preferred. For each track, the distance to any other track at the station, including the canteen, is known. This distance is given in minutes and they can be found in a table.

When designing schedules for shunting drivers, there are some regulations the planner has to deal with. The first regulation is that a shift can be no longer than eight hours. At the beginning and the end of the shift, a shunting driver needs ten minutes to prepare or to sign off. A very important part of the shift for the shunting drivers is the break. This break has to be at least thirty minutes long and it has to start within three and four and a half hour after the beginning of the shift. These are the regulations regarding the shifts.

During a day at the station, there are rush hours and calm hours. Because of that, the number of tasks and shunting drivers varies a little. On a day during the week there are between four and nine employees present at the station. A planner prefers to keep an extra employee in the canteen, in case there is a major problem. The busiest period for shunting drivers is the night. All the trains have to be moved and prepared for the next day. Most of the tasks have to be scheduled for the night. For this reason there has been decided to aim at solving the shunting crew problem for the night.

As pointed out before, many algorithms haven’t been used in practice be-cause of different reasons. Therefore, it is important that the algorithm satisfies the planner’s needs. The planners’ demands will be pointed out shortly. Cir-cumstances change rapidly at a train station. Trains are delayed or broken because of several reasons and as a result, schedules should be adjusted. The algorithm should be able to cope with these changing circumstances.

• One demand to the algorithm should therefore be to give different so-lutions. If a planner will be able to generate different solutions, it will be easier to deal with sudden changes. Another demand because of the changing circumstances is that computing times should be low. When problems arise, it is useful to generate a different solution quickly. If not, other trains may be affected.

• The given solution should also be clarifying, so that the planner can see which employee is where at any moment. When problems arise, the plan-ner should be able to warn the corresponding shunting driver quickly. • The algorithm should support the planner. It should make him free of

repeating tasks that take a lot of his time. It isn’t necessary to take over all of his work. In this way, he has more time to focus on problems that may arise.

(16)

crew scheduling problems. In the next section, more will be told about these kinds of problems.

4.2

Literature on Crew Scheduling Problems

In the literature, a lot can be found on crew scheduling problems. For the railway industry, a lot of attention has been paid to driving personnel. These types of problems have some similar characteristics as the shunting crew prob-lem. Employees have to complete certain tasks and for these employees, rosters have to be made. At first instance this seems to be a good starting point to solve the shunting crew problem. However, there are some important differences between shunting personnel and driving personnel. In this section more will be explained about these differences. First, something will be told about crew ros-tering problems and the way of solving them. After that, differences between the two types of problems will be discussed.

For crew rostering, important areas of research are the airline industry, nurs-ing, call centers and the railway industry. The main objective is usually to min-imize the number of shifts and satisfy all the rules regarding these shifts. It is preferable to balance the workload for employees. Sometimes, employees have different characteristics meaning that not all employees are allowed to complete all tasks. Planning problems are known to be NP-hard, which means they can’t be solved easily. Usually several approaches will have to be combined to obtain a solution. But for minimization in crew rostering, the problem is often handled as a set covering problem. The way of solving these problems is to decom-pose them into two phases [5]. It starts with constructing a set of duties where each duty can be handled by a crew. At this moment there are a lot more duties then crews. In the second phase, the set of duties which minimises the costs is determined. This second phase is solved by column generation techniques. At the Dutch Railways the system of TURNI is used for planning of driving personnel and it is based on a set covering heuristic.

When looking at the literature, the set covering problem seems to be the most widely used solution method when solving crew rostering problems. However there are some differences between driving personnel and shunting personnel that make it difficult to use the same approach here. These differences can also be found in (Hoekert).

(17)

Another difference is that shunting drivers’ shifts continue 24 hours a day, while shifts for driving personnel only take as long as the train timetable takes place. Shunting drivers also work when all the trains are placed at the station, which is during the night. If that isn’t taken into account it may happen that tasks which are scheduled at the end of the day are completed before tasks scheduled at the beginning of the same day. That would be unacceptable. So any algorithm developed for shunting personnel will have to be able to deal with this problem.

A third important difference between the two types of problems is the fact that shunting tasks can be moved in time. When trains aren’t used for trans-porting, they are placed at a station for a longer period of time. Therefore it isn’t necessary to complete the tasks immediately. The only demand is that they have to be completed before the train leaves again. This can be very important if at some point there aren’t enough employees. If it is possible to move a task a bit forward in time then it may be possible to solve this problem. The objective of this thesis is not to minimise the number of employees, but to complete all the tasks with a given number of employees.

When looking at the literature it is obvious that a lot of attention has been given to related problems of planning shunting tasks, but some differences make it clear that other ways of approach may be useful. Only during the last couple of years, the shunting problem has received more attention. However most of the literature has focused on the shunting of trains. Examples can be found in [17], [19], [18] and [20]. These researches focus on the routing and parking of trains at a station. All these articles conclude that the shunting problem is best solved when dividing it in subproblems. They give varying algorithms for solving the routing and parking problem. In [20] algorithms are developed for all subtasks of shunting, except for the assignment of shunting drivers to shunting tasks. In [15] the problem of assigning shunting personnel to tasks is analysed. Some heuristics are considered, but no real solution is found. Furthermore, the objective in that thesis is to minimize the total number of shifts. In this thesis the number of shifts is given and the objective is to minimize total walking time. Although more attention has been given to the shunting problem, shunting crew problem has almost totally been ignored. In this thesis an attempt is made to solve this problem. The shunting crew problem can be modelled as a capacitated vehicle routing problem(CVRP). The CVRP can be defined as a fixed number of delivery vehicles with the same capacity that must service known demands for a single commodity from a depot at minimum transit costs. This problem is strongly NP-hard since the multiple traveling salesman problem (MTSP) is a special case of CVRP. But solution methods for the MTSP may be useful when solving the shunting crew problem. The traveling salesman problem will be discussed in the next section.

4.3

Traveling Salesman Problem

(18)

for one person when visiting each location exactly once. Its mathematical for-mulation is: min n X i=1 n X j=1 cijxij (4.1) s.t. n X j=1 xij= 1 i = 1, . . . , n (4.2) n X i=1 xij= 1 j = 1, . . . , n (4.3) xij ∈ X (4.4) xij∈ 0, 1 (4.5)

The first equation in this model is the objective function. In this equation cij

are the costs or distance of walking from location i to location j. The variables xij show whether the two locations are connected or not. The objective is to

minimize the costs, represented by cijxij, of visiting each location. The meaning

of equations (2) and (3) is that each route between two locations can be used exactly once. The fourth equation shows that every route is included in the cycle such that exactly one cycle will appear. The final equation means that if xij = 0 than the route from i to j is not included in the cycle and if xij =1 the

route is included in the cycle.

(19)

complexity of only O(n3). So it may be a possibility to find a solution by

solving the problem as an AP instead. In the next chapter, more will be told about the assignment problem.

4.4

Heuristic or Exact Algorithm

In the previous sections, some problems related to the shunting crew problem were discussed. The most important conclusions in those sections were: the shunting crew problem differs in some important ways from the crew rostering problem and the traveling salesman problem. Therefore another way of solving this shunting crew problem has to be found. Because there are no other known algorithms for the shunting crew problem, there has been decided to develop a completely new one. In this section, a motivated choice will be made for the solution method.

The first important choice that has to be made when developing an algorithm is whether to develop an exact algorithm or to make use of a heuristic. Exact algorithms are mostly used if the complexity of a problem is not that high. The advantage of these algorithms is that they will give more insight into the mathematical complexity of the problem. However they usually require a lot of computation time, especially if problems are larger. On the other hand, heuristics are the best choice when it comes to solving practical problems or real-life situations. They are designed to find the best possible solutions as quickly as possible. Computing times are usually low. But heuristics don’t show any information on the quality of the solutions as exact algorithms do.

(20)
(21)

Chapter 5

Assignment Problems

This chapter will tell more bout assignment problems. First, the intuitive mean-ing of the AP will be explained followed by a mathematical definition of the model. Then a review will be given of the history of the AP and some of its variations. A lot of algorithms have been developed to solve these variations of the AP. Out of these existing algorithms, one has been chosen as the starting point for solving the shunting crew problem. The motivation for choosing this algorithm is given in the section: Algorithm of Jonker and Volgenant.

5.1

Definition of the Assignment Problem

The idea when solving assignment problems is to assign n items to n other items. Usually this means assigning n persons to n jobs. But assigning persons to jobs leads to costs. Different people may have different skills and so the costs of assigning may differ from one person to another. All these costs can be given in a matrix. In this matrix all the rows represent the persons and all the columns represent the jobs. Each number in the matrix represents the costs of assigning that person to that job. The objective is usually to keep the costs of the assignment as low as possible.

An example is given in the matrix below. In matrix A the costs of assigning person 1 to job 1 is 7. The costs of assigning person 1 to job 2 are 8 and so on.

A =     7 8 4 6 5 6 3 9 8 4 7 5 6 7 5 4    

This is the AP in an intuitive way. In a more mathematical way, the assign-ment problem can be described as a bijective mapping between two finite sets of n elements. One set represents all persons and the other one represents the jobs. The objective then is to connect all elements of one set to the other while keeping costs as low as possible. An example is shown in the figure on the next page.

(22)

u u u u u e e e e e

-Figure 5.1: Graphical representation of AP

In this picture, people looking for a job are represented by the black dots. The jobs are represented by the open dots. The objective when solving the AP is to connect these two sets of elements while keeping costs as low as possible. A connection is represented by a vector from a black dot to an open dot.

The formal definition of the AP is shown in a mathematical model. The mathematical model of the assignment problem is:

min n X i=1 n X j=1 cijxij (5.1) s.t. n X j=1 xij= 1 i = 1, . . . , n (5.2) n X i=1 xij= 1 j = 1, . . . , n (5.3) xij∈ 0, 1 (5.4)

In this model, cij are the costs of assigning person i to job j. Furthermore

xij = 1 if person i is assigned to job j and 0 otherwise. The objective, when

(23)

5.2

Review of the Assignment Problem

The AP is a well-known problem and it has been studied for a long time. The most well-known solution method for solving the AP is the Hungarian method by Kuhn [11]. In 1955 this was the first algorithm to solve a linear assign-ment problem. Since then many algorithms have been developed to solve many different types of assignment problems. In 1969 Mack [13] introduced an algo-rithm similar to the Hungarian method, which he called the Bradford method. Two years later, Tomizawa [14] developed the first algorithm which made use of shortest augmenting paths. In 1973 this algorithm was improved by Dorhout [6], who made it faster. A few years later Hung and Rom [8] and Bertsekas [3] developed algorithms based on relaxation approaches. Simplex methods were also used to solve the AP. While Barr [2] developed a method based on primal simplex, Balinski [1] used a dual simplex method. In 1987 Jonker and Volgenant [9] developed an improved algorithm for the Hungarian method which is based on shortest paths. Kennington and Wang [10] extended this algorithm in 1992 to solve the semi-assignment problem. Lee and Orlin [12] have used heuristics to speed up SSP-algorithms. In more recent years, improving capacity of com-puters has led to new types of algorithms. Chu and Beasley [21] developed a genetic algorithm to solve a generalised assignment problem in 1997. Feltl and Raidl [22] used this algorithm as a basis an improved to an even faster algorithm in 2004.

Apart from assigning persons to jobs there are many other area where as-signment problems are used. For example time slot asas-signment problems are used in telecommunication to send data from one satellite to another. linear bottleneck assignment problems are used to locate objects in space. Another application is the use of planar three-dimensional assignment problems in time tabling problems.A well-known example is the quadratic assignment problem (QAP), which can be used for representation of many real life applications.

Many specialized algorithms for the AP are of dual nature. This means that in every intermediate step, the algorithm produces a solution satisfying only some of the constraints [8]. An example of such a solution method is the Hungarian method, mentioned before. Another example of an algorithm that is built up this way is the algorithm of Jonker and Volgenant [9]. This algorithm will be used for solving the shunting crew problem. This choice will be motivated in the next section.

5.3

Algorithm of Jonker and Volgenant

The article where this algorithm is discussed is called: ”A Shortest Augmenting Path Algorithm for Dense and Sparse Linear Assignment Problems”. In this section, only a short description will be given of this algorithm. More details can be found in the corresponding article.

(24)

It is not common that all of the assignments are made in the first phase of the algorithm. This means there are still unassigned rows and columns in the matrix. In other words, not all of the people are assigned to a job. In this phase, all of the unassigned rows have to be assigned to a column (assigned or unassigned). Because low run times are preferred, this should be done as fast as possible. This means a shortest path has to be found from an unassigned row to a column. If a path has been found from an unassigned row to a column, one more assignment has been made. If one additional assignment is made, the solution is augmented. If no more additional assignments can be made, a solution has been found.

Both the initialization phase and the augmentation phase have a computa-tional complexity of O(n3). This means the total algorithm has this complexity,

which makes it a fast algorithm compared to other solution methods. This is important when solving the shunting crew problem, since it is a changing envi-ronment and it may be necessary to use the algorithm often.

(25)

Chapter 6

Algorithm for the Shunting

Crew Problem

6.1

Input

For all assignment problems the input consists of a matrix. The meaning of the rows and columns depends on the assignments that have to be made. In this study, shunting drivers have to be assigned to tasks. The output has to consist of a shift for every shunting driver. Because distances from track to track are the same for all shunting drivers, it doesn’t matter which shift is assigned to which shunting driver. This means, that the algorithm should generate the correct number of shifts with correct beginning and ending times and inclusion of a break. If this is done it is just a matter of giving each shunting driver a shift and the problem is solved. After acquiring the data, the first step should be to generate a matrix, which can be used as an input matrix for the algorithm described in the previous chapter.

6.2

Data

In order to compare the performance of the algorithm with the current situation, some realistic data are necessary. These data were provided by a planner from the station of Zwolle. The data contain:

• A table with walking times in minutes from tracks to all the other tracks including the canteen.

• Sheets that shunting drivers receive at the beginning of their shift. These sheets contain: beginning time and ending time of the shift. Furthermore for every task: shunting activity, beginning and ending time of task and beginning and ending track of this task.

• Sheets that the planners use to get an overview of which shunting driver is busy with a task and where he is.

(26)

The input needed for the algorithm is a matrix. The idea, when generating this matrix, is to compare beginning and ending times of all tasks. In the next section this will be explained. To achieve this, all tasks are ordered according to their beginning time. All beginning times of the tasks are within the period of 22.00 to 6.00. But when comparing times, there is a problem ordering tasks before and after 24.00. Normally, the computer doesn’t recognize the changing of days in the data. To avoid problems, all times have been converted from hours to minutes. One day has 1440 minutes and a new day will start after 1441 minutes. In this way, it is possible to compare times of two different days. This will be illustrated by an example.

Example 1: Comparing times for different days

A task has to be completed at 23.55 hours. To get the right value the next calculation is made: (2300 * 0.6) + 55 = 1435 This value is given in minutes.

Another task has to be completed at 00.09 the next day. So this task has to be completed after the previous one. Then the calculation becomes: (2400 * 0.6) + 9 = 1449. This value is also given in minutes.

The last term is used to make sure that the last task is completed after the first one. The difference between the two tasks is 14 minutes as it should be, so the calculation is correct.

All tasks are ordered according to beginning times. Out of this list a matrix will have to be generated to use as input for the algorithm. This will be described in section 5.3.

6.3

Matrix

(27)

It wouldn’t be useful to compare all tasks to each other. Some tasks may be carried out on the same track but with a lot of time between the end of the first task and the beginning of the second one. On the other hand, some tasks may have to be carried out at the same time. To make sure that these situations don’t arise, constraints have been added when generating the matrix. Given two tasks i and j where task j has to be completed after task i is completed. Then these constraints are:

bj− (wi,j+ bi+ ji) ≥ 0 (6.1)

bj− (wi,j+ bi+ ji) < 100 (6.2)

di,j= wi,j+ ji (6.3)

Definitions of the letters given in these constraints are: bi and bj: beginning times of task i and task j in minutes.

wi,j: walking time between task i and task j in minutes.

ji: job time of task i in minutes.

di,j: amount of time between beginning time of task i and the beginning time

of task j in minutes.

(28)

As mentioned before, a shift consists of all the tasks assigned to the same shunting driver satisfying to all regulations. The meaning of the constraints will be illustrated by an example.

Example 2: Two tasks at the same time

Task Time Time of task Beginning track Ending track (min) (min)

19 1441 6 11 17 20 1453 5 6A 6A

In this table two tasks, 19 and 20, are given. Time is the beginning time of the task and it is given in minutes. The value is calculated as explained before. The next column gives the time it takes to complete the task, so for task 19 this means six minutes. The last two values are respectively, the beginning and the ending track of the task. If a shunting driver has to complete these two tasks, he’ll have to walk from track 17 to track 6A. This takes eleven minutes. The time it takes to complete task 19 is six minutes. This means that a shunting driver can be at the beginning track of task 20 at: 1441 + 6 + 11 = 1458. This means it isn’t possible to complete these two tasks for one person. In the matrix, the value of 10.000 is given at the place where row 19 and column 20 cross.

In the next example two tasks can be completed by the same shunting driver. Example 3: Completing two tasks

Task Time Time of task Beginning track Ending track (min) (min)

19 1441 6 11 17 24 1465 3 5A 100

Again two tasks are given in the table. This time tasks 19 and 24 are compared. If a shunting driver has to complete these two tasks, he’ll have to walk from track 17 to track 5A. This takes eleven minutes. The earliest time a shunting driver can be at track 5A is: 1441 + 6 + 11 = 1458. Because task 24 begins at 1465, it is possible to complete both tasks. The value of 17 is given at the place where row 19 and column 24 cross.

(29)

6.4

Dummy Tracks and Dummy Tasks

If the algorithm of Jonker and Volgenant would be applied to the matrix at this point, it would generate several lists of tasks with minimal walking times. The next step is to find a way to generate exactly as many lists as needed. For example, for one night at Zwolle there are six shunting drivers at work. Therefore it is necessary to get exactly six lists. To achieve this, dummy tracks have been implemented in the matrix. A dummy track is an artificial track, which is ten minutes from all other tracks and their mutual distance is set at 10.000. This mutual distance is necessary to make sure that there is no more than one dummy track in a cycle. One could see a dummy track as the canteen. As a result every shift will have one canteen included. Walking times from these dummy tracks to other tracks aren’t included in the final calculation of the total walking time. These dummies are only included to get the exact number of cycles. To get six cycles in the final solution, six dummy tracks have to be included. These dummy tracks are the final rows and columns of the matrix. In this way, one can choose how many cycles will be generated.

It is now possible to generate exactly six cycles, so that all the shunting drivers have a shift. But nothing has been said about correct beginning or ending times of these shifts. There are six shunting drivers available, but their shifts don’t have the same beginning and ending times. Three shunting drivers are present from 18.00 to 2.00 hours. The others are present from 22.00 to 6.00 hours. The available data begin at 22.00 and end at 6.00 hours. This means that three shunting drivers have already been working for four hours. The other three start at the beginning time of the time frame. At 22.00 there are six shunting drivers available. Of these six drivers, three will work until 2.00 hours and three until 6.00 hours. To make sure that three drivers don’t complete any tasks after 2.00 hours, dummy tasks have been implemented. Three dummy tasks are placed in the table of beginning times at 2.00 hours. These dummy tasks take 1500 minutes. These are just artificial tasks and the length of these tasks is chosen to make sure that these employees are occupied during the rest of the night. Therefore, this dummy task will be the last task of the shift for a shunting driver. Artificial tracks for these dummy tasks are called ”home” and the distance for these tracks to other tracks is the same as for the canteen. This choice has been made, since a shift for a shunting driver ends at the canteen. The result should be that three employees stop working after 2.00 hours while the other three keep completing the remaining tasks.

(30)

Chapter 7

Computational Results

The algorithm described in the previous chapter has been tested on some real-life data used at the station of Zwolle. A total of eighty tasks have to be accomplished by seven shunting drivers. At this day there is also a shunting driver present who works from 17:00 until 01:00 hours. This means that seven shifts are needed. Implementations were done in the programming language of Delphi 7.0 on a computer. The input is given in a .txt file version 5.1. In this chapter, the results of several runs will be presented and discussed.

7.1

Different Parameter Values

At the end of the last chapter something has been said about including breaks into the schedule. Because of the parameter in constraint 5.2 it is possible to quickly generate different solutions, which could be helpful to find schedules where breaks can be included. The parameter is the amount of time between two following tasks. If the parameter has a low value, i.e. there is little time allowed between two tasks, total walking time will increase. This may sound like a contradiction, but that is not the case. Sometimes it may be possible that a shunting driver has two consecutive tasks at the same track or at two tracks close to each other. In that case it is useful for him to stay at this track and to wait until this next task can be accomplished. If there is only little time between two tasks, there is no possibility to wait and the shunting driver will have to walk to another track further away. The result of a low parameter value is that schedules will be very compact. On the other hand, a high parameter value will result in less walking time but more waiting time between tasks. Results for different parameter values are given in the table below.

(31)

Table 1: Results for different parameter values

Constraint Walking Time Slack Time 62 223 1549 67 213 1559 72 213 1559 73 205 1567 82 205 1567 83 195 1577

Some conclusions can be drawn from this table. If the value of the parame-ters is set lower than 62 minutes, there is no feasible solution. The first feasible solution can be found when the parameter is set at 62 minutes. Secondly, the table shows that low parameter values result in higher walking times and lower slack time.

It appears that the lowest total walking time for this data set is 195 minutes. With higher parameter values, the solution does change, but the total walking time remains the same. This indicates that several different solutions can be found.

The most important conclusion when looking at this table is: it is useful to look at higher parameter values. Walking times are lower, which is the most im-portant objective of this algorithm. Another consequence is that there is more slack time which may help adding breaks to the schedules.

7.2

Output

The output given to the planner consists of seven schedules, one for each em-ployee. One of these schedules is given in the figure below. The complete result can be found in Appendix A at the end of this thesis.

Table 2: Example of schedule

(32)

Walk. Time Slack Time 0 7 0 0 0 6 0 48 0 8 0 7 3 10 4 23 0 44

Total slack time time: 00:03:14 Total walking time: 00:00:15 Total job time: 01:01:26

The parameter has been set to 83 minutes. This is a schedule for a shunting driver who will end his day of work at 01:00 hours. This is not a complete shift for this employee, since data have been used only from 22:00 hours.

At the left side of this figure are the beginning and ending times of all the tasks. The times are given in hours and minutes. Then the beginning and ending tracks are given. The next column indicates how much time it takes to com-plete a job. Then all the walking times are given and finally the amount of slack time can be found. In this way, the shunting driver has all the information he needs to do his work.

The dummy task can be found at the end of the schedule. It is the task with beginning track home7 and ending track home8. This employee can go home at 01:00 hours, so the dummy task has to be inserted at that time. His last real task is finished at 00:16 and instead of waiting 44 minutes he can go home.

7.3

Scheduling Breaks

(33)

Example 4: Scheduling a break

In the schedule of table 2 there is slack time of 48 minutes between the third and fourth task. A shunting driver needs 30 minutes plus walking time from the tracks to the canteen to include a break in the schedule. It is possible that 48 minutes are not enough because walking times between tracks and the canteen are high. Instead 50 minutes are needed. But there is also slack time between the second and third task of the schedule: six minutes. It is then possible for the planner to move the second task up to six minutes in time to create enough slack time for a break.

If there is not enough slack time in a schedule, even after moving tasks in time, it is necessary to reschedule some tasks. However this doesn’t happen a lot in practice. The way of finding a break described above is the same as the planners’at the Dutch Railways. He looks at a shift and tries to find two tasks with enough time in between to schedule a break. Sometimes he’ll have to move a task, but it is usually no problem to schedule these breaks. Reason for this, is that shunting drivers don’t have to complete all their tasks immediately after another.

7.4

Comparing with Real Life

Several runs have been made with different parameter values for constraint 5.2. To see if the algorithm is an improvement compared to the existing method, total walking times have been compared. For the real-life situation, the lists of tasks that shunting drivers receive were used. Of course only the tasks within 22:00 and 06:00 were used. This means that four shifts are only partly used. As a result walking times for the first task may be higher, since the planner took the last task into account, not the canteen. The total amount of walking time for the planner’s roster is 284 minutes. The total amount of walking time calculated by the algorithm is 195 minutes. This is an improvement compared to the real-life situation of 89 minutes or 31,33 per cent. The algorithm has found a better solution within a very short amount of time. All solutions are given within a second.

It has to be noticed that the inclusion of dummy breaks is possible because all employees are present at the beginning of the time window. Furthermore, no new shunting drivers start their shifts between 22:00 and 06:00. This makes it possible to include dummy tasks and to continue with less shunting drivers. It may lead to problems if shifts start and end at different times in a longer period. It is an advantage that during the night there is a decreasing number of shunting drivers. It appears that the most difficult aspect of the shunting crew problem is not minimizing total walking time but creating feasible rosters.

(34)

Chapter 8

Planning a Complete Day

In the last chapter, a solution was obtained for shunting drivers for one night. This had been the objective at the start of this research project. But shunting activities continue 24 hours a day. So after completing this part of the project, some attempts have been made to enlarge the data set to a 24 hour period. In this chapter these attempts will be discussed. In the next section, differences between planning for a night and planning for a 24 hour day will be discussed.

8.1

Differences between a Night and a Day

Advantages of planning a night are the small number of tasks and employees involved. This made it possible to include dummy tasks in order to obtain a feasible solution. On the other hand, the night is the busiest period for shunting drivers, as trains have to be moved and prepared for the next day. Therefore it seems a logical idea to try and enlarge the problem to a longer time frame of 24 hours. The same approach has been used as for planning of a night, i.e. making use of dummies. However this longer time frame results in some new problems. It is obvious that a lot more tasks and employees are involved when looking at a 24 hour period. The number of tasks to be completed on one day is about 250. At Zwolle there are 23 shunting drivers at work during this period. During the night, all tasks are completed by the same shunting drivers. Be-cause of this, the number of shunting drivers remains the same during this period. Three employees end their shifts sooner, but this was easily solved by including dummy tasks. Things change for a 24 hour period. During a day there are busy and calm periods. As a result, the number of shunting drivers changes constantly. The amount of employees varies from three until eight. The algo-rithm will have to make sure that the correct number of employees is available all the time.

Another advantage of planning a night is the fact that all employees are present at the beginning of the time frame. During a day, employees come and go and therefore beginning and ending times of shifts will vary for different shunting drivers. Next to dummy tasks for the end of a shift, dummy tasks for the be-ginning of a shift would have to be included. The employees who don’t start at

(35)

00:00 aren’t allowed to be active until their shift begins. For example a shift be-gins at 06:00. Then a dummy will have to be included of 360 minutes at 00:00. This shunting driver will start his shift at 06:00. The idea of using dummy tasks to begin and end shifts has been used to try and solve the shunting crew problem for a complete day. Twenty-three shifts are needed to cover all 250 tasks for one day. This would mean that 46 dummy tasks have to be used. But including all these dummies in the data set makes the problem over-constrained and no feasible solution can be found. A solution can only be found by using 25 shifts, but that still isn’t a feasible solution. In order to get a feasible shift, it has to have a correct beginning and ending time. To achieve this, the two corresponding dummy tasks will have to be assigned to the same shift. That is not possible using this algorithm. There is no decision rule available to as-sign the correct dummy tasks to the shifts. It is difficult, if not impossible, to find such a decision rule. Therefore, it may be useful to look at other ways to solve this problem. In the next section, other possibilities will be investigated.

8.2

Exchanging Parts of Shifts using Dummy

Tasks

Planners at the NS have to make adjustments to the shits. These adjustments may include one task or sometimes several tasks at once. This way of exchanging parts of shifts between shunting drivers may help in finding a better solution. There is no decision rule available to assign a beginning and an ending dummy to one shift, but it may be possible to only use beginning dummies in order to get 23 shifts and then start exchanging tasks or parts of shifts to get a feasible solution. This should result in having 23 shifts with correct beginning times. Of course, some shifts will be too long and other shifts will be too short. This may be helped by exchanging parts of shifts.

(36)

8.3

Exchanging Parts of Shifts without Dummy

Tasks

In the previous section, dummy tasks were used in order to get shifts with cor-rect beginning and ending times. The varying calm and busy periods made it difficult to get feasible shifts. Using dummy tasks resulted in some very long shifts containing almost all tasks. There seems to be no need to use any dummy tasks anymore. Keeping this in mind, a completely other way has been used to try and solve the shunting crew problem.

The problem has been solved using 23 shifts and no dummies. Because there are only real tasks involved, slack time between two tasks can be much less than before. This should result in parts of shifts where tasks are completed shortly after another. After this run, parts of shift will have to be exchanged to get a feasible solution.

For example, if the parameter is set at 25 minutes, a feasible solution exists. Exactly 23 shifts are given, but most of these shifts don’t have a correct begin-ning and ending time. Again there are some very long shifts and some short ones, but tasks are generally better distributed than before. A disadvantage is that most of the shifts can’t be assigned to an employee since some tasks are scheduled before or after this employee is working. This means that a lot of the tasks will have to be reassigned.

In the last section it was possible to generate 23 shifts without looking at be-ginning or ending times. An advantage of this approach was lower slack time between two tasks. By generating even more shifts slack time could be even more reduced. This should result in a lot of small compact shifts. These parts of shifts could be assigned to each other in order to get a better schedule.

(37)

Chapter 9

Conclusions

In this thesis an attempt has been made to solve the shunting crew problem. For this problem, shunting tasks have to be assigned to shunting drivers. Therefore the research question at the beginning of this thesis was:

Is it possible to develop an algorithm to assign shunting drivers to their jobs at a train station, while keeping the total walking time as low as possible?

After talking to a planner at the Dutch Railways, the decision was made to focus on making rosters for a night. The night has been chosen since this is the busiest period for the shunting drivers. This is also the most difficult part of the day for the planner. Requests for this algorithm were: fast, flexible and clarifying. The most important objective was to minimize total walking time for shuning drivers. The ouput should consist of feasible rosters for shunting drivers. The problem had characteristics of a traveling salesman problem. The problem has been solved as an assignment problem, which is the natural relaxation of the traveling salesman problem. The algorithm developed by Jonker and Volgenant has been used to solve the shunting crew problem. Computational result showed less total walking time than real life data. The demands described above were also met.

The problem was extended to a longer time period. This brought along some difficulties that couldn’t be solved by using the same algorithm as before. The best way to deal with a longer period would probably be to solve in two phases. The algorithm of Jonker and Volgenant could be used in the first phase to generate a number of shifts. In the second phase, feasible shifts with correct beginning and ending times will have to be generated. So the research question has been partially answered. It is possible to generate an supportive algorithm which can reduce the difficulties for a planner. But it is not possible to generate exact rosters for a longer period.

(38)

Bibliography

[1] M. Balinski: Signature methods for the assignment problem. Oper. Res. 33 (1985) 527-537.

[2] R. Barr, F. Glover and D. Klingman: The alternating basis method algorithm for assignment problems. Math. Program. 13 (1977) 1-13.

[3] D.P. Bertsekas: The auction algorithm: a distributed relax-ation method for the assignment problem. Ann. Oper. Res. 14 (1988) 105-123.

[4] R. E. Burkard: Selected topics on assignment problems. Dis-crete Applied Mathematics 123 (2002) 257-302.

[5] A. Caprara, P. Toth, D. Vigo and M. Fischetti: Modeling and solving the crew rostering problem. University of Bologna (1997).

[6] B. Dorhout: Experiments with some algorithms for the linear assignment problem. Report BW 39, Mathematisch Centrum, Amsterdam.

[7] J. Edmonds and R.M. Karp: Theoretical improvements in algorithmic efficiency for network flow problems. J.ACM. 19 (1972) 248-264.

[8] M.S. Hung and W.O. Rom: Solving the assignment problem by relaxation. Oper. Res. 28 (1980) 969-982.

[9] R. Jonker and A. Volgenant: A shortest augmenting path algorithm for dense and sparse linear assignment problems. Computing 38 (1987) 325-340.

[10] J. Kennington and Z. Wang: A shortest augmenting path algorithm for the semi-assignment problem. Oper. Res 40 (1992) 178-187.

[11] H.W. Kuhn: The Hungarian method for the assignment prob-lem. Naval Research Logistics Quarterly 2 (1955) 83-97. [12] Y. Lee and J.B. Orlin: Quickmatch: A very fast algorithm

for the assignment problem. Working Paper 3547-93. MIT, Cambridge, MA (1993).

(39)

[13] C. Mack: The Bradford method for the assignment problem. New Journal of Statistics and Operational Research 1 (1969) 17-29.

[14] N. Tomizawa: On some techniques useful for the solution of transportation problems. Networks 1 (1971) 173-194. [15] W. Hoekert: Het maken van diensten voor rangeerpersoneel

(creating schedules for shunting crew). Master’s thesis, Eras-mus University, Rotterdam, the Netherlands (2001).

[16] R.M. Lentink: Algorithmic decision support for shunt plan-ning. Ph.D. thesis, Erasmus University, Rotterdam, the Netherlands (2006).

[17] G. Di Stefano and M.L. Koci: A graph theoretical approach to the shunting problem. Electronic notes in Theoretical Com-puter Science 92(1) (2003) 16-33.

[18] R. Freling, R.M. Lentink, L.G. Kroon and D. Huisman: Shunting of passenger train units in a railway station. Trans-portation Science 39(2) (2005) 261-272.

[19] R. Haijema, C.W. Duin and N.M. van Dijk: Train shunt-ing: A practical heuristic inspired by dynamic programming. Technical Report, University of Amsterdam, the Netherlands (2005).

[20] R.M. Lentink, P.J. Fioole, L.G. Kroon and C. van ’t Woudt: Applying operations research techniques to planning of train shunting. Technical report ERS-2003-094-LIS, Erasmus Uni-versity, Rotterdam, the Netherlands (2003).

[21] P.C. Chu and J.E. Beasley: A genetic algorithm for the gener-alised assignment problem. Computers and OR 24(1) (1997) 17-23.

[22] H. Feltl and G.R. Raidl: An improved hybrid genetic al-gorithm for the generalized assignment problem. Institute of computer graphics and algorithms. Vienna University of Technology, Vienna, Austria. (2004)

[23] D. Huisman, L.G. Kroon, R.M. Lentink and M.J.C.M. Vro-mans: Operations Research in passenger railway transporta-tion. Statistica Neerlandia 59(4) (2005) 467-497.

[24] J. Riezebos and W.C.M. van Wezel: Planner-oriented design of algorithms for train shunting scheduling. Faculty of Man-agement and Organization, University of Groningen, P.O. Box 800 NL-9700AV Groningen, The Netherlands

(40)

[26] W.M.C. van Wezel and B. Barten: Hierarchical mixed initia-tive planning support. Paper presented at the Plansig 2002 workshop in Delft, the Netherlands.

Referenties

GERELATEERDE DOCUMENTEN

These three settings are all investigated for the same input set with 100 locations: one distribution center, nine intermediate points and 190 customer locations; the demand range

This is true since it is the best solution in all solution spaces cut away by the piercing cuts and the remaining part of the solution space cannot contain a better solution, since

Time: Time needed by the shunting driver to walk between two tracks given in minutes. Job Time: Time it takes to complete a task given

167 N12.04 Zilt- en overstromingsgrasland 09.06 Overig bloemrijk grasland 3.32c Nat, matig voedselrijk

In de Schenck-machine wordt mechanisch niets gewijzigd aan de ophanging van het lichaam. Er zijn echter twee potentiometers, die om beurten dienen voor de onderlin- ge

Uit andere grachten komt schervenmateriaal dat met zekerheid in de Romeinse periode kan geplaatst worden. Deze grachten onderscheiden zich ook door hun kleur en vertonen een

One may be inclined to think that these two notions are equivalent: &#34;the quicker the fire is stopped, the less peat will be burned!&#34; If so, the proof is nontrivial, because

These observations are supported by Gard (2008:184) who states, “While I would reject the idea of a general ‘boys crisis’, it remains true that there are many boys who