diff python/moving.py @ 527:37830a831818

loading from VISSIM trajectory data works
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Sat, 21 Jun 2014 14:46:20 -0400
parents 21bdeb29f855
children f012a8ad7a0e
line wrap: on
line diff
--- a/python/moving.py	Fri Jun 20 17:45:32 2014 -0400
+++ b/python/moving.py	Sat Jun 21 14:46:20 2014 -0400
@@ -673,7 +673,7 @@
         for i in xrange(self.length()-1):
             q1=self.__getitem__(i)
             q2=self.__getitem__(i+1)
-            if q1[0] <= S1 <= q2[0] and lane == None or (self.lanes[i] == lane and self.lanes[i+1] == lane):
+            if q1[0] <= S1 < q2[0] and (lane == None or (self.lanes[i] == lane and self.lanes[i+1] == lane)):
                 indices.append(i+(S1-q1[0])/(q2[0]-q1[0]))
         return indices