Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisashwinraj authored Aug 26, 2024
1 parent 277af9d commit 7c2bdab
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![CroMa Readme Banner](https://github.com/thisisashwinraj/CroMa-Crowd-Management-System/blob/main/assets/CroMa_Banner_Light.png#gh-light-mode-only)
![CroMa Readme Banner](https://github.com/thisisashwinraj/CroMa-Crowd-Management-System/blob/main/assets/CroMa_Banner_Dark.png#gh-dark-mode-only)

CroMa is an android application that uses a python backend hardware, built on raspberry pi integrated with a firebase real-time database and flutter framework for efficient crowd management in public transports such as buses & taxies. The hardware is effectively a handheld ticketing machine used for printing tickets, and collecting selective information about passengers. After data processing, the mobile application displays the output to the users. No LogIn's required.
<p align='justify'>CroMa is an android application that uses a python backend hardware, built on raspberry pi integrated with a firebase real-time database and flutter framework for efficient crowd management in public transports such as buses & taxies. The hardware is effectively a handheld ticketing machine used for printing tickets, and collecting selective information about passengers. After data processing, the mobile application displays the output to the users. No LogIn's required.</p>

The project development started in April 2022 as a group project and has been licensed under the [Creative Commons Attribution - Non Commercial - No Derivs License](https://github.com/thisisashwinraj/CroMa-Crowd-Management-System/blob/main/LICENSE) (CC-BY-NC-ND). The passenger data collected, is maintained as per the Privacy Policy. The pull requests are maintained by a team of [contributors](https://github.com/thisisashwinraj/CroMa-Crowd-Management-System#all-contributors). Learn more about CroMa software [here](https://github.com/thisisashwinraj/CroMa-Crowd-Management-System#user-installation-and-working)

Expand All @@ -19,13 +19,18 @@ The project development started in April 2022 as a group project and has been li
All relevant updates, and stable versions are made available in the [~/stableVersion](https://github.com/thisisashwinraj/CroMa-Crowd-Management-System/tree/main/template_files/stable_versions) sub-directory. Some subdirectories may be sensitive for the project and may trigger review requests, when pull requests touch these files. Github handles with commit rights made available in the [~/Template Files/CODEOWNERS](https://github.com/thisisashwinraj/CroMa-Crowd-Management-System/blob/main/template_files/CODEOWNERS) are responsible for reviewing such changes

# User Installation and Working
CroMa is a firmware solution that provides commuters with real-time information about public transits(such as buses) including real-time tracking, estimated time-of-arrival and the seat occupancy. This solution is an interworking of two major components: a [handheld ticketing machine](https://github.com/thisisashwinraj/CroMa-Crowd-Management-System/tree/main/hardware_files) and a [mobile application](https://github.com/thisisashwinraj/CroMa-Crowd-Management-System/tree/main/android). CroMa v1.0 offers support for only buses.

The hand-held ticketing machine is a micro-controller-based system used for generating billing tickets and collecting, saving, and generating daily reports and summaries. Our version of the hardware is additionally equipped with a GPS module for tracking the location of the bus. The device is to be used by conductors, and/or clippies for issuing tickets to the passengers. When new passengers board this bus, their details such as their start location, total luggage in the bus, their intended destination, & the total number of passengers is collected for issuing the tickets. These details are collected, processed and transmitted to the [FireBase RT database](https://firebase.google.com/products/realtime-database) by the hand-held ticketing machine. For passengers using a monthly, or yearly bus pass, a QR code or a unique alphanumerical code may be used to update the software.
<p align = "justify">
CroMa is a firmware solution that provides commuters with real-time information about public transits(such as buses) including real-time tracking, estimated time-of-arrival and the seat occupancy. This solution is an interworking of two major components: a [handheld ticketing machine](https://github.com/thisisashwinraj/CroMa-Crowd-Management-System/tree/main/hardware_files) and a <a href="https://github.com/thisisashwinraj/CroMa-Crowd-Management-System/tree/main/android">mobile application</a>. CroMa v1.0 offers support for only buses.
</p>
<p align = "justify">
The hand-held ticketing machine is a micro-controller-based system used for generating billing tickets and collecting, saving, and generating daily reports and summaries. Our version of the hardware is additionally equipped with a GPS module for tracking the location of the bus. The device is to be used by conductors, and/or clippies for issuing tickets to the passengers. When new passengers board this bus, their details such as their start location, total luggage in the bus, their intended destination, & the total number of passengers is collected for issuing the tickets. These details are collected, processed and transmitted to the <a herf="https://firebase.google.com/products/realtime-database">FireBase RT database</a> by the hand-held ticketing machine. For passengers using a monthly, or yearly bus pass, a QR code or a unique alphanumerical code may be used to update the software.
</p>

![CroMa App](https://github.com/thisisashwinraj/CroMa-CrowdManagementSoftware/blob/main/assets/CroMaAppUI.png)

The passengers data is maintained in the FireBase Real-Time database for synchronizing this data across devices. This data is structured as a JSON tree with the data points stored as JSON objects. The parent nodes represents the Bus Id (unique to each bus) and the real-time data associated with the bus (including available seats, & current location, etc) are maintained as nested nodes. Whenever a new ticket is issued the database is updated. The algorithm ensures that the database is updated when passengers de-board the bus. The data maintained in this [FireBase RT database](https://firebase.google.com/products/realtime-database) is then made available to be fetched by the android mobile application, and the relevant machine learning models, and API's.
<p align = "justify">
The passengers data is maintained in the FireBase Real-Time database for synchronizing this data across devices. This data is structured as a JSON tree with the data points stored as JSON objects. The parent nodes represents the Bus Id (unique to each bus) and the real-time data associated with the bus (including available seats, & current location, etc) are maintained as nested nodes. Whenever a new ticket is issued the database is updated. The algorithm ensures that the database is updated when passengers de-board the bus. The data maintained in this <a href="https://firebase.google.com/products/realtime-database">FireBase RT database</a> is then made available to be fetched by the android mobile application, and the relevant machine learning models, and API's.
</p>

<p align = "justify">
The android app is the end-user's application that allows the user to compare various transit options, and choose the most ideal option that fits their needs. The users, start with opening the application, and making a query, by entering their starting point, intended destination, and the type of bus (fast, SPF, express, deluxe, etc). No LogIn is required for using the android mobile app. The application looks up into the data base, and displays the location of buses in real-time within a pre set radius that passes through both their starting point and the destination entered by the user. The bus markers with red colour indicates heavy rush, while the green color indicates light occupancy. On tapping a given bus marker, the application displays more details about that bus to the users including, their estimated time of arrival, seat occupancy & ETA of buses on same route etc. Users can compare multiple options to make an informed decision
Expand Down Expand Up @@ -59,31 +64,29 @@ CroMas development take place on [GitHub](https://github.com/thisisashwinraj/Cro
└── .mailmap
```

<p align='justify'>To run the application, start debugging by clicking **Run > Start Debugging** from the main IDE window (or press F5). If you are using [VS Code](https://code.visualstudio.com/), you should see a set of Flutter specific entries in the status bar, including a [Flutter SDK](https://docs.flutter.dev/get-started/install) version and a device name (or a message displaying No Devices). The Flutter extension automatically selects the latest device connected. However, if you have multiple devices/simulators connected, click device in the status bar to see a pick-list at the top of the screen. Select the device, you want to use for running, or debugging, and finally, run this application.</p>
<p align='justify'>To run the application, start debugging by clicking <B>Run > Start Debugging</B> from the main IDE window (or press F5). If you are using <a href='https://code.visualstudio.com/'>VS Code</a>, you should see a set of Flutter-specific entries in the status bar, including a <a href='https://docs.flutter.dev/get-started/install'>Flutter SDK</a> version and a device name (or a message displaying No Devices). The Flutter extension automatically selects the latest device connected. However, if you have multiple devices/simulators connected, click device in the status bar to see a pick-list at the top of the screen. Select the device, you want to use for running, or debugging, and finally, run this application.</p>

# CroMa - Under the Hood

<p align='justify'>The software project aims to use human-centric technology to take public transportation & crowd manangement one step ahead. We used <a href='https://en.wikipedia.org/wiki/Rapid_application_development'>Rapid Application Development model (RAD) to design several firmware components developed simultaneously as if they were smaller individual projects. These are then assembled into the main working prototype.</p>
<p align='justify'>The software project aims to use human-centric technology to take public transportation & crowd manangement one step ahead. We used <a href='https://en.wikipedia.org/wiki/Rapid_application_development'>Rapid Application Development model (RAD)</a> to design several firmware components developed simultaneously as if they were smaller individual projects. These are then assembled into the main working prototype.</p>

### Defining the Problem Statements
<p align='justify'><B>Problem Statement 1:</B> Ramesh is a busy executive who needs to reach his office on time and decide whether to take a public bus for commuting or use his personal vehicle as he stays very far away from the office & want to save money</p>
<br>
<p align='justify'><B>Problem Statement 1:</B> Ramesh is a busy executive who needs to reach his office on time and decide whether to take a public bus for commuting, or use his personal vehicle as he stays very far away from the office & want to save money</p>
<p align='justify'><B>Hypothesis:</B> If Ramesh uses CroMa for tracking the public buses available at his nearest bus-stop then he can plan his shuttle accordingly & will reach his desired location at time, without needing to travel in an alternate public transport.</p>

<p align='justify'><B>Problem Statement 2:</B> Vartika is a seven month pregnant women who needs to board a long distance bus with ample seats available because she is agoraphobic, and her physical conditions does'nt allow her to stand for longer duration</p>
<br>
<p align='justify'><B>Hypothesis:</B> If Vartika uses CroMa, for checking the buses in her proximity with less occupancy, then she can make an intelligent choice of the bus she wants to board, & can grab a seat, without needing to worry about standing for long.</p>

### The Logic that Powers the System
<p align="justify">The system's hardware cycle starts with the bus conductor initializing a new trip on the handheld ticketing machine by entering the Bus ID. The machine is then configured with the routes associated with that Bus ID and reflects the pre-set values for necessary passenger data variables, including the total number of available seats, the current location, and the total number of passengers on the bus. The ticketing machine now displays options for printing tickets, showing trip details (used by conductors), and displaying the total fare collections during the trip. More options will be added in the future.</p>
<p align="justify">The system's hardware cycle starts with the bus conductor initializing a new trip on the handheld ticketing machine by entering the Bus ID. The machine is then configured with the routes associated with that Bus ID and reflects the pre-set values for necessary passenger data variables, including the total number of available seats, the current location, and the total number of passengers on the bus. The ticketing machine now displays options for printing tickets, showing trip details (for use by conductors), and displaying the total fare collections during the trip.</p>

<p align='justify'>When a new passenger boards the bus, the bus conductor issues them a ticket after collecting information about their point of origin, intended destination, and the number of co-passengers, if any. In addition to simply printing tickets, the proposed ticketing machine sends this data to the Firebase real-time database, where the values for these three parameters are updated. Bus location data are collected by the GPS module. For passengers using concession cards, a QR code scanner is used to ensure the authenticity of the cardholder and proper updating of the data.</p>

<p align='justify'>The application calculates the crowd on a bus in real time using a global list variable called terminal.crowd_manager. This list represents the bus stops along a route (and is thus initialized with the same length as the number of bus stops in the route), with each element set to zero, indicating no passengers at the start. When a ticket is issued, the print_ticket function increments the corresponding boarding point element in terminal.crowd_manager by the number of passengers boarding. It then decrements the alighting point element by the same number, reflecting passenger deboarding. The refresh_real_time_database function calculates the total number of passengers on the bus by summing the values in terminal.crowd_manager up to the bus's current stop. This information, along with available seat count and load factor, is then updated in the Firebase real-time database, ensuring that the user app displays accurate real-time crowd load information. The total bus fare is calculated by adding variable fare to the fixed fare</p>
<p align='justify'>The application calculates the crowd on a bus in real time using a global list variable called terminal.crowd_manager. This list represents the bus stops along a route (and is thus initialized with the same length as the number of bus stops in the route), with each element set to zero, indicating no passengers at the start. When a ticket is issued, the print_ticket function increments the corresponding boarding point element in terminal.crowd_manager by the number of passengers boarding. It then decrements the alighting point element by the same number, reflecting passenger deboarding. The refresh_real_time_database function calculates the total number of passengers on the bus by summing the values in terminal.crowd_manager up to the bus's current stop. This information, along with available seat count and load factor, is then updated in the Firebase real-time database, ensuring that the user app displays accurate real-time crowd load information. The total bus fare is calculated by adding the variable fare to the fixed fare</p>

<p align='justify'>While developing this software, we have assumed that the bus fares will increase by a given amount, after every third stop the passenger needs to cross to reach his destination, starting from their origin point. The transport corporation can simply revise the bus fare by changing the values of the variable part or the fixed part. No code changes required.</p>

<p align='justify'>Passengers waiting to board the bus can open the CroMa application on their mobile devices. They need to initialize the application by entering their destination, boarding point, and the required bus type. The app then fetches a list of nearby buses that pass through their current location and destination from the Firebase Realtime Database and displays it to the user. The user can select a bus to view more information, including the number of available seats, crowd levels, timings for buses with similar routes, and fare.</p>
<p align='justify'>Passengers waiting to board the bus can open the CroMa application on their mobile devices. They need to initialize the application by entering their destination, boarding point, and the required bus type. The app then retrieves a list of nearby buses that pass through their current location and destination from the Firebase Realtime Database and displays it to the user. The user can select a bus to view more information, including the number of available seats, crowd levels, timings for buses with similar routes, and fare</p>

# Contribution Guidelines
To start contributing to the project, clone the repository into your local system subdirectory using the below git code:
Expand Down

0 comments on commit 7c2bdab

Please sign in to comment.