diff trafficintelligence/tests/moving.txt @ 1094:c96388c696ac

adding functions for simulation, with contribution from student Lionel Nebot-Janvier, lionel.nebot-janvier@polymtl.ca
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 04 Feb 2019 10:08:23 -0500
parents 8734742c08c0
children b3f8b26ee838
line wrap: on
line diff
--- a/trafficintelligence/tests/moving.txt	Sat Feb 02 09:33:26 2019 -0500
+++ b/trafficintelligence/tests/moving.txt	Mon Feb 04 10:08:23 2019 -0500
@@ -206,14 +206,17 @@
 >>> MovingObject.computePET(o1, o2, 0.1)
 (15.0, 5, 20)
 
->>> t = CurvilinearTrajectory.generate(3, 1., 10, 'b')
->>> t.length()
+>>> t1 = CurvilinearTrajectory.generate(3, 1., 10, 'b')
+>>> t1.length()
 10
->>> t[3]
+>>> t1[3]
 [6.0, 0, 'b']
->>> t = CurvilinearTrajectory.generate(3, 1., 10, 'a', 1.)
->>> t[4]
+>>> t2 = CurvilinearTrajectory.generate(3, 1., 10, 'a', 1.)
+>>> t2[4]
 [7.0, 1.0, 'a']
+>>> t1.append(t2)
+>>> t1.length()
+20
 
 >>> a = Trajectory.generate(Point(0.,0.), Point(10.,0.), 4)
 >>> t = Trajectory.generate(Point(0.1,-1.), Point(1.,0.), 22)