(self)
| 291 | return allvTypesID |
| 292 | |
| 293 | def start(self): |
| 294 | if self.carla_cosim: |
| 295 | num_clients = "2" |
| 296 | else: |
| 297 | num_clients = "1" |
| 298 | traci.start([ |
| 299 | 'sumo-gui' if self.SUMOGUI else 'sumo', |
| 300 | '-n', |
| 301 | self.netFile, |
| 302 | '-r', |
| 303 | self.rouFile, |
| 304 | '--step-length', |
| 305 | '0.1', |
| 306 | '--lateral-resolution', |
| 307 | '10', |
| 308 | '--start', |
| 309 | '--quit-on-end', |
| 310 | '-W', |
| 311 | '--collision.action', |
| 312 | 'remove', |
| 313 | "--num-clients", |
| 314 | num_clients, |
| 315 | ], port=8813) |
| 316 | traci.setOrder(1) |
| 317 | |
| 318 | allvTypeID = self.getAllvTypeID() |
| 319 | allvTypes = {} |
| 320 | if allvTypeID: |
| 321 | for vtid in allvTypeID: |
| 322 | vtins = vehType(vtid) |
| 323 | vtins.maxAccel = traci.vehicletype.getAccel(vtid) |
| 324 | vtins.maxDecel = traci.vehicletype.getDecel(vtid) |
| 325 | vtins.maxSpeed = traci.vehicletype.getMaxSpeed(vtid) |
| 326 | vtins.length = traci.vehicletype.getLength(vtid) |
| 327 | vtins.width = traci.vehicletype.getWidth(vtid) |
| 328 | vtins.vclass = traci.vehicletype.getVehicleClass(vtid) |
| 329 | allvTypes[vtid] = vtins |
| 330 | else: |
| 331 | vtid = 'DEFAULT_VEHTYPE' |
| 332 | vtins = vehType(vtid) |
| 333 | vtins.maxAccel = traci.vehicletype.getAccel(vtid) |
| 334 | vtins.maxDecel = traci.vehicletype.getDecel(vtid) |
| 335 | vtins.maxSpeed = traci.vehicletype.getMaxSpeed(vtid) |
| 336 | vtins.length = traci.vehicletype.getLength(vtid) |
| 337 | vtins.width = traci.vehicletype.getWidth(vtid) |
| 338 | vtins.vclass = traci.vehicletype.getVehicleClass(vtid) |
| 339 | allvTypes[vtid] = vtins |
| 340 | self.allvTypes = allvTypes |
| 341 | self.allvTypes = allvTypes |
| 342 | |
| 343 | def genRouteWithDuarouter(self, netFile: str, startEdge: str, startLane: str, endEdge: str, endLane: str): |
| 344 | temp_dir = '{}/temp'.format(os.path.dirname(__file__)) |
no test coverage detected