Mercurial Hosting > traffic-intelligence
comparison python/events.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 | 000bddf84ad0 |
children | a80ef6931fd8 8ba4b8ad4c86 |
comparison
equal
deleted
inserted
replaced
525:7124c7d2a663 | 526:21bdeb29f855 |
---|---|
301 for j in self.pairs: | 301 for j in self.pairs: |
302 if(j.hasCZ): | 302 if(j.hasCZ): |
303 lists.append(j.num) | 303 lists.append(j.num) |
304 return lists | 304 return lists |
305 | 305 |
306 def getCPlist(self,indicatorThreshold=99999): | 306 def getCPlist(self,indicatorThreshold=float('Inf')): |
307 lists = [] | 307 lists = [] |
308 for j in self.pairs: | 308 for j in self.pairs: |
309 if(j.hasCP): | 309 if(j.hasCP): |
310 for k in j.CP: | 310 for k in j.CP: |
311 if(j.CP[k] != [] and j.CP[k][0].indicator < indicatorThreshold): | 311 if(j.CP[k] != [] and j.CP[k][0].indicator < indicatorThreshold): |
312 lists.append([k,j.CP[k][0]]) | 312 lists.append([k,j.CP[k][0]]) |
313 return lists | 313 return lists |
314 | 314 |
315 def getCZlist(self,indicatorThreshold=99999): | 315 def getCZlist(self,indicatorThreshold=float('Inf')): |
316 lists = [] | 316 lists = [] |
317 for j in self.pairs: | 317 for j in self.pairs: |
318 if(j.hasCZ): | 318 if(j.hasCZ): |
319 for k in j.CZ: | 319 for k in j.CZ: |
320 if(j.CZ[k] != [] and j.CZ[k][0].indicator < indicatorThreshold): | 320 if(j.CZ[k] != [] and j.CZ[k][0].indicator < indicatorThreshold): |