# HG changeset patch # User Nicolas Saunier # Date 1715719288 14400 # Node ID 39740c4668ac223d64b5f429f0d0abd2e9121ef3 # Parent f10e845054433c1b041233b9e5c5237faf413163 tweak to record t1 and t2 in indicators when computing PET diff -r f10e84505443 -r 39740c4668ac trafficintelligence/events.py --- a/trafficintelligence/events.py Wed Apr 17 16:46:23 2024 -0400 +++ b/trafficintelligence/events.py Tue May 14 16:41:28 2024 -0400 @@ -296,7 +296,7 @@ 'Warning: when computing PET from interactions, there could be PETs between objects that do not coexist and therefore are not considered interactions' pet, t1, t2= moving.MovingObject.computePET(self.roadUser1, self.roadUser2, collisionDistanceThreshold, computePetWithBoundingPoly) if pet is not None: - self.addIndicator(indicators.SeverityIndicator(Interaction.indicatorNames[10], {min(t1, t2): pet}, mostSevereIsMax = False)) + self.addIndicator(indicators.SeverityIndicator(Interaction.indicatorNames[10], {min(t1, t2): pet, max(t1, t2): pet}, mostSevereIsMax = False)) def setCollision(self, collision): '''indicates if it is a collision: argument should be boolean'''