Hello, I would like to know the purpose of the code on line 246 in carFactory.py? Can it be deleted or how should it be changed? Because I found that the maximum acceleration of vehicles leaving the AOI area has been changed, which can cause congestion due to the low speed of vehicles leaving the AOI area.
if accel >= 0:
traci.vehicle.setAccel(self.id, accel)
traci.vehicle.setDecel(self.id, self.maxDecel)
else:
traci.vehicle.setAccel(self.id, self.maxAccel)
traci.vehicle.setDecel(self.id, -accel)
else:
traci.vehicle.setLaneChangeMode(self.id, 0)
traci.vehicle.setSpeedMode(self.id, 0)
traci.vehicle.moveToXY(self.id, '', -1, x, y,
angle=angle, keepRoute=2)
traci.vehicle.setSpeed(self.id, speed)
if accel >= 0:
traci.vehicle.setAccel(self.id, accel)
traci.vehicle.setDecel(self.id, self.maxDecel)
else:
traci.vehicle.setAccel(self.id, self.maxAccel)
traci.vehicle.setDecel(self.id, -accel)
Hello, I would like to know the purpose of the code on line 246 in carFactory.py? Can it be deleted or how should it be changed? Because I found that the maximum acceleration of vehicles leaving the AOI area has been changed, which can cause congestion due to the low speed of vehicles leaving the AOI area. if accel >= 0: traci.vehicle.setAccel(self.id, accel) traci.vehicle.setDecel(self.id, self.maxDecel) else: traci.vehicle.setAccel(self.id, self.maxAccel) traci.vehicle.setDecel(self.id, -accel) else: traci.vehicle.setLaneChangeMode(self.id, 0) traci.vehicle.setSpeedMode(self.id, 0) traci.vehicle.moveToXY(self.id, '', -1, x, y, angle=angle, keepRoute=2) traci.vehicle.setSpeed(self.id, speed) if accel >= 0: traci.vehicle.setAccel(self.id, accel) traci.vehicle.setDecel(self.id, self.maxDecel) else: traci.vehicle.setAccel(self.id, self.maxAccel) traci.vehicle.setDecel(self.id, -accel)