MCPcopy Create free account
hub / github.com/PJLab-ADG/OASim / start

Method start

limsim/simModel/fixedScene/model.py:252–301  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

250 return allvTypesID
251
252 def start(self):
253 traci.start(
254 [
255 'sumo-gui' if self.SUMOGUI else 'sumo',
256 '-n',
257 self.netFile,
258 '-r',
259 self.rouFile,
260 '--step-length',
261 '0.1',
262 '--lateral-resolution',
263 '10',
264 '--start',
265 '--quit-on-end',
266 '-W',
267 '--collision.action',
268 'remove',
269 ]
270 )
271
272 allvTypeID = self.getAllvTypeID()
273 allvTypes = {}
274 if allvTypeID:
275 for vtid in allvTypeID:
276 vtins = vehType(vtid)
277 vtins.maxAccel = traci.vehicletype.getAccel(vtid)
278 vtins.maxDecel = traci.vehicletype.getDecel(vtid)
279 vtins.maxSpeed = traci.vehicletype.getMaxSpeed(vtid)
280 vtins.length = traci.vehicletype.getLength(vtid)
281 vtins.width = traci.vehicletype.getWidth(vtid)
282 vtins.vclass = traci.vehicletype.getVehicleClass(vtid)
283 allvTypes[vtid] = vtins
284 else:
285 vtid = 'DEFAULT_VEHTYPE'
286 vtins = vehType(vtid)
287 vtins.maxAccel = traci.vehicletype.getAccel(vtid)
288 vtins.maxDecel = traci.vehicletype.getDecel(vtid)
289 vtins.maxSpeed = traci.vehicletype.getMaxSpeed(vtid)
290 vtins.length = traci.vehicletype.getLength(vtid)
291 vtins.width = traci.vehicletype.getWidth(vtid)
292 vtins.vclass = traci.vehicletype.getVehicleClass(vtid)
293 allvTypes[vtid] = vtins
294 self.allvTypes = allvTypes
295 self.allvTypes = allvTypes
296
297 self.gui.start()
298 self.gui.drawMainWindowWhiteBG(
299 (self.dv.x-100, self.dv.y-100),
300 (self.dv.x+100, self.dv.y+100)
301 )
302
303 def putFrameInfo(self, vid: str, vtag: str, veh: Vehicle):
304 self.dataQue.put(

Callers 7

FixedSimExample.pyFile · 0.45
__init__Method · 0.45
createTimerMethod · 0.45
__init__Method · 0.45
createTimerMethod · 0.45
buildTopologyMethod · 0.45

Calls 2

getAllvTypeIDMethod · 0.95
vehTypeClass · 0.90

Tested by

no test coverage detected