Mercurial Hosting > traffic-intelligence
diff python/traffic_engineering.py @ 36:571b11304ec9
corrected bug
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 12 Apr 2010 13:40:05 -0400 |
parents | 388a5a25fe92 |
children | 911b52744ceb |
line wrap: on
line diff
--- a/python/traffic_engineering.py Mon Apr 12 11:18:19 2010 -0400 +++ b/python/traffic_engineering.py Mon Apr 12 13:40:05 2010 -0400 @@ -104,7 +104,7 @@ Deceleration is positive All variables should be in the same units''' if deceleration > 0: - return [perceptionReactionTime+initialSpeed/(2*deceleration), (intersectionLength+vehicleAverageLength)/initialSpeed] + return [perceptionReactionTime+float(initialSpeed)/(2*deceleration), float(intersectionLength+vehicleAverageLength)/initialSpeed] else: print 'Issue deceleration should be strictly positive' return None