Mercurial > hg > nsaunier > traffic-intelligence
comparison python/tests/prediction.txt @ 466:e891a41c6c75
name change in prediction.py
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Wed, 05 Mar 2014 17:47:26 -0500 |
| parents | e56c34c1ebac |
| children | 72174e66aba5 |
comparison
equal
deleted
inserted
replaced
| 465:16fe64136506 | 466:e891a41c6c75 |
|---|---|
| 16 (19.5...,0.0...) | 16 (19.5...,0.0...) |
| 17 | 17 |
| 18 >>> import random | 18 >>> import random |
| 19 >>> acceleration = lambda: random.uniform(-0.5,0.5) | 19 >>> acceleration = lambda: random.uniform(-0.5,0.5) |
| 20 >>> steering = lambda: random.uniform(-0.1,0.1) | 20 >>> steering = lambda: random.uniform(-0.1,0.1) |
| 21 >>> et = prediction.PredictedTrajectoryNormalAdaptation(moving.Point(0,0),moving.Point(1,1), acceleration, steering, maxSpeed = 2) | 21 >>> et = prediction.PredictedTrajectoryRandomControl(moving.Point(0,0),moving.Point(1,1), acceleration, steering, maxSpeed = 2) |
| 22 >>> p = et.predictPosition(500) | 22 >>> p = et.predictPosition(500) |
| 23 >>> from numpy import max | 23 >>> from numpy import max |
| 24 >>> max(et.getPredictedSpeeds()) <= 2. | 24 >>> max(et.getPredictedSpeeds()) <= 2. |
| 25 True | 25 True |
| 26 | 26 |
