Letter of Transmittal
May 2, 2018
David McMurrey, Chairman
Pakistan Railway
Malir Link
Karachi, Pakistan
Dear Mr. McMurrey:
As agreed in our January 21 contract, we are submitting the report for the newly proposed automated railway management system entitled Hogwarts 420.
This report examines the problems that were previously caused by the manual management system. Furthermore, the scope and the importance of the newly proposed system are discussed in the report along with the functional and non-functional requirements. Similarly, by the end of the report the limitations are also pointed out and future extensions are also examined.
I hope you find this report satisfactory.
Sincerely yours,
Danish Noor, Chief Technical Officer
AppXone Software House
DHA Phase 5
Karachi, Pakistan
i
Abstract
This report investigates the current manual data management system of Pakistan Railway. In the discussion, computerized software for centralized customer and employee data management is proposed. The proposed solution aims to facilitate train travelers to book tickets conveniently. A software mobile application namely Hogwarts 420 implemented e-ticketing and database information management techniques to overcome the problem. This report discusses the methodology to design and implement the Android-based railway management application. Finally, the report concludes by discussing the limitations and scope of the current model that only provides the computerized solution to passenger railway system and not the freight system.
ii
Executive Summary
This report provides an analysis and evaluation of Hogwarts Express 420 railway management system application.
Objective
Hogwarts Express 420 is an Android based railway management system application that is not only developed to facilitate the administrators with train scheduling, customer management and employee management but also for easy on-the-go booking of train tickets via online payment or payment on arrival to station.
Background
Railway is major source of transport in Pakistan. It is the cheapest mode of transport with tracks that are laid all across the country but due to inefficient and out of date management system for both administration as well as ticket booking, its full potential is not being realized.
Design and Implementation
Hogwarts Express 420 is designed and developed using agile methodology of software engineering. Extensive attention to detail is given to UI/UX design which focuses on Android Material design and includes color scheme, icon placement and activity transition. The target Google API is 16 which mean that users that have smartphones which support Android 4.0 or Ice Cream Sandwich too can use the application. Firebase, which uses NoSQL, is used as database management system for data handling and manipulation. All this made the application easy on the eye, efficient and easy to use which was concluded after each testing procedure.
Testing
Black-box testing, load testing and alpha-beta testing are performed after every increment and iteration of the project. The final testing results show the removal of most glitches and 90% user satisfaction.
Future Extensions
Future extensions of the project include:
1) Route prediction to predict routes when a customer opens the application for booking a ticket.
iii
2) Train prediction to predict the train when a customer opens the application for booking a ticket.
3) Smart scheduling to control congestion flow of resources that include but is not limited to trains, staff, food and carriages.
4) Application scaling to make the application more efficient and light in terms of size and memory usage.
5) Developing Hogwarts Express 420 for Iphones.
Conclusion and Limitations
Three-tier architecture is used to improve security and to conform to modern practices. All the objectives and milestones of the project are satisfactorily and successfully achieved in the due timeframe. However, there remain some limitations at this time:
1) It is only limited and available to Android users via Google Playstore.
2) The bandwidth is limited which may overwhelm the system.
3) The system server is centrally located instead of being distributed among remote access points.
iv
1. Introduction
1.1. Motivation
Currently, the railway routes are manually printed and maintained while the trains continue to deviate from their mentioned time schedules in real time. Moreover, manual railway ticketing system causes inconvenience of scheduling, as the tickets are bought by visiting the railway station physically. In addition to the problem, there are no records of the history of tickets sold to respective travellers so there is no chance of providing better facilities to the frequent users. No future planning is possible due to lack of availability of train schedule to the citizens of Pakistan and no refund policy. The problems mentioned were observed and taken in account through visiting the Railway Station and taking interviews from the travelers. Studies have shown that a computerized e-ticketing system provides quality service to its users and increases the revenue generated by the Railway Department due to its ease of advanced planning and booking.
1.2. Statement of the Problem
Hogwarts Express 420 is a computerized railway management system that is developed to facilitate the administrators with train scheduling, customer management and employee management.
1.3. Project Description
The Railway Management System is divided into two parts, the administration panel and the customer panel. The administrator of the Railway Management System can view information about customers��� ticketing status, update train schedules, maintain employee records, and set and optimize current train routes. Due to the aforementioned facilities provided to admin of the system, the customers can view trains��� schedule and seat availability, calculate fare, book tickets in advance, and pay from their electronic devices. Along with the basic functions, customers can also check availability of seats, request and display the details of the journey. A simple-to-use interface provides additional comfort to operate the system and increase its operability.
1
1.4. Purpose
This system aims to bridge the communication barriers between the railway system and train travelers by providing the convenience to books tickets with the comfort of a mobile phone. Additionally, the system assists the administrators to schedule trains and manage employee and users effectively by easy information update facilities.
1.5. Importance of the Project
It is an important step forward in the experience of traveling via train. Implementing Hogwarts Express 420 can revolutionize the tourism industry with the added comfort of staying up-to-date on train schedules. The arduous wait and unpredictability of train departure and arrival is minimized with up-to-date train schedule availability that will assist families to receive their guests with added convenience. This project also reduces the chances of human error made by administrators while manually updating train schedules and customer booking information.
1.6. Project Category
This project is a computerized solution for railway system which implements the concepts of e-ticketing, customer-info management and employee management. The product is a mobile application that requires active internet connection.
1.7. Scope
The scope of this project is limited to the normal central Railway System only.
Further scope of this management system is as follows:
��� Freight Revenue enhancement
��� Passenger revenue enhancement
��� Improved optimized service
1.8. Planning and Project Management
The team consisted of five members who worked on the project of railway management system for 4 months. The team was divided into two groups, A and B consisting of three and two members respectively. During the first 7 days, group B documented the development phase. The three deliverables were System
2
Requirements Specifications, System Design Specifications, and the Final Report. The UML Class Diagram and Entity Relationship Diagram were then used to code the system using Object Oriented Approach.
Group A worked on backend development using Android Studio and Database server, which was completed in 3 months. Group B worked simultaneously and developed the front-end UI/UX interfaces. Group B also tested the interfaces��� desirability using alpha-beta screening process in the last 15 days.
1.9. Outline of the Report
The report further describes the work done by previous researchers in this field in the Literature Review section. Requirements of the project will be outlined next, where the different types of requirements of the project will be discussed. Then, the design and testing of Hogwarts Express 420 railway system will be documented where the methodologies to design the system and its user interface will be reported. The testing section will discuss the different strategies used to test the system. This section will be followed by the Conclusion section where the system���s limitations are discussed and the system is evaluated. Extensions of the project are also discussed in the Conclusion section. Finally, the report ends with discussion related to the possibilities of enhancing customer experience using the system.
3
2. Literature Review
2.1. Existing System
Pakistan Railway is a major source of transport in Pakistan as it is the cheapest mode of transport spanning over the entire country [1]. The lack of system���s management centrality raises numerous problems that are discussed in this section. The second problem of focus is the feasibility for customers. Customers wait for unbearably long hours when trains��� schedule change. Making physical visits to far-flung railway stations to reserve a ticket is inconvenient especially for cities like Karachi.
Firstly, a central point of customer and employee data availability does not exist as of date. The lack of data management has caused a loss in Pakistan Railway���s revenue; facing a steep decline that needs immediate attention. Seat reservation system is a complex problem. The railway network joins around 320 cities and villages of Pakistan [2]. Passengers can choose to board the train at any station and leave when they reach their destination adding to the complication of ticket booking system [3]. The probability of booking the same seat to more than one passenger is extremely high.
There are 7 classes namely AC Sleeper, AC Parlor Car, AC Business, AC Standard, First Class Sleeper, Economy Class, and Second Class [2]. Each class has its own rate that is also dependent on the distance between the two stations of passenger���s choice. Calculating ticket fare for every respective passenger on such a massive scale is beyond human capacity.
Pakistan Railway tracks are widespread that can generate substantial revenue. Utilizing the existing tracks and facilities to its maximum capacity can help the Railway industry to become self-sustainable and generate profits as well. According the yearbook of Pakistan, the number of passengers utilizing the train transport has decreased over the years; from 82.5 thousand passengers in 2008-2009 to 52 thousand passengers in 2016-2017 [4]. Poor management of ticket booking leading to poor customer services, unjustified charges of tickets sold resulting in declining revenue, and no track of train schedules depict a disastrous situation.
4
2.2. Proposed System
The complexity of the problem provided a challenge to the manual Railway management. Hence, the need for a computational process arose. The computerized management system, e-ticketing, was needed [3] to synchronize booking system across the nation. To resolve the problems mentioned in section 2.2 in the analysis of the existing system, a model customer and employee management system was developed under the Railway management system. The project, Hogwarts 420, aimed to solve the problems in the existing system by developing an Android mobile application.
For the customers, Hogwarts 420 is meant to provide information about train schedules, estimated fares for travel routes, and tickets booking with the comfort of a smartphone via simple interactive interfaces. It will require an established internet connection. The managers at Railway System can update employees��� data, train schedule, view and edit customer data.
According to [5], ���The railway traffic enjoys a unique and pivotal position in national economy offering transportations of (passengers and) goods at an affordable and economical cost���. By managing and updating train schedules and routes in real time, providing booking details and allowing customers to acquire tickets in a few clicks on a phone, it will revive the lucrative Railway industry to its maximum capacity. It shall change the trends of declining numbers of passengers and provide a promising soar in profits.
2.3. Feasibility Study
2.3.1. Technical Feasibility
Implementing the proposed idea in section 2.2 has two requirements namely software requirements and hardware requirements. For software implementation, Android Studio for mobile app development and a database server for storing information were needed. A Mobile phone/tablet with Android OS 4.0 or above was required with an internet facility for hardware. To design and implement the proposed solution, a laptop/PC with Intel Core i3 processor and 2 GB RAM was the minimum requirement. Therefore, it was technically feasible as these items were available at the time of project development.
5
2.3.2. Economic Feasibility
The project did not require any expert help that saved the costs of hiring a labor. No added equipment was acquired for project development as well. After deploying the product to replace the existing system, the regular management does not entail any checkup or maintenance costs and can be handled by the Railway system���s IT specialists. Therefore, it is economically feasible.
2.3.3. Schedule Feasibility
A timeline of sixteen weeks was available to design and implement the proposed solution. The project was successfully brought to execution after evaluating its time feasibility. The 5 group members of the team were technically capable of completing the task as they had studied the prerequisite courses of Database, Software Engineering and Object-Oriented Analysis and Design. Therefore, it was possible to finish the product before the deadline.
6
3. Requirement Analysis
3.1 Functional Requirements
3.1.1 Sign in / Sign up
3.1.1.1 Description
1. Sign up ��� Create a new account.
2. Sign in ��� Log in to an existing account.
3.1.1.2 Stimulus/Response Sequences
User will enter the id and password to login. User will enter an id and a password along with address, phone number and NIC number to create a new account.
3.1.1.3 Functional Requirements
To reserve any ticket or use the application, the user will have to log in the application.
3.1.2 Reserve a Ticket
3.1.2.1 Description
Reserve a ticket for a particular date of departure.
3.1.2.2 Stimulus/Response Sequences
Select the train and the departure time and then reserve the ticket in either the following two classes: Business class or Economy class.
3.1.2.3 Functional Requirements
To reserve a ticket the user will need to have an account and an allotted PNR number.
3.1.3 Billing
3.1.3.1 Description
Checkout after reserving the ticket (Pay for the ticket).
3.1.3.2 Stimulus/Response Sequences
7
User will confirm the booking/reservation and then follow the instructions on the screen and pay the ticket. The user will have two options: Either pay via credit card or pay at the time of delivery of the ticket.
3.1.3.3 Functional Requirements
The user will have to pay extra if the ticket is to be delivered at home because of the delivery charges.
3.1.4 Cancellation
3.1.4.1 Description
To cancel the tickets that is reserved by the user.
3.1.4.2 Stimulus/Response Sequences
The user will get an email that the ticket has been cancelled and the amount will be credited back to the user���s account.
3.1.4.3 Functional Requirements
To cancel the ticket, the user will have to cancel before 4 days to get full refund. After 4 days only half the price will be refunded.
3.1.5 Update Account Details
3.1.5.1 Description
To update or change the details of the user
3.1.5.2 Stimulus/Response Sequences
User will go on his own profile, click on his picture and a menu will appear showing details that can be updated. Then user will update any information on it and then save the new details.
3.1.5.3 Functional Requirements
To update any details the user must have an account on the software.
3.1.6 View Departure timetable
3.1.6.1 Description
View the details of the train and the departure timings and date
3.1.6.2 Stimulus/Response Sequences
8
The user can view the departure timetable before and after the reservations. Before the reservations the user can view the timetable to select his/her time to departure and which train to choose.
3.1.6.3 Functional Requirements
The user just needs an account to view the departure timetable.
3.1.7 Modify Statistics of Trains (Admin)
3.1.7.1 Description
To update any specific information about the trains such as the train id and name or the train that will be going over a specific route.
3.1.7.2 Stimulus/Response Sequences
1. Go to the update trains menu and then details will appear which can be changed.
2. Then make the required changes and save the changes.
3.1.7.3 Functional Requirements
The admin can only change the information of an existing train.
3.1.8 Add/Delete Employee (Admin)
3.1.8.1 Description
To modify, add or delete any employee who works at the railway.
3.1.8.2 Stimulus/Response Sequences
Go to the update Employee menu and then make the required changes and save the changes. If a new employee is added then the salary would also be set and the working hours of the employee.
3.1.8.3 Functional Requirements
Can only change the information of an existing employee or else employee has to be added first and can only be done by the admin.
3.1.9 Set Routes and Fares (Admin)
3.1.9.1 Description
Set the routes and fares for each of the routes.
3.1.9.2 Stimulus/Response Sequences
9
1. Go to the trains menu and select the route that is to be changed.
2. Then update the routes you require change. 3.1.9.3 Functional Requirements
The admin needs to have access to set the route and fares.
3.1.10 Add/Remove Users (Admin)
3.1.10.1 Description
To modify, add or delete any user for a particular reason.
3.1.10.2 Stimulus/Response Sequences
Go to the update User menu and then make the required changes and save the changes.
3.1.10.3 Functional Requirements
The admin needs to have access to set the route and fares.
3.2 Nonfunctional Requirements
3.2.1 Performance Requirements
As the software is pretty small, the software won���t take up much space hence, the functionalities are not so complicated. This means that the performance factor is not an issue, rather the users will experience a really good performance overall.
3.2.2 Safety Requirements
In case of any hardware failure or crashing of the application, the database will recover the data, and right at that moment the service will be restarted. In case of database corruption, backup will be available from the server.
3.2.2 Security Requirements
The user will have a user id and a password to login and make transactions. If the user forgets the password then there is an option of logging in using the NIC number. The backend of the application will only be accessible to the management which they will access using their own id and password.
10
3.2.3 Software Quality Attributes
The reliability of the overall project depends on the reliability of the separate components. The main pillar of reliability is the backup database which will store all the information and get updated to even the slightest recent changes. The system will be available at all times, meaning the user can have access to it whenever he is connected to the internet. The user will just need to login.
3.3 Business Requirements
Hogwarts 420 can help generate revenue more efficiently as it will keep a track of money flow and calculate profits accordingly. Likewise, the management system will increase cash flow as increasing customer feasibility will increase the cash flow rapidly.
11
4. Design
This section will explain our approach to the actual solution of the problem. On the whole, this project caters to 2 perspectives namely the end user and the administrator. Therefore, the design was planned while keeping this in consideration.
4.1 Problem Breakdown
The problem is to create an up-to-date platform for the railway department and its customers that is easy-to-use, facilitates quick updates and prevents misinformation.
A simple rundown of the various entities that would involve such a system gives us: user, admin, train, station, route, ticket. Further analysis of program flow revealed login classes and update classes for each relevant entity (train, route, user etc) to be essential for program logically as it would be very cluttered to keep these functionalities as part of the original entity classes and this would further ease future maintainability.
4.2 UI Breakdown
The user interface was designed while keeping in mind the target user base which would predominantly consist of middle-aged to slightly senior folks. The design was therefore kept to the bare necessities as not to overwhelm users who are not tech savvy. The color scheme was kept dark with light text as this generally yields better readability outdoors which is where we expect this application will see the most usage. The buttons and boxes are adequately sized and labeled to facilitate even the most far-sighted of folks without need of glasses (up till +2.0 powered folks should have no difficulty). Furthermore, the buttons are in obvious locations so even by pure intuition their function can be easily predicted.
Making apps for mobile phones presents the problem of dealing with a small screen size. We managed to overcome this problem by only keeping the bare minimum of data that was relevant to our requirements.
An alternative design that was being considered was creating a website and linking the application to the website i.e. creating a web app. While that would allow easier upgradeability and maintainability, it would also add a layer of unneeded complexity to the solution which would further require additional training for the relatively non-technical staff of the railway department.
12
The following sub-sections give a more specific description of the various parts that make the whole system:
4.2.1 Login System
The first system to greet the user on starting the application. This will be similar for both perspectives as it was agreed that this application would not allow usage without authentication. The user enters the required details and presses login. If he is verified then he is allowed to enter the app otherwise an error is displayed to him. The user can also opt to sign-up by tapping on sign-up at the bottom of login screen. He is then taken to the registration screen where he enters the relevant info and presses sign-up. His data is verified and he is registered into the user-base. In the case of invalid date entered, he is asked to re-check his entered data.
4.2.2 User View
This part caters exclusively to customers who are directed here after a successful login. User first selects source and destination to view routes and timings. Then he selects one of the routes and is taken to the trains��� page to select train, number of seats, and type of seat and date of departure. Now he is taken to the checkout screen to decide on his payment options.
4.2.3 Admin View
This part will cater exclusively to administrators that will manage the application. There will be train section, a passenger section and an employee���s section.
The train section will allow admin to add new trains and set routes, edit existing routes of trains, edit fares of seats, modify timings etc.
The passengers section will enable admin to view current seat allocations and payment statuses and bookings. It will also allow the user to remove customer records if needed, cancel bookings and reallocate seats to a booking.
The employees section will feature adding employees, managing salaries and removing employees as the main features.
13
4.3 Implementation Details
As mentioned earlier, this will be an android application which for best compatibility will use API level 16 i.e. will require a minimum of android version 4.0 Ice Cream Sandwich.
Google���s own material design UI is used for the interface as it is likely to provide the least compatibility issues among the various android devices.
This will use Google���s own firebase platform as our database management system. The reason is simple, Firebase contains all the necessary functionality to authenticate and manage users with very little complications. It uses NoSQL which is the latest in database technologies which is a plus point for modernity even if it isn���t that relevant to our requirements. Firebase���s email authentication will be used to register and authenticate users giving them access to the real time database which will contain the data regarding the entities discussed in Problem Breakdown section. An additional advantage of using Firebase is that it will prove cheaper than the other option of hosting a MySQL server even if the free version of Firebase does not meet our needs moving forward. Moreover, self-managed database solutions will require upgrades to security as the system evolves, but with Firebase, we can leave that to Google.
14
5. Testing
Testing was done in two phases: during development, and after completion.
Every portion of the program (function) was tested as it was developed to ensure that it did exactly what it was designed to. Different types of inputs were provided and the behavior of the system observed. If needed, modifications were made and the program was retested. Then the application was tested as a whole till the part which had just been developed to ensure that no problems are being caused in the process flow when we integrate the new function in the project.
Such a testing removed the need for white-box testing of the project after completion as all of it had already been tested during development. A simple black-box test was conducted and the application was approved for beta-testing (end-user) and implemented on-site.
The strategy proved very effective as the majority of errors were identified during the initial development phase testing. The reason was quite simple as smaller parts are easier to test extensively and developers were satisfied when they developed further that the program up till now is working correctly and efficiently.
Some major problems identified (and solved) were:
��� Failure to register users.
��� Registering new users using same credentials (essentially overwriting old users)
��� Over booking of seats
��� App not remembering credentials on re-launch.
15
6. Future Extensions of the Project
Future extensions of the project would include scheduling algorithms and machine learning algorithms for better efficiency and route predictions. Application scaling and application development for iPhone is also high on the agenda. The aim of making the system artificially intelligent is an uphill task that would require extensive research and development for algorithm and model building.
6.1 Route prediction would be introduced in the future and it would be based on regression and probabilistic models. These models would be designed and implemented in-house using the large collection of data in the database and application of extensive data science techniques.
6.2 Efficient train scheduling algorithms would be introduced to control congestion flow and resource sharing. These resources include but are not limited to trains, carriages, staff allocation and food etcetera.
6.3 Detailed data analytics would be used to design machine learning models in order to make train predictions for each customer based on past experiences and choices.
6.4 The application would be made lighter such that it takes up less space in memory and is smaller in size. Notification alerts would be added and background usage of internet via Wifi or mobile data would be reduced. This scalability would enable the application to be easily accessible to users having a low budget or mid-range smartphone. It would also encourage more users to try and use the application.
6.5 Great work and dedication is being put into the development of Hogwarts Express 420 application for the Mac OS platform ��� iPhone. The application, in its beta version, is expected to roll out for iPhone from next year and the stable version would be available via App Store in December 2019.
16
7. Conclusion
Hogwarts Express 420 was aimed to bridge the communication barriers between the railway system and train travelers by providing the convenience to books tickets with the comfort of a mobile phone. The use of state of the art technology and project implementation methods helps make Hogwarts Express 420 an assured and trustworthy companion for the customers for their travelling needs. The availability of online booking along with train selection and route selection is aimed at giving customers a more hands on experience and a greater control over their travelling experience. Three-tier architecture is used to improve security and to conform to modern practices. All the objectives and milestones of the project are satisfactorily and successfully achieved in the due timeframe.
However, Hogwarts Express 420 also confronts some limitations. First, so far the application is only available at the Google Play store for Android users. This means that the large iPhone user base is out of reach of the application and its services. Second, the initial lack of a greater bandwidth for the large user base that is expected to access the system may overwhelm the system database. Lastly, the system server is centrally located instead of being distributed among remote access points. This means that not only is the server more vulnerable to external threats but also the access to users far away from the server location would face latency. However, the future builds of the application would diminish these limitations to an about 85%.