The document proposes a solution to address the problem of bus bunching using Python and the Django framework. Bus bunching occurs when the space between buses shrinks as the front bus is delayed, causing the following bus to catch up and bunch together. The proposed solution uses algorithms to check for bunching by comparing headways between buses to a threshold. If a bus is late, it will adjust its departure time to maintain proper spacing and check subsequent buses for bunching, addressing delays recursively. Python and Django are chosen for the project due to their suitability for algorithms, rapid development capabilities, and reuse of existing code modules.
1. A Solution to Bus Bunching
A presentation by
--Ishaan Aggarwal
--Mohit Kumar
2. What is Bus Bunching?
• Space between the buses
shrink as the front bus is
delayed.
• As the front bus gets more
crowded, it slows even
more
• Emptier following bus gets
faster
• Resulting accumulation of
delays
3. In this PPT
• Problem of bus bunching
• Why Python?
• Why Django?
• Proposed Solution
4. Problem of Bus Bunching
• Bunching can be caused by random heavy usage of
any particular vehicle, resulting in it falling behind
schedule.
• When buses bunch, one can pass another on the
street or road.
• Another cause is that some drivers are faster than
others. This results in catching up on long or high-
frequency routes.
5. Buses are scheduled evenly down a route. Without any interruptions, that space
(called ‘headway’) remains even.
6. But if the front bus is delayed, that space shrinks. Traffic congestion, accidents
and special events are the leading causes.
7. That extra time allows riders who
would have caught the second bus to
now be picked up by the first.
Meanwhile, fewer riders are left
waiting for the second bus. Not as
many people get on or off the second
bus, so it runs faster and faster.
8. Each stop takes longer as more people get on and off and the bus has to wait.
Stops that normally attract few riders are now more likely to have riders waiting.
9. Every stop brings the second bus closer and closer, eventually catching up to the
front bus.
10. This makes passengers angry. Buses run late and are more crowded. It can be
confusing when two buses show up at the same time.
11. Why We adopt python ?
• As an algorithm-oriented language, Python is the easiest tool
which enables to learn key concepts in algorithm design,
instead of struggling with low-level, idiosyncratic features of
conventional programming languages.
• The way Python handles data types represents a perfect match
with the way textbooks present algorithms, and its interpretive
nature encourages us to experiment with the language.
• Equally important is our novel use of data structures for trees
and graphs, which are as compact as possible and yet human
readable and is readily accepted by the Python interpreter.
12. Why we adopt Django ?
• Django is the best framework for web applications, as it allows
developers to use modules for faster development.
• As a developer, you can make use of these modules to create
apps, websites from an existing source. It speeds up the
development process greatly, as you do not have to code
everything from scratch.
• The principles of rapid development, which means developers
can do more than one iteration at a time without starting the
whole schedule from scratch;
13. Why we adopt Django ? Cont.
• DRY philosophy — Don’t Repeat Yourself — which means
developers can reuse existing code and focus on the unique
one.
• Here we can easily implement any Algorithm-based generator,
because it is too fast to for these 5 phases ---
design, implement, review, test and execute.
• We also want that we design algorithm in best view style.
14. Proposed solution
• Check for bunching (if the headway between
the buses is less than threshold).
• There may be 2 cases
– Bus is early
• Do noting but wait for scheduled departure
– Bus is late
15. Bus is late
• Update the arrival time and adjust departure
accordingly based on the threshold
• Check all the next buses for bunching
• In case of bunching recursively follow the
algorithm.