diff python/tests/events.txt @ 489:000bddf84ad0

corrected bugs in safety analysis
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 11 Apr 2014 17:47:38 -0400
parents
children 72174e66aba5
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/python/tests/events.txt	Fri Apr 11 17:47:38 2014 -0400
@@ -0,0 +1,11 @@
+>>> from events import *
+>>> from moving import MovingObject, TimeInterval
+
+>>> objects = [MovingObject(num = i, timeInterval = TimeInterval(0,10)) for i in range(10)]
+>>> interactions = createInteractions(objects)
+>>> len([i for i in interactions if len(i.roadUserNumbers) == 1])
+0
+>>> objects2 = [MovingObject(num = i, timeInterval = TimeInterval(0,10)) for i in range(100, 110)]
+>>> interactions = createInteractions(objects, objects2)
+>>> len([i for i in interactions if len(i.roadUserNumbers) == 1])
+0