如何在Omnet ++中基于归纳回路数据编写交通灯逻辑?

编程入门 行业动态 更新时间:2024-10-25 08:17:16
本文介绍了如何在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 ++中基于归纳回路数据编写交通灯逻辑?

本文发布于:2023-10-30 11:36:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1542740.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:交通灯   回路   归纳   逻辑   数据

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!