Mercurial Hosting > traffic-intelligence
changeset 1263:39740c4668ac
tweak to record t1 and t2 in indicators when computing PET
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 14 May 2024 16:41:28 -0400 |
parents | f10e84505443 |
children | dff5b678a33a |
files | trafficintelligence/events.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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'''