Anda di halaman 1dari 2

Statement of the problem

The main problem in the project is finding an algorithm that gives the set of feasible
journeys between two cities under multiple constrains (multi-constrained graph search
problem). We have to get the optimal solution for the problem given an objective
function and a set of constraints. In this chapter we are going analyze the railway
network and solve the problem of choosing the metrics of optimizing the journeys and
the metrics that will be constrains on the proposed journeys. Finally, we present the
system architecture and the implementation environment.
3.1 Railway network
The railway network includes a set of railway lines, trains, stations and time schedules.
This network is not represented by a simple graph. A simple graph is a set of nodes and
edges without self loops or multiple edges between two given nodes. In the railway
network there are self loops, which represent waiting in a station for another train to
continue a journey. Also there are multiple edges which represent multiple direct trains
between two given stations at different times.
Although the railway lines represent a static simple graph, the set of stations, train trips
and their schedules do not. At a certain time or date some trains are available, others
are not. Thus the corresponding graph is a dynamic one (time variant).
To represent the railway network with a single-edged graph, each station is represented
by many hubs. A hub is a train at a certain station at a certain time. This approach
eliminates the multi-edged property and the self loops, but there is still the problem of
the time constraint, which adds the difficulty that not all these edges are valid at any
time. Also, each edge of these edges can not be assigned a cost because some of the
constraints do not depend only on an edge between two stations, but also depend on the
previous choices of edges, as it will be declared in the next section.

3.2 Different constraints


We have to get the optimal solution for the problem given an objective function and a
set of constraints. In optimizing the railway journey we have many metrics for each
journey. Some of these metrics should be chosen for optimization and the others to be
constraints
Some of the metrics that characterize any journey are: period of the journey, cost,
departure and arrival times, number of stops, number of train exchanges in the journey,
Type of these trains and many more metrics. Using these metrics to construct a
weighted edge between each couple of hubs is difficult, because some of these metrics
do not depend only on an edge between two stations, but also depends on the previous
choices of trains, like the number of train exchanges in the journey, this number
depends on the previous choices of trains so it can not be assigned to a certain edge in
the graph as it does not depend on the couple of hubs.
Some of these metrics do not follow the transitivity rule, like the cost. Imagine a trip that
passes three hubs in that order a, b and c. The cost between the hubs (a,c) is some time
less that the sum of the costs between (a,b) and (b,c). For this reason it is difficult to
optimize the journey with respect to the cost.
As a result of these reasons, the arrival time metric is chosen to be the objective of our
optimization problem, and the other metrics are constrains on the journeys. The system
cannot ask the passenger to limits to all the set of constraints. So in order to decrease
the number of solutions that the passenger will choose from, the passenger will be asked
some questions. The questions are: the preferred departure date and time, the preferred
classes and the maximum number of train exchanges. By answering these questions
some of the solutions are discarded and the other solutions are displayed sorted by their
arrival time. As the numbers of solution can be exponential, the solutions are displayed
in batches. The user can change the batch size as required.

USE CASE DIAGRAM

UPDATE TRAIN
INFO.

REPORT GENERATION

(ADMIN)

LOGIN

VIEW RESERVATION
STATUS

VIEW TRAIN
SCHEDULES (PASSENGER)

(CLERK)
RESERVE SEATS

CACELLATIONS

Anda mungkin juga menyukai