Inspiration

METRO TICKET BOOKING SYSTEM

THE CURRENT SITUATION

In times of the COVID-19 pandemic our government is easing out the restrictions on movement of people and operation of various businesses in order to reboot the Indian economy. But doing so will require restarting public transportation as a large percentage of Indians don’t have private vehicles. Even though bus services have started in the capital their capacity has been reduced to ⅓ rd which results in long waiting queues. Therefore it is imperative for the metro services to start in a restricted manner.

THE PROBLEM

The problems with starting the metro services are- Limiting the no. of passengers in a given train Ensuring that stations do not become crowded Ensure social distancing in the train and on the stations Ensuring smooth transition between different metro lines

THE PROPOSED SOLUTION: AN APP FOR BOOKING METRO TRAIN TICKETS

What it does

Through the app users will be able to book train tickets at their desired departure time. The departure timings for each station would have a gap of 5 minutes(as opposed the current gap of 3 minutes). This increased gap in departure time would ensure that overcrowding situations are avoided at the stations.Also the halting time of trains at each station would be increased from 30 sec to 90 sec . The seating capacity of each train would also be restricted. In each coach of a train no more than 20 people would be seated (keeping in mind social distancing). Our booking system would keep a track of this. In order to validate the tickets and keep a check on whether passengers are adhering to their selected time and station of departure a QR code will be placed at the police checkpoints.

How I built it

I built a multi threaded python server and hosted it on GCP. Then I designed an app with an interactive UI and implemented it in flutter. The entire process of checking seat availability, find possible routes and booking the tickets is done on the server. The server receives a request from the app in the format: y04,b07,0900. y01: means station 4 on yellow line b02: means station 7 on blue line 0900: selected departure time After receiving this info the server queries the nosql database hosted on Firebase to check seat availability. From the database the server receives a list which corresponds to the train that would leave from the start station at the selected time. Each index of the list represents the number of seats occupied till the station that index corresponds to. For example station 4 corresponds to index 3(start index is 0).If there is a seat the system books it.

Challenges I ran into

HURDLES Suppose you want to go from station A to station C. But in order to do so you need to change the train at station B. Now the problem is that how do we ensure that the time you arrive at station B, the train you take from B to reach C would have any vacancy. Also if there is no vacancy then choose an alternative route.

Accomplishments that I'm proud of

What I learned

I learnt how to use firebase and hoew to host on GCP. I also learnt how to make multi threading server.

What's next for Delhi Metro COVID-19 booking system

Next I would like to add the contact tracing api to the app.

Share this project:

Updates