Mercurial Hosting > traffic-intelligence
diff python/storage.py @ 526:21bdeb29f855
corrected bug in initialization of lists and loading trajectories from vissim files
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 20 Jun 2014 17:45:32 -0400 |
parents | 7124c7d2a663 |
children | 37830a831818 |
line wrap: on
line diff
--- a/python/storage.py Fri Jun 20 00:20:29 2014 -0400 +++ b/python/storage.py Fri Jun 20 17:45:32 2014 -0400 @@ -444,6 +444,8 @@ objects[objNum].curvilinearPositions = moving.CurvilinearTrajectory() objects[objNum].timeInterval.last = instant objects[objNum].curvilinearPositions.addPosition(s, y, lane) + if nObjects > 0 and len(objects) > nObjects: + return objects.values()[:nObjects] return objects.values()