我正在使用 Flow 创建交通模拟,我应该在我设计的 SUMO 网络中使用 TraCi 管理车辆的速度。不幸的是,我无法理解如何在我的代码中调用 FLOW 提供的 TraCi 原语。我找到了类似的方法,flow.core.kernel.vehicle.base
但它不起作用。
在设置速度之前,我尝试使用下面的代码阅读它。
veh_id = "human" # name of the vehicle
speed = env.k.vehicle.get_speed(veh_id)
我正在使用 Flow 创建交通模拟,我应该在我设计的 SUMO 网络中使用 TraCi 管理车辆的速度。不幸的是,我无法理解如何在我的代码中调用 FLOW 提供的 TraCi 原语。我找到了类似的方法,flow.core.kernel.vehicle.base
但它不起作用。
在设置速度之前,我尝试使用下面的代码阅读它。
veh_id = "human" # name of the vehicle
speed = env.k.vehicle.get_speed(veh_id)