diff trafficintelligence/events.py @ 1144:6a8fe3ed3bc6

bug correction
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 28 Apr 2020 01:01:14 -0400
parents cc5cb04b04b0
children b219d5a1bb55
line wrap: on
line diff
--- 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 = {}