Search code examples
omnet++veinssumo

Setting weights for edges in SUMO using Omnet++


I am using Omnet++ 5.3, veins 4.7.1 and Sumo 0.32.0. I want to set weights to the edges in SUMO. Having done some reading, I realise that traci has a function called seteffort in the python version. I am unable to find a similar function to set weights in traci present in the veins version used for omnet++. Any help to achieve the task is appreciated. Thank you!


Solution

  • It is certainly possible to extend Veins by adding new methods to https://github.com/sommer/veins/blob/veins-5.0/src/veins/modules/mobility/traci/TraCICommandInterface.h following the code that is already there.

    The specific method you mentioned, however, might not be a good idea: it is meant to change how every vehicle in the network perceives it. You might be more interested in changing how only a single vehicle chooses its route.