Mercurial Hosting > traffic-intelligence
comparison trafficintelligence/tests/events.txt @ 1030:aafbc0bab925
moved method around to avoid cross-dependencies
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 19 Jun 2018 10:04:52 -0400 |
parents | cc5cb04b04b0 |
children | eb88d2984637 |
comparison
equal
deleted
inserted
replaced
1029:c6cf75a2ed08 | 1030:aafbc0bab925 |
---|---|
1 >>> from events import * | 1 >>> from trafficintelligence.events import * |
2 >>> from moving import MovingObject, TimeInterval, Point | 2 >>> from trafficintelligence.moving import MovingObject, TimeInterval, Point |
3 >>> from prediction import ConstantPredictionParameters | 3 >>> from trafficintelligence.prediction import ConstantPredictionParameters |
4 | 4 |
5 >>> objects = [MovingObject(num = i, timeInterval = TimeInterval(0,10)) for i in range(10)] | 5 >>> objects = [MovingObject(num = i, timeInterval = TimeInterval(0,10)) for i in range(10)] |
6 >>> interactions = createInteractions(objects) | 6 >>> interactions = createInteractions(objects) |
7 >>> len([i for i in interactions if len(i.roadUserNumbers) == 1]) | 7 >>> len([i for i in interactions if len(i.roadUserNumbers) == 1]) |
8 0 | 8 0 |