150 likes | 334 Views
a traffic analysis tool. Emerson Murphy-Hill, Portland State University, USA. project background. Maseeh College of Computer Science Portland State University, Oregon, USA. Infopipes Research Project. Group moved from OGI to Portland State within the last year. infopipes project.
E N D
a traffic analysis tool Emerson Murphy-Hill, Portland State University, USA Slide 1 (of 12)
project background Maseeh College of Computer Science Portland State University, Oregon, USA Infopipes Research Project Group moved from OGI to Portland State within the last year Slide 2 (of 12)
infopipes project • Infopipes: • An abstraction for data-streaming • About data flow, not control flow • Like household water pipes • Reusable components in streaming applications Black02 Slide 3 (of 12)
a simple infopipe Buffer 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. Slide 4 (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… Slide 5 (of 12)
traffic analysis • Automobile traffic – a good fit! • Traffic data is a continuous stream that can be analyzed for current traffic conditions • A known problem in traffic analysis is measuring truck volume Slide 6 (of 12)
why measuring truck volume is hard • Existing roadway hardware is limited 2 Trucks, 2 Cars Slide 7 (of 12)
why measuring truck volume is hard (cont.) Now, how many trucks here? • 4 trucks, if traffic is moving at the same speed as before • 4 cars, if traffic is moving slower than before • Or any combination of cars and trucks, if velocity changes through the sample period! • So can you determine how many trucks have passed using this hardware? Slide 8 (of 12)
a method of counting trucks • Kwon and colleagues suggested a method of counting trucks based on two simple observations: • Traffic in the innermost lane is often truck-free • Velocity in adjacent lanes are correlated over time Slide 9 (of 12)
for example… Slide 10 (of 12)
so reconsider the problem Innermost Lane cars trucks Outermost Lane Now, how many trucks here? 3 Trucks, 5 Cars Slide 11 (of 12)
implementation • We implemented this single loop truck volume algorithm • We decided to use Smalltalk/X after ESUG 2004 • Some Infopipes can benefit from in-lined C code • Simple tests show ST/X is faster than Squeak Slide 12 (of 12)
Implementation (cont) • Implementation consists of a variety of connected Infopipes • Used preexisting, general-purpose Infopipes (buffers, pumps, tees…) • Used preexisting, traffic-specific Infopipes • Created new, traffic-specific Infopipes
implementation (cont) Top-level view:
Implementation (cont) • Uses about 50 classes