Umbrella Traffic Flow Analysis

From DDL Wiki

(Difference between revisions)
Jump to: navigation, search
(Result)
(Software)
Line 81: Line 81:
.
.
Time: 11.44.28.341333; In: 13; Out: 5
Time: 11.44.28.341333; In: 13; Out: 5
-
 
</pre>
</pre>
 +
 +
====Extensions====
 +
One of the unfortunate things about our developed software is that someone from our team must be present during the whole session, and must constantly be entering data into the program. While this is acceptable for a small number of short studies, the correct implementation of an actual system might require more extensive surveying. To do this it is unreasonable to ask a team of people to perform a similar analysis. In light of this, the options are to either over-estimate the number of umbrellas needed at a location and monitor usage after the system has been implemented, or to provide an automated system capable of performing the counting on its own. It is the implementation of this latter system which this section will describe, since it would be necessary to perform any extensive analysis of this type in the future.
 +
 +
An automated counting system consists of two parts, motion detection, and person recognition. In the ideal system a computer would be hooked up to a camera monitoring a specific entryway. Once a person enters through the entryway, the camera would detect the motion and capture the frames for further recognition. After relevant video frames are captured, you can use blob detection or face recognition to count the number of people. Our team has implemented a rudimentary motion capture system and has the ability to use it to do remote flow pattern counting in a system way as described above. The benefits of the remote system is that we can leave the system unattended to collect data, and then just post-process the results at a later time.
===Result===
===Result===

Revision as of 21:35, 9 November 2008

Contents

Executive Summary

The most important aspects of implementing this umbrella distribution system are determining where to place the distribution units and determining how many units to place at each location. We looked at campus traffic flow to determine how many units to place. This was done using two methods: a simulation of traffic flow, and counting the number of people going into and out of each major doorway on campus.

Our simulation of traffic flow was done using a Markov chain simulation. Our model was fully developed, but we could not get the type of data that would be necessary to achieve actual campus traffic numbers with the model. However, it did show us that traffic tends to move sinusoidally, with a large outflux as classes let out followed by a large influx as people arrive from elsewhere on campus. The model would have been more useful if we could determine actual movement probabilities, but determining those is prohibitively time consuming.

To ballpark our umbrella needs at each location, we sat outside the major campus doorways and counted people going into and out of buildings. We found that the most heavily trafficked doorway is the upper doorway at Doherty Hall. It will need to have a capacity of approximately 250 umbrellas. Most other major doorways should have a capacity of at least 150 umbrellas.

Our main conclusion is that it is very difficult to gain an accurate understanding of traffic flow around campus. A better approach than spending the time to create a model or count people is to have each unit calculate the average time that an umbrella spends within the unit, and to move units from locations with a high average time to locations with a low average time to balance distribution around campus.

Purpose

The physical construction of our device is relatively simple. It contains few components, and those components are already well-developed and commonly used. The size of the device is constrained by the umbrellas, and device weight is not a large concern since it will be stationary. Given this, we did not feel that a strictly mechanical analysis would provide us the insight that we need to develop a complete solution. In addition to the design of the hardware, the issue of implementing the system had to be addressed. This is where we chose to focus our analysis. The largest issue of implementation is determining where to place the units, and how many modular units to put at each location. Traffic flow into and out of each doorway is the major determinant of this, so we decided to find out what the traffic flow was like as a function of time at the major doorways on campus.

Approach

Finding the traffic flux at the major doorways was done using two different methods.

The first method is a Markov simulation of traffic flow around campus. A Markov matrix expresses the probability that something in a given state at some time will move to another given state at the next time. In our model, it expresses the probability that somebody leaving a certain doorway will move to another given doorway. Two matrices are needed for our model because the probabilities of where are user is going to move are different for users entering and leaving a given doorway. For example, a user exiting the upper door of Baker hall might go to the library, the UC, or some other building. A user entering the same door must exit through either the same door, the lower door at Porter hall, or one of the other doors along the length of the building. Using these movement probabilities, a model of campus was constructed and a rainy day was simulated to see how traffic moved around campus.

Unfortunately, an accurate model of the campus would require large amounts of data averaged over a large time span, which was not feasible for us to collect within the given time frame of this project, and may not be feasible for other clients to collect. To estimate the necessary capacity of the system without using a full model simulation, we counted traffic flow in and out of major doorways in half- to one-hour increments. This gives us point estimates of traffic flux, allowing us to see roughly which doorways would need more units.

Model

Assumptions

  1. It is constantly raining throughout the model day.
  2. The Markov movement probabilities are time-independent.
  3. The probability of taking an umbrella is equal for all users.
  4. Movement times are normally distributed.
  5. The Markov model is appropriate for modeling behavior.
  6. The movement probabilities are not affected by the existence of the distribution system.

Description

After determining the Markov probability matrices, we decided on an algorithm to simulate a day's worth of movement activity.

The simulation steps through each day minute by minute. At each time step, the system can first add new users:


Each user in the system keeps track of its current position, its wait time at that position, whether it is inside or outside, and whether or not it has an umbrella. Next, it loops through each user. Each user's wait time is reduced by 1. When a user's wait time hits zero, it selects the next location to move to from the appropriate Markov matrix, and its wait time at that location.


The wait times are selected from a normal distribution given in an Excel file. If the user was inside, and is traveling outside to get to another building, the wait time is given by the distance between the two locations; if a user was outside and is going inside, the wait time is dependent only on the location it has arrived at.

When a user leaves a building, it takes an umbrella, tracked by decrementing an array. When a user enters a building, it deposits an umbrella at the new location, by incrementing an array.

After each user has been dealt with for a given time step, the distribution of umbrellas by location is saved in a large matrix. Once all time steps have been run, the matrix is saved as an Excel file. Plotting the data in the Excel file shows which locations need to keep the largest stock of umbrellas.

Results

Image:Markov_Umbrella_Plot.jpg

- Nodes that act as sinks/sources
-- Need to pay someone to move it around (Cost increase)
-- Don't do anything => shortages/surpluses = > redirected traffic flow, loss of trust in the system.
-- Selective placement of dispensors to accomodate even flow

- unequal umbrells usage ofer time (peak flows)
-- put enough units to acomodate the peak flow
-- increase the capacity of each unit

- Product as a service
-- Allows company control over distribution/recycling/monitoring

Counter

Description

In addition to developing a model of traffic flow through various nodes, we also realized the limitations of the accuracy of such an analysis. As such, we felt it necessary to develop a system by which we could better track usage in an actual environment. We tested this methodology on an actual Campus, by monitoring entry and exit points on CMU's campus. We developed in-house counting software to facilitate our tracking on the campus flow patterns, and then used the output to plot flow patterns at a variety of locations and time intervals.

Software

In order to facilitate the counting of people through various doorways and locations, we developed software that allows us to capture time-stamped flow information using a laptop. This software allows the user to press the 'i' key to record incoming people, and the 'o' key to record outgoing people. In each instance, the event is time-stamped so that we are able to plot the number entering or exiting a building as a function of time. The software interface at start up includes a text field in which to enter the location at which you are recording:

In this case, the output file would be named:
data_Building 1.txt
and the contents of the file would resemble:

Recording at Building 1
Logging started at: 11.38.54.7370 on 11/7/2008
Time: 11.38.55.8245;	In: 0;	Out: 1
Time: 11.39.2.15508;	In: 1;	Out: 1
Time: 11.39.6.19423;	In: 2;	Out: 1
.
.
.
Time: 11.44.28.341333;	In: 13;	Out: 5

Extensions

One of the unfortunate things about our developed software is that someone from our team must be present during the whole session, and must constantly be entering data into the program. While this is acceptable for a small number of short studies, the correct implementation of an actual system might require more extensive surveying. To do this it is unreasonable to ask a team of people to perform a similar analysis. In light of this, the options are to either over-estimate the number of umbrellas needed at a location and monitor usage after the system has been implemented, or to provide an automated system capable of performing the counting on its own. It is the implementation of this latter system which this section will describe, since it would be necessary to perform any extensive analysis of this type in the future.

An automated counting system consists of two parts, motion detection, and person recognition. In the ideal system a computer would be hooked up to a camera monitoring a specific entryway. Once a person enters through the entryway, the camera would detect the motion and capture the frames for further recognition. After relevant video frames are captured, you can use blob detection or face recognition to count the number of people. Our team has implemented a rudimentary motion capture system and has the ability to use it to do remote flow pattern counting in a system way as described above. The benefits of the remote system is that we can leave the system unattended to collect data, and then just post-process the results at a later time.

Result

The following plots show the in-and-out traffic flow at different locations of campus buildings.

  • Doherty Hall upper entrance

The data at Doherty Hall entrance were taken for approximately 30 mins, starting from 13:14pm.
Image:DH1.jpg Image:DH2.jpg
The plot on the left side shows the incoming and outgoing traffic flow at the entrance. There were more outgoing flow than incoming flow at the beginning but incoming traffic increased gradually and ended up exceeding the outgoing traffic flow in 30 min. Also, according to the plot on the right side, Delta (incoming traffic flow - outgoing traffic flow) gradually increased and reached up to 171 at the end.


  • Baker Hall entrance

The data at Baker Hall entrance were taken for approximately 30 mins, starting from 12:17pm.
Image:BH1.jpg Image:BH2.jpg
The in-and-out traffic flow plot show that there were more people going into the building than those coming out of the building and this trend was kept over the whole experiment. Also, the Delta plot on the right side indicates that the maximum Delta value reached up to 47.


  • Porter Hall entrance

The data at Baker Hall entrance were taken for approximately 1 hr 30 mins, starting from 11:08pm.
Image:PH1.jpg Image:PH2.jpg
Overall, there were more people going out of the building than those coming into the building over the time period of the experiment but the incoming and outgoing flows evened out around 2365 seconds and at the end.


  • Newell-Simon Hall entrance

Image:NS1.jpg Image:NS2.jpg

  • Wean Hall entrance

Image:WH1.jpg Image:WH2.jpg

  • UC Revolving door

Image:UC1.jpg Image:UC2.jpg

Conclusions

Fill this section in paragraph form

  • Account for surges in umbrella use - seen in Markov model as well as traffic data
  • Difficult and expensive to ballpark traffic flow
  • Probably easier to guess and adjust unit distribution based on need
    • Have each unit remember average time that an umbrella remains inside? Low average time means high umbrella turnover --> add more units?
    • Or just listen for complaints / look for wet people
  • Table of recommended numbers of units at each location - # umbrellas / # umbrellas/unit
Personal tools