答案 0 :(得分:1)
请在此处查看:https://github.com/flow-project/flow/blob/master/flow/benchmarks/figureeight1.py
您可以先迭代添加多辆人力驱动的车辆,然后再添加一些RL车辆。
for i in range(7):
vehicles.add(
veh_id="human{}".format(i),
acceleration_controller=(IDMController, {
"noise": 0.2
}),
routing_controller=(ContinuousRouter, {}),
car_following_params=SumoCarFollowingParams(
speed_mode="obey_safe_speed",
),
num_vehicles=1)
vehicles.add(
veh_id="rl{}".format(i),
acceleration_controller=(RLController, {}),
routing_controller=(ContinuousRouter, {}),
car_following_params=SumoCarFollowingParams(
speed_mode="obey_safe_speed",
),
num_vehicles=1)