Mercurial Hosting > traffic-intelligence
diff trafficintelligence/tests/events.txt @ 1150:14140b55e580
corrected issue with motion pattern for motion prediction for safety analysis (to few matches)
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 28 May 2020 01:03:45 -0400 |
parents | eb88d2984637 |
children | 658f87232536 |
line wrap: on
line diff
--- a/trafficintelligence/tests/events.txt Wed May 13 00:29:34 2020 -0400 +++ b/trafficintelligence/tests/events.txt Thu May 28 01:03:45 2020 -0400 @@ -11,6 +11,14 @@ >>> len([i for i in interactions if len(i.roadUserNumbers) == 1]) 0 +>>> o1 = MovingObject.generate(1, Point(-5.,0.), Point(0.,0.), TimeInterval(0,10)) +>>> o2 = MovingObject.generate(2, Point(0.,-5.), Point(0.,1.), TimeInterval(0,10)) +>>> inter = Interaction(roadUser1 = o1, roadUser2 = o2) +>>> inter.computeIndicators() # should not crash with 0 speed +>>> va = inter.getIndicator("Velocity Angle") +>>> va.empty() +True + >>> o1 = MovingObject.generate(1, Point(-5.,0.), Point(1.,0.), TimeInterval(0,10)) >>> o2 = MovingObject.generate(2, Point(0.,-5.), Point(0.,1.), TimeInterval(0,10)) >>> inter = Interaction(roadUser1 = o1, roadUser2 = o2) @@ -33,6 +41,7 @@ >>> inter.getIndicator(Interaction.indicatorNames[1])[6] # doctest:+ELLIPSIS 3.1415... +# test categorize >>> from collections import Counter >>> from numpy import pi >>> o1 = MovingObject.generate(0, Point(0,0), Point(1,0), TimeInterval(0,100))