comparison python/tests/moving.txt @ 1018:d7afc59f6966

work in progress
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 04 Jun 2018 17:46:52 -0400
parents 933670761a57
children 5d2f6afae35b
comparison
equal deleted inserted replaced
1017:89cbc4056c13 1018:d7afc59f6966
196 >>> t.differentiate(True) # doctest:+ELLIPSIS 196 >>> t.differentiate(True) # doctest:+ELLIPSIS
197 [1.0, 0.0, '1'] [1.0, 0.099..., '1'] [2.0, 0.099..., '1'] [2.0, 0.099..., '1'] 197 [1.0, 0.0, '1'] [1.0, 0.099..., '1'] [2.0, 0.099..., '1'] [2.0, 0.099..., '1']
198 >>> t = CurvilinearTrajectory(S = [1.], Y = [0.5], lanes = ['1']) 198 >>> t = CurvilinearTrajectory(S = [1.], Y = [0.5], lanes = ['1'])
199 >>> t.differentiate().empty() 199 >>> t.differentiate().empty()
200 True 200 True
201
202 >>> o1 = MovingObject.generate(1, Point(1., 2.), Point(1., 1.), TimeInterval(0,10))
203 >>> o2 = MovingObject.generate(2, Point(14., 14.), Point(1., 0.), TimeInterval(14,20))
204
201 205
202 >>> o1 = MovingObject.generate(1, Point(0., 2.), Point(0., 1.), TimeInterval(0,2)) 206 >>> o1 = MovingObject.generate(1, Point(0., 2.), Point(0., 1.), TimeInterval(0,2))
203 >>> o1.classifyUserTypeSpeedMotorized(0.5, np.median) 207 >>> o1.classifyUserTypeSpeedMotorized(0.5, np.median)
204 >>> userTypeNames[o1.getUserType()] 208 >>> userTypeNames[o1.getUserType()]
205 'car' 209 'car'