Download - a traffic analysis tool
![Page 1: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/1.jpg)
Slide 1 (of 12)
a traffic analysis toolEmerson Murphy-Hill, Portland State University, USA
![Page 2: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/2.jpg)
Slide 2 (of 12)
project background
Infopipes Research Project
Maseeh College of Computer Science
Portland State University, Oregon, USA
Group moved from OGI to Portland State within the last year
![Page 3: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/3.jpg)
Slide 3 (of 12)
infopipes projecto Infopipes:
o An abstraction for data-streaming
o About data flow, not control flowo Like household water pipes
o Reusable components in streaming applications
Black02
![Page 4: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/4.jpg)
Slide 4 (of 12)
a simple infopipeBuffer
init“initialize my state”super init.queue := SharedQueue new.
pull“answer the first item in my queue”^ queue next
push: anItem“put an item at the end of my queue”^ queue nextPut: anItem.
![Page 5: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/5.jpg)
Slide 5 (of 12)
an open question
Do Infopipes really facilitate reuse in a streaming application?
We don’t know, but let’s build an application and find out…
![Page 6: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/6.jpg)
Slide 6 (of 12)
traffic analysiso Automobile traffic – a good
fit!o Traffic data is a continuous
stream that can be analyzed for current traffic conditions
o A known problem in traffic analysis is measuring truck volume
![Page 7: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/7.jpg)
Slide 7 (of 12)
why measuring truck volume is hard
o Existing roadway hardware is limited
![Page 8: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/8.jpg)
Slide 8 (of 12)
why measuring truck volume is hard (cont.)
Now, how many trucks here?
o 4 trucks, if traffic is moving at the same speed as before
o 4 cars, if traffic is moving slower than before
o Or any combination of cars and trucks, if velocity changes through the sample period!
o So can you determine how many trucks have passed using this hardware?
![Page 9: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/9.jpg)
Slide 9 (of 12)
a method of counting truckso Kwon and colleagues
suggested a method of counting trucks based on two simple observations:
1. Traffic in the innermost lane is often truck-free
2. Velocity in adjacent lanes are correlated over time
![Page 10: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/10.jpg)
Slide 10 (of 12)
for example…
![Page 11: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/11.jpg)
Slide 11 (of 12)
so reconsider the problemNow, how many trucks here?
![Page 12: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/12.jpg)
Slide 12 (of 12)
implementationo We implemented this single
loop truck volume algorithmo We decided to use
Smalltalk/X after ESUG 2004o Some Infopipes can benefit
from in-lined C codeo Simple tests show ST/X is
faster than Squeak
![Page 13: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/13.jpg)
Implementation (cont)o Implementation consists of
a variety of connected Infopipeso Used preexisting, general-
purpose Infopipes (buffers, pumps, tees…)
o Used preexisting, traffic-specific Infopipes
o Created new, traffic-specific Infopipes
![Page 14: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/14.jpg)
implementation (cont)Top-level view:
SqueakSmalltalk/X
SimpleHighwayVehicleClassifierController170 DataLane1..n
Truck CountLane2
Car CountLane2
Truck CountLane3
Car CountLane3
Truck CountLaneN
Car CountLaneN
Car CountLane1
...
Netpipe
Netpipe
Netpipe
Netpipe
Netpipe
Netpipe
Netpipe
HighwayVolumePlot
Truck CountLane2
Car CountLane2
Truck CountLane3
Car CountLane3
Truck CountLaneN
Car CountLaneN
Car CountLane1
...
Output Frequency
Data Source
Mean Estimated Car Length
Mean Estimated Truck Length
DestinationSource
DamperPipe
Time
Time Netpipe Time
+
+
+ +
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
SideEffectPipe- +
-stroke
![Page 15: a traffic analysis tool](https://reader035.vdocuments.us/reader035/viewer/2022062309/56814d90550346895dbaea0f/html5/thumbnails/15.jpg)
Implementation (cont)o Uses about 50 classes