Mercurial > hg > nsaunier > traffic-intelligence
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 487:e04b22ce2fcd | 489:000bddf84ad0 |
|---|---|
| 1 >>> from events import * | |
| 2 >>> from moving import MovingObject, TimeInterval | |
| 3 | |
| 4 >>> objects = [MovingObject(num = i, timeInterval = TimeInterval(0,10)) for i in range(10)] | |
| 5 >>> interactions = createInteractions(objects) | |
| 6 >>> len([i for i in interactions if len(i.roadUserNumbers) == 1]) | |
| 7 0 | |
| 8 >>> objects2 = [MovingObject(num = i, timeInterval = TimeInterval(0,10)) for i in range(100, 110)] | |
| 9 >>> interactions = createInteractions(objects, objects2) | |
| 10 >>> len([i for i in interactions if len(i.roadUserNumbers) == 1]) | |
| 11 0 |
