Reputation: 1
How can I implement traffic lights in Veins. I tried looking at the veins_testsims example but I don't understand how to allow exchanging messages with vehicles. I would like traffic lights to be able to exchange messages with vehicles on the network.
I tried to work on veins_testsims but without being able to establish communication between vehicles and traffic lights.
Upvotes: 0
Views: 51
Reputation: 1186
Veins contains example code for traffic lights. The code is located in traci/trafficLight folder. The .ned file is located in the nodes folder. You then need to configure the traffic light in the omnepp.ini file like this:
*.trafficLight[*].mobility.x = 0
*.trafficLight[*].mobility.y = 0
*.trafficLight[*].mobility.z = 3
*.trafficLight[*].applType = "org.car2x.veins.modules.application.traci.TraCITrafficLightProgram"
*.trafficLight[*].logicType = "org.car2x.veins.modules.world.traci.trafficLight.logics.TraCITrafficLightSimpleLogicagationLogic"
Upvotes: 0