Mercurial Hosting > traffic-intelligence
comparison trafficintelligence/tests/events.txt @ 1212:af329f3330ba
work in progress on 3D safety analysis
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 02 May 2023 17:11:24 -0400 |
parents | 658f87232536 |
children | ad60e5adf084 |
comparison
equal
deleted
inserted
replaced
1211:a095d4fbb2ea | 1212:af329f3330ba |
---|---|
32 | 32 |
33 >>> o1 = MovingObject.generate(1, Point(-5.,0.), Point(1.,0.), TimeInterval(0,10)) | 33 >>> o1 = MovingObject.generate(1, Point(-5.,0.), Point(1.,0.), TimeInterval(0,10)) |
34 >>> o2 = MovingObject.generate(2, Point(0.,-5.), Point(0.,1.), TimeInterval(0,10)) | 34 >>> o2 = MovingObject.generate(2, Point(0.,-5.), Point(0.,1.), TimeInterval(0,10)) |
35 >>> inter = Interaction(roadUser1 = o1, roadUser2 = o2) | 35 >>> inter = Interaction(roadUser1 = o1, roadUser2 = o2) |
36 >>> inter.computeIndicators() | 36 >>> inter.computeIndicators() |
37 >>> predictionParams = ConstantPredictionParameters(10.) | 37 >>> predictionParams = ConstantPredictionParameters() |
38 >>> inter.computeCrossingsCollisions(predictionParams, 0.1, 10) | 38 >>> inter.computeCrossingsCollisions(predictionParams, 0.1, 10) |
39 >>> ttc = inter.getIndicator("Time to Collision") | 39 >>> ttc = inter.getIndicator("Time to Collision") |
40 >>> ttc[0] | 40 >>> ttc[0] |
41 5.0 | 41 5.0 |
42 >>> ttc[1] | 42 >>> ttc[1] |