Mercurial Hosting > traffic-intelligence
comparison trafficintelligence/tests/moving.txt @ 1041:fc7c0f38e8a6
added nObjects to MovingObject, with loading/saving
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Wed, 04 Jul 2018 16:06:23 -0400 |
parents | aafbc0bab925 |
children | cbc026dacf0b |
comparison
equal
deleted
inserted
replaced
1040:20799ac9524e | 1041:fc7c0f38e8a6 |
---|---|
178 >>> for o in objects: o.setFeatures(features) | 178 >>> for o in objects: o.setFeatures(features) |
179 >>> objects[0].hasFeatures() | 179 >>> objects[0].hasFeatures() |
180 True | 180 True |
181 | 181 |
182 >>> o1 = MovingObject.generate(1, Point(-5.,0.), Point(1.,0.), TimeInterval(0,10)) | 182 >>> o1 = MovingObject.generate(1, Point(-5.,0.), Point(1.,0.), TimeInterval(0,10)) |
183 >>> o1.getNObjects() is None | |
184 True | |
185 >>> o1.setNObjects(1.1) | |
186 >>> o1.setNObjects(0.5) | |
187 Number of objects represented by object 1 must be greater or equal to 1 (0.5) | |
183 >>> o2 = MovingObject.generate(2, Point(0.,-5.), Point(0.,1.), TimeInterval(0,10)) | 188 >>> o2 = MovingObject.generate(2, Point(0.,-5.), Point(0.,1.), TimeInterval(0,10)) |
184 >>> MovingObject.computePET(o1, o2, 0.1) | 189 >>> MovingObject.computePET(o1, o2, 0.1) |
185 (0.0, 5, 5) | 190 (0.0, 5, 5) |
186 >>> o2 = MovingObject.generate(2, Point(0.,-5.), Point(0.,1.), TimeInterval(5,15)) | 191 >>> o2 = MovingObject.generate(2, Point(0.,-5.), Point(0.,1.), TimeInterval(5,15)) |
187 >>> MovingObject.computePET(o1, o2, 0.1) | 192 >>> MovingObject.computePET(o1, o2, 0.1) |