TRAIN MAP: MOBILE APPLICATION FOR TRAIN MAP TO ASSIST THE PASSENGERS IN NAVIGATING EFFICIENT JOURNEY

MUHAMMAD DANIAL BIN MOHD ZAIDI

FACULTY OF INFORMATICS AND COMPUTING (INTERNET COMPUTING) UNIVERSITY SULTAN ZAINAL ABIDIN 2017

TRAIN MAP: MOBILE APPLICATION FOR TRAIN MAP TO ASSIST THE PASSENGERS IN NAVIGATING EFFICIENT JOURNEY.

MUHAMMAD DANIAL BIN MOHD ZAIDI

Bachelor of Computer Science Internet Computing (Hons)

Faculty of Informatics and Computing

Universiti Sultan Zainal Abidin, Terengganu,

MAY 2017

APRROVAL

This project report entitled Online Medical Appointment for Pusat Kesihatan UniSZA using Mobile Application was prepared and submitted by Muhammad Kamal Arif Bin Razali, matric number BTCL14037719 and in my point of view, this project fulfils a condition to be awarded a Bachelor of Computer Science (Internet Computing) with Honor in Universiti Sultan Zainal Abidin (UniSZA).

Signature: ______

Supervisor: Dr. Azrul Amri Bin Jamal

Date:

I

DECLARATION

I hereby declare that this report is based on my original work except for quotations and citations, which have been duly acknowledged. I also declare that it has not been previously or concurrently submitted for any other degree at Universiti Sultan Zainal Abidin or other institutions.

Signature :______

Name : Muhammad Danial Bin Mohd Zaidi

Date : ......

II

ACKNOWLEDGEMENT

In the name of Allah, the Most Gracious and the most Merciful, all praise is only for Him the part of documentation and draft of system for the subject, TXF 1992, Projek Ilmiah 2016/2017 are able to be finished due the time. Never forget to my kind supervisor, Dr. Azrul Amri Bin Jamal for valuable idea, time, support, advice, guidance and ideas given through the development of research until complete the part of project in the phase one. In addition, I want to dedicate my appreciation to my beloved family that support and motivate me during process finishing project. Next, thanks a lot to friends that willing to lend their hand for finish the project. Lastly, thank you to everyone who directly or indirectly involved in the process of making the system and documentation.

III

ABSTRACT

Public transportation in Malaysia is growing rapidly due to the increase of population and the requirements of people to move swiftly from one place to another. Current railway transport web in Malaysia is getting bigger from year to year. The railways lines converged and intertwined with each other. Therefore, there might be several ways to travel from one station to another. This can cause confusion for the railway users. The objectives of this study are to analyses the shortest route of train to reach destination and to design a mobile application train map to navigate the passengers giving the shortest route to arrive the destination. Next, to develop an application which provides the choices route for passengers to get the shortest route. Besides, to evaluate the distance of the shortest route or the best route of the train to passengers arrive the destination. The method being used is Dijkstra’s algorithm. It is an algorithm that used to find the shortest path from one node to another node in a graph and it apply only on positive weights [1]. Technologies being used in this project are Global Positioning System (GPS), Global System for Mobile Communication (GSM) and Android platform [4,5]. By the end of this study, it is expected that the developed application can encourage the citizens to use the train as the transportation besides assisting them to achieve their destination [2].

IV

CONTENTS

APRROVAL ...... I DECLARATION ...... II ACKNOWLEDGEMENT ...... III ABSTRACT ...... IV CONTENTS ...... V LIST OF TABLES ...... VII LIST OF FIGURES ...... VIII LIST OF ABBREVIATIONS / TERMS / SYMBOLS ...... IX CHAPTER 1 ...... 1 INTRODUCTION ...... 1 1.1 Project Introduction ...... 1 1.2 Problem Statement ...... 2 1.3 Objectives...... 2 1.4 Scope ...... 3 1.5 Expected Outcome ...... 3 1.6 Summary ...... 3 CHAPTER 2 ...... 4 LITERATURE REVIEW ...... 4 2.1 Introduction ...... 4 2.2 Rail Transportation...... 4 2.3 Algorithm for Routes ...... 7 2.4 Summary ...... 8 CHAPTER 3 ...... 9 3.0 METHODOLOGY ...... 9 3.1 Methodology for Mobile Apps ...... 9 3.1.1 Phase 1: User modelling phase ...... 9 3.1.2 Phase 2: Conceptual Design Phase ...... 11 3.1.3 Phase 3: Implementation Design ...... 12 3.1.4 Phase 4: Implementation ...... 13 3.2 Process Model ...... 14

V

3.2.1 Context Diagram ...... 14 3.2.2 Data Flow Diagram ...... 15 3.2.3 Entity Relationship Diagram...... 16 3.3 System Design ...... 17 3.5 METHOD / TECHNIQUES ...... 21 REFERENCES ...... 23

VI

LIST OF TABLES

TABLE TITLE PAGE

3.1 Data dictionary 16

VII

LIST OF FIGURES

FIGURE TITLE PAGE 3.1 The relationship between of class and activities 10 3.2 The developer is going to use is ER model for building the 11 application. 3.3 Context diagram of application 14 3.4 Data flow diagram of application 15 3.5 Entity diagram Relationship diagram 16 3..6 Interface introduction of application – Loading 17 3.7 Interface second page of application - Searching 17 3.8 Interface suggestion result after search the location 18 3.9 Interface details result after user choose the route 18 3.10 Interface for admin – Login 19 3.11 Interface for Admin – Menu to update the info 19 3.12 Interface for form admin update the info 20 3.13 The diagram shows the operation of Dijkstra’s Algorithm 22 3.14 The diagram shows the operation of Dijkstra’s Algorithm 22 3.15 The diagram shows the operation of Dijkstra’s Algorithm 23

VIII

LIST OF ABBREVIATIONS / TERMS / SYMBOLS

CD Context Diagram

DFD Data Flow Diagram

ERD Entity Relationship Diagram

ERL Express Rail Link

FYP Final year project

KTM Kereta Api Tanah Melayu

KL

KLIA Kuala Lumpur International Airport

TN50 Transformasi Nasional 50

WSDM Web Semantic Design Method

IX

CHAPTER 1

INTRODUCTION

1.1 Project Introduction

Malaysia is considered as a developing country. The Government implement Tranformasi Nasional 2050 (TN50) that had been planned to transform Malaysia into an advanced country. In order to achieve TN50, the field needed to be improved due time such as education, medical, business, services, transportation, and others. At the same time, Malaysia had been improving its public transport, and they are focusing on rail transportation. The rail transportation focused on big cities and the most important is in the Capital of Malaysia, Kuala Lumpur. Among rail transportation are , , Light Rapid Transit, and Monorail [2]. Commuter Rail operates their service at two line namely and . The Rapid Transit provides its services at - . Ampang Line and are handled by Light Rapid Transit. Monorail, serves the KL Monorail Line which located in the city center. The Airport rail link provides the transportation from KL Sentral to KLIA by KLIA Transit Line [2]. There are several issues arise with the advancement of cities train transport. The rail network become more complex. So, many procedures needed to be solved before using the trains, and as a sequences the fee also increases. There are also users who do not know how to use the train, some users do not know where the train will stop, and where to change train in order to get to their desired location. These users would ask person at counter tickets in to solve their problems [6]. In conclusion, I will develop the mobile application is to navigate train passengers to get the best route to reach their destination and simultaneously it can encourage the citizens to use the train as the transportation.

1

1.2 Problem Statement

There is some problem statement can identify in the issue of advancement of cities train transport. The rail network become more complex and have a few lines can bring user to their location [3]. At the same moment, the number of train lines and station increases. The users who not familiar use train will faced with some problems such as the users waste their energy, time and money because lost as a sequences fee also increases.

The current system causes some of procedure need to settle before using the trains, for example the user need to know the table info time of train operation, the user need to choose the class of train and the user must buy the ticket for exactly location.

Furthermore, there are also users who do not know how to use the train, some users do not aware where the train will stop, and where to change train in order to get to their desired location. These users would ask person at counter tickets in to solve their problems.

1.3 Objectives

The objectives of this study are:

• To analyse the shortest route of train to reach destination [7].

• To design a mobile application train map to navigate the passengers giving the shortest route to arrive the destination.

• To develop an application which provides the choices route for passengers to get the shortest route.

2

1.4 Scope

The scopes of this study divided into 4:

1. Admin. The role of an admin is login account of the application to make changes to the map by adding or deleting routes and maintain the application. 2. User. The user can search the location where they want to go and get the shortest to their destination. 3. Android Based. This application will develop by using Android IDE and for sure use Android OS. This application will be used in mobile devices. 4. Global Positioning System (GPS) is technology to display the location of maps. Global System for Mobile Communication (GSM) is a digital cellular technology is to transmit mobile voice and use data services to transmit data.

1.5 Expected Outcome

The expected outcomes of the Train Maps application after completing the development is user can get the shortest route to reach the destination. At same time, user also can reduce their time travel to destination by using this application. These results represented to achieve the objective project which is to design a mobile application train map to navigate the passengers giving the shortest route to arrive the destination. Furthermore, the result that will be expected after finish project development is the application will assist the user to keep on track during their journey. This will avoid user from lose during their journey to arrive destination.

1.6 Summary

The details introduction of Train Map: Mobile Application for Train Map to Assist the Passengers in Navigating Efficient Journey has been discussed in this chapter. The sub chapter of the chapter such as objectives, problem statement, scope and the project planning of the system are clear mentioned.

3

CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

This topic focused on the work or research that relate directly either indirectly to the project. This topic also important to develop project. The reason is it contains a lot of benefit information that will be used in the development project process. This topic can assist by understanding on the system details while help in determining the best approach during the development system. Besides, this topic also help in analyzing information of train, station, routes, techniques will be used and existing system.

2.2 Rail Transportation

2.2.1 Kereta Api Tanah Melayu (KTM) Commuter Rail operates their service at Seremban line and Port Klang line. At Seremban line operates from Rawang station to Sungai Gadut which is the distance is 153 km and 27 train stations exist who in charge by KTM komuter. The Seremban Line also provide another route from Rawang station to Tanjung Malim station and the train stop six stations over 22 km.

2.2.2 Rapid Transit

The Rapid Transit provides the transportation at Sungai Buloh- Kajang Line. Theirs provide services from to Semantan station which has 14 station train will stop. who company manages the Rapid Transit service operates smoothly.

4

Next, at Ampang Line and Kelana Jaya Line is handled by Light Rapid Transit who manage by Rapid Rail too. At Ampang Line, there operate the train between Sentul Timur and Ampang will go through 18 stations over 15 km. Another path, train operates from Sentul Timur to Sri Petaling which is the distance 15 km over 18 stations. At Kelana Jaya line provide train from Gombak to Kelana Jaya. There have 23 stations will stop over 29 km, and 13 stations over 17 km train will go through from Kelana Jaya to Putra Heights.

For Monorail, they give the services at KL Monorail Line. There are operated by Rapid Rail. It starts from KL Sentral station to Titiwangsa station. The total distance starting point to ending point is 8.6 km over 11 stations.

2.2.3 Airport Rail Link

Last, Airport rail link provide the transportation at KLIA Express Line and KLIA Transit Line. There are operated by ERL. KLIA Express Line provides service from KL Sentral to KLIA without a stop over 75 km. Then, KLIA Transit Line same service with KLIA Express Line but it stops at five stations [2].

2.2.4 Existing System (www.mymrt.com.my)

There has some system exist for assisting the passengers to use the train as transport. First, the system has been developed is www.mymrt.com.my which is web base platform. This system only focuses on their train service which is mass rapid transit (MRT). Everything about MRT they tell in their systems such as timetable operation of the train, duration ticket counter open, the image of maps, News about MRT Corp Sdn Bhd, and etc. There help the passengers by delivery information through the system. For example, they give an image of train travel and the passengers can download it. They do not provide the navigational map to the user.

5

2.2.5 Existing System (www. myrapid.com.my)

Secondly, the system has been developed is www.myrapid.com.my which is web base platform too. This system is almost the same with the system in Japan which is the transit.yahoo.co.jp system. It is a good system to plan the passenger journey by using public transportation. The reasons are the system can view the shortest time to arrive the destination, the least transfers that focus on the old passengers or disabled person, time of train depart from the station and the price of tickets. There can guide the passengers to reach the destination with many choices.

2.2.6 Existing Application (Malaysia Kuala Lumpur Transit application)

Next, Malaysia Kuala Lumpur Transit application that Android mobile base system. It is only focused on Kuala Lumpur railways. The application guides the passengers to arrive destination correctly which the result will tell the passengers should change the train at certain stations. Then, the application also displays the price of the ticket of that train trip and the total of overall the journey. But there is not notice the time to passengers.

2.2.7 Existing Application (Malaysia Map for LRT & Train application)

Besides, Malaysia Map for LRT & Train application that had been developed the Android base application. There is only focused on Kuala Lumpur railways too. There provide the HD quality maps and updated the railway. The application also provides the features pin, move, and functionality of zoom when using the maps. There also has offline KL Train map who passengers do not have Wi-Fi or data cellular. But there is not notice the time too and price of the ticket.

6

2.3 Algorithm for Routes

Nowadays, there emerged the method to get the best path or shortest path in the travel. There is an algorithm that suitable for this project which are A* algorithm, Haversian algorithm, and Dijkstra’s algorithm. So, some of the explanation will be to choose the suitable algorithm [7,8,9,10].

A* is an algorithm that can solve heterogeneity problems and it is always used for pathfinding. It can suggest most probable alternative to solve the problems. Dijkstra’s algorithm means to search the shortest path between points, the weight or length of a path is calculated as the total of the weights of the edges in the path. There generates tree to display the nodes, and it takes the edge with least weight from tree to find the shortest path [8]. The Haversian algorithm is a formula to measure the large circle distance between two points on a sphere that latitude and longitude are given.

In this project, I prefer to use Dijkstra’s algorithm to implement. The reason is Dijkstra algorithm is always able to find a shortest, giving the optimal path, a more general result which is it not restricted to acyclic graphs requires that weights on edges are positive the algorithm often does not have to investigate all edges [11]. However, I propose my TrainMaps application to assist train passengers to get the best route to reach their destination.

7

2.4 Summary

In conclusion, literature review gave details understanding or assumption on the developer’s documentation. It involves some of studies and research done by other people and journals which is related to the project.

The next will cover the project methodology phase of system. The topic will mention the methodology that will use for developing the system. It also includes discussion about system design of project. There are context diagram (CD), Data flow diagram (DFD), entity relationship diagram (ERD) and others.

8

CHAPTER 3

3.0 METHODOLOGY

3.1 Methodology for Mobile Apps

In order to develop “TrainMap” apps, we are going to use WSDM methodology. This methodology consists of four following phases which are user modelling, conceptual design, implementation design and the actual implementation.

3.1.1 Phase 1: User modelling phase

Consists of two sub-phases: user classification and user class description. During this phase, the development we supposed to interview or observation the clients and get the requirement about what they needed in the application. We are going to concentrate on the potential users of this application. Our designers are going to identify as much information as possible.

3.1.1.1 User classification

In this step, the developer is going to identify the audience of this application. One of the way is by looking at the organization or the process in which will be built. Each activity could need people who are the potential user of the application. Each process or organization can be divided in a number of activities and each activity involve people. If we apply such an environment analysis to our simplified example, we can distinguish the following activities:

9

❖ Provide maps for navigating user to use the train ❖ Provide the shortest route for user reach the destination

If the developer identifies the types of people involved in each activity, we can define the following user classes:

❖ Train’s users include admin ❖ Developer ❖ Other users

Other users Provide the shortest route for user reach Train’s users the destination

Provide maps for

navigating user to use Developer the train

Figure 3.1: The relationship between of class and activities.

3.1.1.2 User class description

After developer identified the classes of users, the user classes are analyzed in more detail. Because of the different user class requirements, the information requirements also will be different. The same information requirements may same for all users from a user class potential but may diverge on how the information should be conveyed to the developer.

For example, users of train can search their location the destination through the application and the application give the suggestion the route to them arrive the destination. The application train map can display the result without registered the profile of user.

10

3.1.2 Phase 2: Conceptual Design Phase

This phase consists of two sub-phases, the object modelling and the navigational design. During object modelling the information requirements of the different user classes and their perspectives are formally described.

3.1.2.1 Object Modelling

User object models(UOM) are done by building conceptual object models for the different user classes. UOM has been designed based from the view of users in a user class and will cover part of total set of business objects of the organization. In conceptual model, it described the relationship between object types, rules or constraints on the object types and the relationships. The method we are going to use is ER model for building “Train Maps” apps.

Figure 3.2: The developer is going to use is ER model for building the application.

11

3.1.2.2 Navigational Design

In this phase, a Conceptual Navigation Model is constructed. The Navigation Model comprises between a few of navigation tracks, one for each perspective (POM). A navigation track expresses how users of a specific point of view can explore through the accessible information. This is portrayed in terms of components and connections. The developer recognizes information components, navigation components and external components. The navigation track consists of three layers which are top layer, middle layer and lowest layer. 1.The context layer – navigation track starts with a navigation component with the same name as the perspective. For our environment is the Home page 2.The information layer – information component or an external component in the navigation track. The choice between information component and external component is determined by the availability of information 3.The navigation layer – connects context layer and information layer.

3.1.3 Phase 3: Implementation Design

In this phase, the designer had been analyzed many mobile apps and web system to ensure the design of application feel like mobile apps. The goal is created in such a consistent, pleasant and efficient and taste for conceptual design made in the previous phase. There is a lot of literature on aspects of mobile apps design. The results of design implementation are a Model Implementation. Information package in the correct size chunks. Humans can process only a limited amount of information at a time. Therefore, the amount of information on any page cannot be flooded users. In addition, it also did not take down a long time. In WSDM, mobile apps developers can be decided to gather the components connected to the links and to represent them on one page. Navigation components can be implemented in a way (ordered or unordered) list. Use the index page

12 and the index page links to every page of the entire mobile apps, it provides a point for users to find the pages in this site. The index page may be viewed as a simplified page. We propose to replace the index page by representatives’ mobile apps concept model, which not only allows users to find information but also help the user to build a mental model of the site. Use the context and signal information and clear statement on target and also on destination pages can help users to see immediately whether the information about the page is interesting. We need to avoid creating a page that has no signal. The guidelines are particularly suit WSDM. A mobile apps built with WSDM consists of several cruise tracks, one for each perspective. Each perspective has a different audience and a different purpose. Mobile apps designed by WSDM centered around the concept of user perspective. Users who follow a link from the start of the cruise tracks usually stay within a perspective. However, the page may contain external links and interperspective coherency. Links between pages on different cruise track. It is good to practice use different navigation signals to link to external pages and in perspective link. In this way, users will have realized he left perspective or local sites. It should be noted that the design of implementation may depend on the implementation of the selected environment. Limit execution language (such as XML) can interfere with this process.

3.1.4 Phase 4: Implementation

The last phase in this methodology is the actual realization of the Web site using the chosen implementation environment. For example, for an Android based application means that the implementation model must be converted into a set of files containing XML source code. This step can be largely automated using available tools and environments for assisting in Android implementations such as using Android Studio.

To improve maintainability of the user information details, the database will be link with the project. The SQLite will be using in order to create a database in android development. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation.

13

3.2 Process Model

3.2.1 Context Diagram

Figure 3.3: Context diagram of application

14

3.2.2 Data Flow Diagram

Figure 3.4: Data flow diagram of application

15

3.2.3 Entity Relationship Diagram

Figure 3.5: Entity diagram Relationship diagram

Table 3.1: Data dictionary

Entity Attribute Explanation Data Type Size Remark User user_id Identification of user INT 10 PK Admin admin_id Identification of admin INT 10 PK admin_name Name of admin VARCHAR admin_pwd Password admin to log in VARCHAR 50 Encrypted application Station station_id Identification of station INT 10 PK station_name Name of station VARCHAR 50 railway_id Identification of railway INT 10 FK Railway railway_id Identification of railway INT 10 PK railway_name Name of railway VARCHAR 50 railway_distance Distance of railway from VARCHAR 4 starting point to ending point Route route_id Identification of route INT 10 PK route_info Info of route VARCHAR 50

16

3.3 System Design

3.3.1 Interface introduction of application - Loading

Figure 3.6: Interface introduction of application – Loading

3.3.2 Interface second page of application - Searching

Figure 3.7: Interface second page of application - Searching

17

3.3.3 Interface suggestion result after search the location

Figure 3.8: Interface suggestion result after search the location

3.3.4 Interface details result after user choose the route

Figure 3.9: Interface details result after user choose the route

18

3.3.5 Interface for admin – Login

Figure 3.10: Interface for admin – Login

3.3.6 Interface for Admin – Menu to update the info

Figure 3.11: Interface for Admin – Menu to update the info

19

3.3.7 Interface for form admin update the info

UPDATE

Figure 3. 12: Interface for form admin update the info

20

3.5 METHOD / TECHNIQUES

For Train Maps application, method that developer use to achieve the objectives is Dijkstra's algorithm. Meaning of Dijkstra’s algorithm is an algorithm that used to find the shortest path from one node to another node in a graph and it apply only on positive weights. Based on history, Dijkstra ‘s algorithm is created by computer scientist from Dutch, Edsger Dijkstra in 1956 and published in 1959. This algorithm is a graph based searching algorithm to solve the single source shortest path problem and it common used in routing [1,7,8,9,10,11,12,13]. In Train Map application should be assisted the users to get the shortest path from initial location to destination. As we know, the railways are fix distance but the railways have a lot of that user can change the train to get shortest distance of destination through the application. This algorithm will be able to help the user to reach destination in short path.

14

9

7

Figure: 3.13: The diagram shows the operation of Dijkstra’s Algorithm.

Dijkstra's algorithm to find the shortest path between a and b. Node 1 find the distance to node 2, node 3 and node 6. The distance node 1 to node 2 is 7, node 1 to node 3 is 9, and node 1 to node 6 is 14. Circle red is mark visited when done with neighbors.

21

14 11 22 20 9 9

7 7

Figure: 3.14: The diagram shows the operation of Dijkstra’s Algorithm.

Next, comparison between node 2 reach at point b and node 3 at reach point. The shortest distance will be chosen and update the lowest distance to node visited.

20 11

20 9

7

Figure: 3.15: The diagram shows the operation of Dijkstra’s Algorithm.

The result of shortest path from pint a to point b is node 1,3,6,5 (20) < node

1,3,4,5 (26).

22

REFERENCES 1. Pooja Singal, R.S.Chhillar (2014). Dijkstra Shortest Path Algorithm using Global Positioning System. International Journal of Computer Applications. 2. Syahriah Bachok, Mariana Mohamed Osman, Ummi Aqilah Khalid, Mansor Ibrahim (2013). Commuters’ Perception on Rail Based Public Transport Services: A Case Study of KTM Komuter in Kuala Lumpur City, Malaysia. Journal of the Malaysian Institute of Planners 3. Todd M. HUNTIMER, Coleen LIEBSCH (2014). Train Detection Systems & Methods. Google patent, US 9227642 B2. 4. Roger D. Burns, Susan Elliott-Bryan, David B. Turner (1992). Rail Vehicle Positioning System. United States Patent, 5,129,605. 5. K. Siva Rama Krishna, K. Veerraju Chowdary (2014). GPS/GSM Based Train Tracking System – Utilizing Mobile Networks To Support Public Transportation. International Journal Of Innovative Research & Development. 6. David López, Angélica Lozano (2014). Techniques in Multimodal Shortest Path in Public Transport Systems. Transportation Research Procedia. 7. Mariusz Dramski (2012). A comparison between Dijkstra algorithm and simplified ant colony optimization in navigation. Scientific Journals Maritime University of Szczecin. 8. Xiao Cui and Hao Shi (2011). A*-based Pathfinding in Modern Computer Games. IJCSNS International Journal of Computer Science and Network Security. 9. Proof for Dijkstra’s Algorithm. Retrieve from web.cs.ucdavis.edu/~amenta/w10/dijkstra.pdf. 10. Yizhen Huang, Qingming Yi, Min Shi (2013). An Improved Dijkstra Shortest Path Algorithm. Proceedings of the 2nd International Conference on Computer Science and Electronics Engineering. 11. Harika Reddy (2013). PATH FINDING - Dijkstra’s and A* Algorithm’s. 12. Yi-zhou Chen*, Shi-fei Shen, Tao Chen, Rui Yang* (2014). Path Optimization Study for Vehicles Evacuation Based on Dijkstra algorithm. Elsevier Ltd.

23

13. Amani Saleh Alija (2015). Analysis of Dijkstra’s and A* Algorithm to Find the Shortest Path.

24