我有一个简单的交通信号灯路口,其中已经设置了交通信号灯逻辑.假设一条路的车辆密度在增加,我想在Omnet中检索此数据,并使用C ++逻辑指示交通信号灯更改状态.是否可以在Omnet ++中执行此操作? 简而言之,我希望使用运行SUMO并通过SUMO耦合获得的网络信息来控制流量.是否可以通过Omnet ++控制流量?如果是,那么您能告诉我一个例子吗?
I have a simple traffic light intersection in which I have already set the traffic light logic. Suppose the vehicle density is increasing in one road and I want to retrieve this data in Omnet and use the C++ logic to direct the traffic lights to change state. Is it possible to do this in Omnet++? In short I am looking to control the traffic using the network information obtained by running SUMO and coupling through SUMO. Is it possible to control the traffic through Omnet++? If yes, then can you tell me an example of how to do so?
推荐答案静脉已经包含一些TraCI命令来检索SUMO仿真的状态以及更改交通信号灯. SUMO包含更多的TraCI命令,这些命令应该能够执行您描述的操作.您只需要在已有的基础上在Veins中实现它们即可.
Veins already includes some TraCI commands to retrieve the state of a SUMO simulation, as well as to change traffic lights. SUMO includes many more TraCI commands which should be able to do what you describe. You would just need to implement them in Veins as well, building on what is already there.
更多推荐
如何在Omnet ++中基于归纳回路数据编写交通灯逻辑?
发布评论