Mercurial Hosting > traffic-intelligence
diff python/events.py @ 339:9c1818a71c9c
minor
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 19 Jun 2013 22:56:21 -0400 |
parents | f3aceea2afbb |
children | 1046b7346886 |
line wrap: on
line diff
--- a/python/events.py Mon Jun 17 16:26:11 2013 -0400 +++ b/python/events.py Wed Jun 19 22:56:21 2013 -0400 @@ -35,7 +35,7 @@ def __init__(self, num = None, timeInterval = None, roaduserNum1 = None, roaduserNum2 = None, roadUser1 = None, roadUser2 = None, categoryNum = None): moving.STObject.__init__(self, num, timeInterval) - self.roaduserNumbers = set([roaduserNum1, roaduserNum2]) + self.roadUserNumbers = set([roaduserNum1, roaduserNum2]) self.roadUser1 = roadUser1 self.roadUser2 = roadUser2 self.categoryNum = categoryNum @@ -90,9 +90,8 @@ def computeCrossingsCollisions(self, predictionParameters, collisionDistanceThreshold, timeHorizon, computeCZ = False, debug = False, timeInterval = None): '''Computes all crossing and collision points at each common instant for two road users. ''' self.collisionPoints={} + self.crossingZones={} TTCs = {} - if computeCZ: - self.crossingZones={} if timeInterval: commonTimeInterval = timeInterval