Sei sulla pagina 1di 14

MID SEMESTER PROJECT REPORT

ON

Simulation and visualisation of passenger allocation system: first


mile and last mile metro

By

Mayank Goel
2014B4A30768P

Neethu Mariya Joy


2016A7PS0119P

Prepared in partial fulfilment of the


MATH F266(Study Project) submitted to
Dr. C.B. Gupta

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE,PILANI


Simulation and visualization of passenger allocation system: first mile and last mile metro

Acknowledgements

We would like to thank Professor C.B. Gupta for giving us an opportunity to enroll in the Study Project in
Mathematics(MATH F266). He has taken immense effort in guiding us, so that the topic is clearly
understood by us and making us fully-equipped with the knowledge so that I can implement the theory in
practical world.

2 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

Abstract

Algorithms for route planning in transportation networks have recently undergone a rapid development,
leading to methods that are up to one million times faster than Dijkstra’s algorithm. We outline ideas,
algorithms, implementations, and experimental methods behind this development. We also explain why
the story is not over yet because dynamically changing networks, flexible objective functions, and new
applications pose a lot of interesting challenges.

The aim of the study project is to improve the first and last mile in a public transport trip through the
simulation and visualization of passenger allocation system: first mile and last mile metro.

3 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

Table of Contents

1. Objective and Description of project

2. Mathematical Model and Visualisation

3. Shortest Path Algorithms

3.1 Dijkstra’s algorithm

3.2 A star algorithm

3.3 Contraction hierarchies

4. Conclusion

5. Future study

6. References

4 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

1. Objective and Description of project

Objective: To improve the first and last mile in a public transport trip by providing a direct, flexible and on
demand service to the passenger.

Statement: “What is the influence of different operational scenarios on the last mile performance of an
auto rickshaw in a demand responsive last mile transportation system? The statement can be
subdivided as:

1. What kind of model is needed to simulate the Door 2 Door system?

2. What is the demand pattern?

3. What is the influence of the network structure on the last mile performance?

4. What is the influence of relocating empty vehicles on the last mile performance?

5. What is the influence of short term pre-booking vehicles on the last mile performance?

Problem scenario in detail

Let STA be the transit rail station served by the LMTS. Consider a passenger, PAX, who boards a train
at any station (“ORIGIN”) for the purpose of traveling to STA and will then board a LMTS vehicle for
transport to her home. PAX is required to provide advance notice to LMTS of her impending arrival at
STA. The time interval between the advance notice and the actual arrival of PAX at STA is of the order
of several minutes (e.g., at least 5 or 10 minutes) to give the LMTS system sufficient time to plan the
service of PAX. The advance notice could be generated by PAX using a smart-phone when she arrives
at ORIGIN or when she enters her train to STA; as she is entering ORIGIN or while aboard the train. The
resulting message to the LMTS includes the expected time of arrival of PAX at STA (easy to predict,
once the passenger is at the ORIGIN station or aboard a train) and her ultimate destination, e.g., her
home address. If the great majority of LMTS users are subscribers whose home addresses are pre-
registered, then the only information that PAX will have to provide will be an identification number or
code.

Once the information about PAX is received the LMTS will assign PAX to one of the vehicles of the
LMTS fleet, plan the route of that vehicle so it includes a visit to the ultimate destination of PAX, estimate
the departure time of the vehicle from STA, and notify PAX accordingly. PAX will receive a message (on
her smart-phone or by tapping her card on a screen when she arrives at STA) that indicates the vehicle
she has been assigned to and the planned departure time of the vehicle from STA (e.g., “please board
Vehicle 123 which will depart from STA at 4:26 PM”). Once all the passengers assigned to a vehicle are
on board, the vehicle will execute a delivery route, visiting the destination of each of the passengers and
will then return to STA to pick up the passengers for its next delivery tour.

5 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

The interaction between the passenger and the vehicle is shown below:

2. Mathematical Model and Visualisation

The hub network


Consider a spatially embedded, hub-based network model H = (VH,EH) where VH = {1,...,N} is a finite set
of N hubs and xi ∈ R is the location of hub i in the plane. EH ⊆ V is a set of edges such that i j ∈ E if and
only if there is a direct link between hubs i and j. The travel time alongi j is given by Tij > 0.
The Demand model
Each customer that enters the system represents a demand for transport that may be described by a triple
(i, j,t), where i, j ∈ V, are the origin and destination of the demand, and t is its time of arrival. The rate at
which customers arrive at hub i at time t is λi(t). At time t, the rate at which customers arrive at hub i seeking
to travel to j is λi j(t), with λi(t) = ∑ j λi j(t), ∀i j ∈ E, t ≥ 0
Part A: Last Mile - One to Many
The problem models the reality of a group of people (the passengers) willing to share a taxi from the same
origin to different destinations. Passengers are interested in knowing the appropriate number of taxis
needed and how to visit their destinations in order to minimize the total cost.
Passenger distribution is restricted to the maximum number of people allowed by safety regulations to
travel in each taxi. The cost for each taxi includes the cost to hire the taxi (minimum fare), and the cost for
Traveling from the origin to the final destination; additional costs related to baggage, tips, or waiting times
are not considered.
The mathematical formulation of the taxi sharing problem considers the following elements:
• A set of passengers’ P = {p1, p2, …, pN}; travelling from the same origin point O to a set of
(potentially different) destination points D = {dl, d2, …, dN};

6 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

• A set of taxis T = {tl, t2, …, tM}, M<N; the maximum number of passengers in the taxi is CMAX, and
a function C: T → {0, 1, ..., CMAX} indicates how many passengers use the taxi in a trip.
• A symmetric matrix M (dimension (N +1) x (N +1)) with the distances between each one of the
geographic points in the problem (one origin and N destinations);
• A cost function cT given by the constant MF (minimum fare) and the cost by distance c (dist (O,
df).
• The problem goal is to find a planning function f: P→T to transport the N passengers in K taxis
(K<M), determining both the passengers-to-taxis assignment and the order to visit the
destinations, minimizing the total cost (TC, Eq. 1).

TC = TiMF + j=1ctic(dist(dj—i, dj))………………………………………………….. (1)

The proposed formulation minimizes the total cost. Different options can be applied to compute the cost
for each passenger, including:
i. paying for distance and equally dividing the minimum fare, each passenger j in a shared taxi ti
pays MF/C(ti)+ dist(dj—l,dj);
ii. paying a flat fare, disregarding distances, (MF+ j=1c(ti)c (dist (dj -1,dj )))/C (ti )

3. Shortest Path Algorithms

Shortest Path Algorithms have recently undergone a rapid development, leading to methods that are up
to one million times faster than Dijkstra’s algorithm.

3.1 Dijkstra’s algorithm

Dijkstra's algorithm also known as Single Source Shortest Path problem is one wherein we
compute the shortest distance from a given source vertex u to all other vertices in the graph. In other
words, given a graph G=(V,E) and a source vertex u, we find the shortest distance from u to every other
vertex v in V. This problem is not defined for negative numbers.

Consider the graph in the image below:

The above graph can be represented as a two dimensional array of n x n matrix where n represents the
number of nodes in the graph. Here n=6 and hence row index and column index vary from 1 to 5.

Let source vertex=5.

If there is an edge from i to j with weight w, then a[i][j]=w else a[i][j]=infinity.

The distance from i to i is zero. So a[i][i]=0.

7 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

The cost adjacency matrix can be represented as shown below:

The main steps involved in solving the problem can be listed as:

Step 1: Find u and d[u] such that d[u] is minimum and u belongs to V-S where S represents the visited
nodes.

Step 2: Add u to S.

Step 3: For every v which is not in S, i.e. v belongs to V-S,find

d[v]=min(d[v],d[u]+cost[u][v])

8 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

The solution table can be created as follows:

The shortest distance from 5 to all other nodes is shown below:

9 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

3.2 A star algorithm

The A* algorithm is the fastest graph search algorithm that finds the path that costs the least from source
node to goal node. (A node can be hexagon, square or circle, etc.)

In the gaming world, a node graph is a map of your gaming world, and the path that costs the least is the
shortest path; A* traverses a node graph and finds the path that costs the least

A* algorithm has properties of both Dijkstra and Best-first search. Unlike DFS and BFS, the A* algorithm
selects the node which looks most promising instead of guessing the next node.

The cost function

The cost of node F is calculated as:

F=G+H

— G is the cost that is required to reach a particular node from the source node.

— H often termed the Heuristic Value (a heuristic, informally, is like an algorithm, which helps us
determine the answer but not in a definite series of steps).It is the estimated cost from one square on the
grid to the other square, which is the goal on the grid. H being heuristic,can never be perfect and is
usually based on assumptions.

Assume that the graph or table above is a game grid where our protagonist needs to move from the
source node of the grid to the goal node.

Let’s consider that every block to the left, right, top, and bottom of the selected (parent) node is at a
distance of 1 unit. That means that each block is at a diagonal distance of √2, which is equal to 1.4.

10 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

To make things easier, multiply each value by 10, thereby converting the distance to 10 and 14 for
adjacent and diagonal nodes, respectively.

Let’s make 2 lists of open and closed nodes. Any node that is selected for the path is moved to the
closed node list. Any node that is not selected is considered to be an open node.

Assume that our protagonist is at the location source. Every block surrounding the location source has a
certain F cost, which is the obtained by summing G (which is the distance from the source node) and H
(which is the distance from the goal node).

For example, a block that is diagonally opposite to the source and marked in red would have a G value
of 14 (1.4 * 10), an H value of 10 (2*1.4*10 +10), and an F value of 52. You can compute the values for
all other blocks similarly.

After we have the cost of all the blocks, select the block which has the lowest cost. In this case, F=52
and mark it as closed.

Repeat the entire process with all the open nodes (nodes which are not selected), and select the block
with the lowest F value as you head towards your goal.

Once you reach the goal, the path traversed is the lowest possible path for a given matrix. This process
has been represented in red and purple for the problem above.

11 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

3.3 Contraction hierarchies

Contraction hierarchies can be used to generate shortest-path routes much more efficiently
than Dijkstra's algorithm or previous highway-node routing approaches, and is used in many advanced
routing techniques. It is publicly available in open source software to calculate routes from one place to
another.

4.Conclusion

So far, we have developed an understanding of the contraction hierarchies and the various algorithms
associated with route planning like Dijkstra and A star. We have implemented a model of Contraction
hierarchies. We have also developed a hub and spoke model of the entire public transportation with
metro as a backbone.

5. Future Study

Approach 1: Micro evolutionary algorithm

Evolutionary algorithms

EAs are non-deterministic methods that emulate the evolution of species in nature to solve optimization,
search, and learning problems. In the last twenty-five years, EAs have been successfully applied for
solving optimization problems underlying many real applications of high complexity.

Parallel models are a popular option to improve the efficiency and the efficacy of EAs. By splitting the
population into several computing elements, parallel evolutionary algorithms (PEAs) allow reaching high
quality results in a reasonable execution time even for hard-to-solve optimization problems. The parallel
EA proposed in this work is categorized within the distributed subpopulations model: the population is split
in several subpopulations (demes). Each deme runs a serial EA, and the individuals are able to interact

12 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

only with other individuals in the deme. An additional migration operator is defined: occasionally some
individuals are exchanged among demes, introducing a new source of diversity in the EA.

Micro-EAs provide an efficient alternative to reduce the execution times when solving on-line optimization
problems, by using small populations and restarting procedures. The main features of the proposed
parallel micro-EA to solve the taxi sharing problem are presented next.

Approach 2: Greedy algorithm

A greedy algorithm is a method that constructs solutions by making locally optimal decisions in each step.

The greedy method that minimizes cost sequentially adds the passenger whose destination is closer to
the origin in a taxi, until that taxi is full. In the case where the cost of adding one passenger to the current
taxi is greater than the one obtained by assigning a new taxi to serve that passenger request, the current
taxi is closed, and a new one is formed. The algorithm ends when every passenger is assigned to a taxi.

The greedy strategy for optimizing the delay takes the most hurried passengers (those with smaller
tolerance for delay) and assigns each of them to a new taxi. It then takes the rest of the passengers in
order of hurriedness and assigns them to the last location of the taxi that minimizes their delay. When a
taxi has as many passengers as the maximum capacity at the moment, it is considered closed. If one taxi
has more passengers assigned than the maximum capacity available it is deleted, and the passengers of
that taxi are assigned to two new taxis.

6. References

1. Robert Geisberger (1 July 2008). Contraction Hierarchies: Faster and Simpler Hierarchical
Routing in Road Networks(PDF) (Thesis). Institut für Theoretische Informatik Universität
Karlsruhe. Retrieved 2010-12-27.

2. Delling, D.; Sanders, P.; Schultes, D.; Wagner, D. (2009). "Engineering route planning
algorithms". Algorithmics of Large and Complex Networks: Design, Analysis, and Simulation.
Springer. pp. 117–139. doi:10.1007/978-3-642-02094-0_7..

3. Anderson, J. E. (1998). Control of personal rapid transit systems. Journal of advanced


transportation, 32(1), 57-74.

4. Cordeau, J. F., Gendreau, M., Laporte, G., Potvin, J. Y., and Semet, F. (2002). A guide to vehicle
routing heuristics. Journal of the Operational Research society, 512-522.

13 | Page
Simulation and visualization of passenger allocation system: first mile and last mile metro

5. Mueller, K., & Sgouridis, S. P. (2011). Simulation-based analysis of personal rapid transit systems:
service and energy performance assessment of the Masdar City PRT case. Journal of Advanced
Transportation, 45(4), 252-270

14 | Page

Potrebbero piacerti anche