The proposal system for using Constraint Programming

1Hiroyuki SHIMIZU, 2Hitoshi TANABE, 3Masashi YAMAMOTO JR East Japan Information Systems Company, Tokyo, Japan1; East Japan Railway Company, Tokyo, Japan2; NS Solutions Corporation, Tokyo, Japan3

Abstract We are developing a new proposal system for operation plan using Constraint Programming, and this system will be practical use. The Operation Control System and Transportation Plan System of Shinkansen will be renewal in 2008. New system has some new functions. One of them is the proposal system for train operation plan for operators when the large delay of occurs. Shinkansen has five lines - Tohoku, Joetsu, Hokuriku, Yamagata and Akita. All trains of five lines run between the and the Oomiya station. Therefore, when a train of some line is delayed, the possibility that trains of other lines are delayed is large. The transportation instruction member uses the support function to reduce the delay of trains of other lines in such a situation. We used the Constraint Programming technology to achieve this function. The new function is effective at the case of the following scenario. An earthquake, whose intensity of shaking is above a certain level, occurs around Niigata, then trains of Jouetsu Shinkansen will stop automatically. Then transportation instruction members will stop train operations between Echigo-yuzawa and Niigata. At the same time, we want to restart operation after other trains – Tohoku Shinkansen, Yamagata Shinkansen, Akita Shinkansen, Hokuriku Shinkansen and part of Joetsu Shinkansen (between Tokyo and Takasaki or Echigo-yuzawa) – are temporarily stopped, and to have it operate as much as possible according to time. However, because the trains of the Joetsu line (Unoperated trains) that leave or arrive at Niigata Station cannot operate, the delay of these trains gradually grows. The delay of other trains grows. Therefore, we should in real time change the order of leaving each station between Tokyo and Oomiya, Oomiya and Takasaki, Takasaki and Echigo-yuzawa. The new function will be used here. In a new function, unoperated trains are specified for "Reservation". Next, the operation restart time is specified. The new function automatically reschedules the order of leaving the train of each station after operating restarts at the specified time. Moreover, the result of the rescheduled plan is presented to the transportation instruction member. If the presented plan is seen, and the change is necessary, they make a change, and approve this plan.

1. Introduction East Japan Railway Company (called JRE) and JR East Japan Information Systems Company (called JEIS) are developing new Operation Control System and Transportation Plan System for Shinkansen from 2004. These two systems are parts of COSMOS – Computerized Safety Maintenance and Operation systems of Shinkansen. These will start to use at May, 2008. In our development, the hot technologies have been take, and a lot of new functions have been constructed. One of them is the proposal system. We have developed three proposal systems by constraint programming – for the rolling stock plan system, for the assignment system of rolling stock and for the rescheduling of the train operation plan. In this paper, the third system is described.

JRE Shinkansen has five lines - Tohoku line, Joetsu line, Hokuriku line, Yamagata line and Akita line. These lines are shown in figure 1. Tokyo is a starting and terminal station of all lines. About 30 km tracks between Tokyo and Oomiya is shared by trains of them. Trains are operated every four minutes between them. It is very densely. This density is an important requirement of JRE Shinkansen for passenger service. But in the viewpoint of the train planning, this is a factor to increase the complexity of planning and rescheduling. If an accident occurs in one of five lines, this may make influence of all trains of all lines. To make the influence a minimum, operators have to change the plan of train operations as soon as possible using Operation Control System.

Operators must change not only the plan of train influenced directly but also the train indirectly influenced. There are a lot of changes of order of train departures at each stations (called “SOT”). To reduce influences, they change “SOT”. The larger the influence of the accident is, the more number of changes of “SOT” increases. When they use the old manual system, they have to input all changes one by one. For example, the input window of the old manual system is shown in figure 12.

Operators have hoped for the automatic proposal system to change “SOT” in consideration of the entire balance of train plan. To satisfy this demand, JEIS started the research of the mathematical programming in 2000. We made the prototype system by constraint programming and verified the utility of it. We obtained an excellent result. The detail of this result is described to reference [1]. And we began development of this proposal system for train operation plan for practical use in 2005. We have completed its development almost.

Figure 1 : JRE Shinkansen Lines

2. Overview The composition chart of the proposal system that developed this time is shown in Figure 2. This proposal system is separated from base system. This base system has almost the same functions of the old manual system. Using only this base system, operator can reschedule the train operation plan even if this proposal system does not work. This additional method is useful measures to take a new technology in the railway system that assumes safely first.

(2.1) The proposal system for the train operation plan The proposal system has two following main functions. (a) Window to input conditions of rescheduling train plan We can input conditions of rescheduling of train plan and direct to begin or stop of processing of rescheduling on this window. (b) The engine of rescheduling train plan This engine makes the solution of change of “SOT” and platform that the train uses at Tokyo Station. This engine adopts “ILOG Solver” as constraint programming engine.

(2.2) The interface between the proposal system and the base system In this interface, the proposal system receive the array data of “SOT” of each station and conditions of rescheduling from the base system, and send the array data of changed “SOT” of each station to the base system.

Figure 2 : The composition chart of the proposal system and the base system

(2.3) The difference from the old proposal system In the old Operation Control System, we tried developing the function to automatically change “SOT” in the past. However, it did not reach at a practicable level. This past function was a part of base system. It was made by using the continuous simulation technology. On the other hand, new proposal system is made by using the discrete-event simulation. The rescheduling of train plan means the departure and arrival (called event) time of all stations of all train that will operate in the future is simulated. In new proposal system by constraint programming, for example, when time of a certain event is decided, time of other events that relates to it can be decided, or the range of time of them can be reduced. It is the constraint propagation. This simulation becomes the discrete-event simulation so that this is. Consequently, this new proposal system has the following advantages compared with the past function. (a) Improvement of processing speed by the discrete-event simulation (b) Improvement of quality of solution by constraint propagation New proposal system has become practical use for these advantages. The processing flows of new and past are shown in Figure 3.

Figure 3 : The processing flows of the old system and the proposal system

3. Model The constraint propagation is very important in this proposal system. This chapter explains about the model of train plan that is the foundation of the constraint propagation. The model of train plan consists of many events. Each event has time as an element. There are two types of events - the departure event and the arrival event. The first means that a certain train departures at station, and the second means that a certain train arrival at station. This idea is an application of the expression of the train plan by the activity announced in reference [1].

S[j] DepartureEvent[k, j] ArrivalEvent[k, j] S[2] DepartureEvent[k, 2] 列車 k ArrivalEvent[k, 2] S[1]

DepartureEvent[k, 1]

Figure 4 : The model of train plan

4. Constraints The constraint propagation is done according to the constraints defined beforehand. This each constraint consists of a mathematical expression. This chapter explains about the basic and special constraints.

(4.1) The basic constraints The basic constraints are applicable to the model of train plan of a general railway. Please refer to reference [2] for details.

(a) Constraint of departure time Time of the departure event is not earlier than planned time. (b) Constraint of arrival time Time of the arrival event is not earlier than planned time. (c) Constraint of stoppage time at station The interval more than the minimum stoppage time is necessary in the time of the arrival event and the departure event at same station. (d) Constraint of running time between stations The interval more than the minimum running time is necessary in the time of the departure event and the arrival event at next station. (e) Constraint of order of departure trains at each station Trains must depart in the order of train - “SOT” - at each station. (f) Constraint of no outstripping between stations The train depart next cannot outstrip the train previously depart between stations. The train must outstrip other train at station. (g) Constraint of order of using track of each station by trains Two or more trains cannot use the same track of station at the same time. (h) Constraint of limited number of trains between stations Trains of more limited cannot operate between stations. (i) Constraint of rolling stock The next train cannot be depart before the previous train arrives when these trains are assigned the same rolling stock.

(j) Constraint of interval time between departure trains The interval more than the minimum time is necessary in the time of the departure events at station. (k) Constraint of interval time between arrival trains The interval more than the minimum time is necessary in the time of the arrival events at station.

(4.2) The special constraints The special constraints are applicable to the model of train plan of JRE Shinkansen. The definition of the sign used to express the constraints is following.

k, k’ : The index number of trains j, j’ : The index number of stations TS k, j : Time of departure event of Train k at Station j TE k, j : Time of arrival event of Train k at Station j N : This means a constant value.

(a) Constraint of dividing of train Train of JRE Shinkansen is divided at the station. For example, at Fukushima station, a train is divided into a train for Yamagata and a train for Sendai. A sample of train plan is shown in Figure 5.

Train[k’] Train[k] TSk', j

TDk, j THA j S[j]

Train[k] TD TEk, j k, j TSk, j

Figure 5 : A sample of dividing train plan

There are three following constraints. Train k is divided into train k and train k’ at S[j] station. TS ≥TE +TD k', j k, j k, j (1) TS ≥TS +THA k, j k', j j (2)

TS ≥TE + TD k, j k, j k, j (3) TD k, j : Minimum time of stoppage at S[j] station THA j : Minimum interval time between departure trains

(b) Constraint of connect of trains Trains are connected at the station. For example, At Fukushima station, a train from Sendai and a train from Yamagata are connected. A sample of train plan is shown in Figure 6.

Train[k] Train[k’]

TEk', j

THB j TDk, j S[j]

TD Train[k] TEk, j k, j TSk, j

Figure 6 : A sample of connecting train plan

There are three following constraints. Train k and train k’ are connected at S[j] station. Only when a line of train k and a line of train k’ are the same, (4) is effective. TS ≥TE +TD k, j k', j k, j (4) TE ≥TE +THB k', j k, j j (5) TS ≥TE +TD k, j k, j k, j (6) TD k, j : Minimum time of stoppage at S[j] station THB j : Minimum interval time between arrival trains

(c) Constraint of exchanging of rolling stocks at the station When the breakdown occurs in a rolling stock at a station on the way, this rolling stock is exchanged another at this station. A sample of train plan is shown in Figure 7.

Train[k] Train[k]

S[j] S[j]

Train[k] Train[k’]

TN j TEk, j TSk', j

Figure 7 : A sample of exchanging of rolling stocks

There is a following constraint. When a rolling stock of train k is breakdown, this is exchanged another rolling stock. Passengers of train k exchange to train k’. TS ≥TE +TN k', j k, j j (7) TN j : Minimum time of exchanging rolling stocks and passengers

5. Case Study We think that operator's work will be reduced by this proposal system. As a case study, using the real data of train plan of JRE Shinkansen, we verified the old manual system and this proposal system in the same assumed situation of accident.

(5.1) The assumed situation of accident It is assumed that the earthquake happened around the Joetsu Line. And trains of Joetsu line are not operated for two hours. The detail of situation is shown in Table 1.

Conditions Details No operated Line Joetsu Line No operated section Between Jomokogen Station and Niigata Station No operated time 10 : 50 – 12 : 50 ( 2 hours ) Forecast restart time of operation 12 : 50 Table 1 : The detail of situation

The train plan used for this case study is shown in Figure 7. The train plan after two hours when we do not change is shown in Figure 8. Water color line means that a train has delay over a minute. Red square means the section of no operation. Between Tokyo and Oomiya station, the delay of trains of Joetsu line have an influences on the operation of trains of other lines. In old manual system, operators have to input many change of train plan to this system one by one. On the other hand, in our proposal system, many change of it are made automatically.

Figure 7 : The train plan used for this case study Figure 8 : The delayed train plan – Not changed “SOT”

(5.2) The verifier in the proposal system The train plan changed “SOT” by our proposal system is shown Figure 9, 10 and 11. Red line means the delayed train. Green line means the on-time train. In this solution, “SOT” of trains of Joetsu line is changed, as a result, delay of trains of Joetsu line is reduced and delay of train of other lines disappeared almost. At this time, the calculation time of the proposal system is about 5 seconds. And the turn around time from the start of execution to drawing on the screen are about 15 seconds. This satisfy our requirement to reschedule the train plan in real time.

(5.3) The verifier in the old manual system The train plan is changed manually “SOT” by operator. The dialog window to change “SOT” is shown in Figure 12. A part of many change of “SOT” is shown in Table 2. The summary of change of “SOT” is shown in Table 3. The operator had to input 93 changes of "SOT".

Figure 9 : The train plan of Joetsu Line – changed “SOT”

Figure 10 : The train plan of Hokuriku Line – changed “SOT”

Figure 11 : The train plan of Tohoku, Yamagata and Akita Line – changed “SOT”

Section of change of “SOT” “From” and “To”

Train numbers of change of “SOT”

Figure 12 : The dialog window to change “SOT”

No. Stations and trains changed “SOT” From To Change trains 1 Oomiya Tokyo Departure of “110B” after “552E” 2 Oomiya Tokyo Departure of “3010B” after “110B” 3 Takasaki Oomiya Departure of “8566E” after “522E” 4 Oomiya Tokyo Departure of “8566E” after “3010B” Table 2 : A part of many change of “SOT”

Line Stations and trains changed “SOT” From Tokyo From Oomiya From Oomiya From Takasaki To Oomiya To Takasaki To Hachinohe To Niigata or Nagano Tohoku, 26 0 4 0 Yamagata, Akita Joetsu 10 12 0 17 Hokuriku 9 15 0 0 Total 45 27 4 17 Table 3 : The summary of change of “SOT”

6. Conclusion The practical use of our proposal system is described above. The results of the case studies with real data of JRE Shinkansen found that we can get practical solutions within about 15 seconds, and proved that our proposal system is practical concerning quality of rescheduling plan and processing time because it had adopted the constraint programming. And using our proposal system, operator’s work will be reduced. This our proposal system will start operating soon as a part of the new Operation Control System for JRE Shinkansen. We think that the operator can practicably use it. In additional, we think that we can apply our system to other railways, and our system will achieve any new possibility.

Acknowledgements This development project was carried out in cooperation with JRE, JEIS and NSSOL. We would like to thank JRE Headquarter and Shinkansen Operations Control Center for helpful discussions.

References [1] H. Shimizu, H. Fujimoto, J. Takahashi, N. Nozue. ”Constraint Based Effective Railway Rescheduling System”, Proceedings of World Congress on Railway Research 2001, 309, (2001)

[2] H. Shimizu, N. Nozue. ” New Planning Technology and Railway Traffic Control System -- Railway Rescheduling System based on Constraint Programming --”, Proceedings of the 2002 Japan Industry Applications Society Conference, pp. 831-836, (2002)