如何在Omnet ++中基于归纳回路数据编写交通灯逻辑? [英] How can I write Traffic Light logic based on Induction Loop data in Omnet++?

查看:123
本文介绍了如何在Omnet ++中基于归纳回路数据编写交通灯逻辑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的交通信号灯路口,其中已经设置了交通信号灯逻辑.假设一条路的车辆密度在增加,我想在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 ++中基于归纳回路数据编写交通灯逻辑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆