Mercurial Hosting > traffic-intelligence
diff python/events.py @ 489:000bddf84ad0
corrected bugs in safety analysis
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 11 Apr 2014 17:47:38 -0400 |
parents | e04b22ce2fcd |
children | 21bdeb29f855 |
line wrap: on
line diff
--- a/python/events.py Fri Apr 04 17:43:56 2014 -0400 +++ b/python/events.py Fri Apr 11 17:47:38 2014 -0400 @@ -159,9 +159,9 @@ if _others == None: others = objects[:i] for j in xrange(len(others)): - commonTimeInterval = objects[i].commonTimeInterval(objects[j]) + commonTimeInterval = objects[i].commonTimeInterval(others[j]) if not commonTimeInterval.empty(): - interactions.append(Interaction(num, commonTimeInterval, objects[i].num, objects[j].num, objects[i], objects[j])) + interactions.append(Interaction(num, commonTimeInterval, objects[i].num, others[j].num, objects[i], others[j])) num += 1 return interactions @@ -351,7 +351,7 @@ if __name__ == "__main__": import doctest import unittest - #suite = doctest.DocFileSuite('tests/moving.txt') - suite = doctest.DocTestSuite() + suite = doctest.DocFileSuite('tests/events.txt') + #suite = doctest.DocTestSuite() unittest.TextTestRunner().run(suite)