comparison 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
comparison
equal deleted inserted replaced
1093:05ccd8ef150c 1094:c96388c696ac
204 (5.0, 5, 10) 204 (5.0, 5, 10)
205 >>> o2 = MovingObject.generate(2, Point(0.,-5.), Point(0.,1.), TimeInterval(15,30)) 205 >>> o2 = MovingObject.generate(2, Point(0.,-5.), Point(0.,1.), TimeInterval(15,30))
206 >>> MovingObject.computePET(o1, o2, 0.1) 206 >>> MovingObject.computePET(o1, o2, 0.1)
207 (15.0, 5, 20) 207 (15.0, 5, 20)
208 208
209 >>> t = CurvilinearTrajectory.generate(3, 1., 10, 'b') 209 >>> t1 = CurvilinearTrajectory.generate(3, 1., 10, 'b')
210 >>> t.length() 210 >>> t1.length()
211 10 211 10
212 >>> t[3] 212 >>> t1[3]
213 [6.0, 0, 'b'] 213 [6.0, 0, 'b']
214 >>> t = CurvilinearTrajectory.generate(3, 1., 10, 'a', 1.) 214 >>> t2 = CurvilinearTrajectory.generate(3, 1., 10, 'a', 1.)
215 >>> t[4] 215 >>> t2[4]
216 [7.0, 1.0, 'a'] 216 [7.0, 1.0, 'a']
217 >>> t1.append(t2)
218 >>> t1.length()
219 20
217 220
218 >>> a = Trajectory.generate(Point(0.,0.), Point(10.,0.), 4) 221 >>> a = Trajectory.generate(Point(0.,0.), Point(10.,0.), 4)
219 >>> t = Trajectory.generate(Point(0.1,-1.), Point(1.,0.), 22) 222 >>> t = Trajectory.generate(Point(0.1,-1.), Point(1.,0.), 22)
220 >>> prepareAlignments([a]) 223 >>> prepareAlignments([a])
221 >>> ct = CurvilinearTrajectory.fromTrajectoryProjection(t, [a]) 224 >>> ct = CurvilinearTrajectory.fromTrajectoryProjection(t, [a])