# HG changeset patch # User Nicolas Saunier # Date 1588050074 14400 # Node ID 6a8fe3ed3bc6f56ce81a6f69503cf7421e172d2b # Parent 8ac52ebff5f70054aa36a49c6388ad1b579a1ae9 bug correction diff -r 8ac52ebff5f7 -r 6a8fe3ed3bc6 trafficintelligence/events.py --- a/trafficintelligence/events.py Tue Apr 21 00:55:02 2020 -0400 +++ b/trafficintelligence/events.py Tue Apr 28 01:01:14 2020 -0400 @@ -49,7 +49,7 @@ contains the indicators in a dictionary with the names as keys ''' - categories = {'Head On': 0, + categories = {'headon': 0, 'rearend': 1, 'side': 2, 'parallel': 3} @@ -216,6 +216,9 @@ minDistances[instant] = moving.MovingObject.minDistance(self.roadUser1, self.roadUser2, instant) self.addIndicator(indicators.SeverityIndicator(Interaction.indicatorNames[3], minDistances, mostSevereIsMax = False)) + def categorize(self): + '''Computes the interaction category by instant ''' + 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. ''' TTCs = {} diff -r 8ac52ebff5f7 -r 6a8fe3ed3bc6 trafficintelligence/metadata.py --- a/trafficintelligence/metadata.py Tue Apr 21 00:55:02 2020 -0400 +++ b/trafficintelligence/metadata.py Tue Apr 28 01:01:14 2020 -0400 @@ -224,7 +224,7 @@ def getTrajectory(self): t = Trajectory() - for p in self.point: + for p in self.points: t.addPositionXY(p.x_coordinate, p.y_coordinate) return t