Reputation: 11
I want to simulate the communication between vehicles and traffic lights in VEINS. I have all SUMO files I need, including < tlLogic>...< /tlLogic> sections in my net.xml. But I don't know how to implement those traffic lights in VEINS. Should I present them as a Node module or RSU module or something else? I also cannot find documents or examples for this part.
In the VEINS's official example, it presents vehicles in SUMO as node module in VEINS. Each vehicles in SUMO is corresponding to one node in VEINS. But how about traffic lights? Is each traffic lights corresponding to one node or one RSU in VEINS? I think it might be similar for traffic light. Can anyone give me more hints about how to implement that? Does anyone know any documents/tutorials/examples I can refer to?
Thank you very very much! I will appreciate any responses.
Upvotes: 0
Views: 486
Reputation: 6943
Veins 5.0 can control traffic lights directly, via TraCI and/or it can instantiate traffic lights as OMNeT++ modules. See the veins_testsims
subproject for example code:
Directly accessing a traffic light via TraCI: https://github.com/sommer/veins/blob/veins-5.0/subprojects/veins_testsims/src/veins_testsims/traci/TraCITestApp.cc#L673
Configuring a simulation to instantiate an OMNeT++ module for given traffic lights (here: traffic light 10
): https://github.com/sommer/veins/blob/veins-5.0/subprojects/veins_testsims/sim/veins_testsims/traci/omnetpp.ini#L55
Example "traffic light logic" submodule of an OMNeT++ "traffic light" module: https://github.com/sommer/veins/blob/veins-5.0/subprojects/veins_testsims/src/veins_testsims/traci/TraCITrafficLightTestLogic.cc#L35
Upvotes: 2