Closed hassanidoudi closed 1 year ago
If you do not open/close lanes during the simulation, then you could use sumolib instead of TraCI: For example sumolib.net.getShortestPath. You can instatiate the sumolib net object like this:
net = sumolib.net.readNet(pathToNet)
route = net.getShortestPath("startEdgeID", "endEdgeID")
Hi all I am programming with c++ and I need a function in traci not sumolib or how can import sumolib in c++.
Findroute returns a stage object not the bool that I need. Regards Hassan
You can use function Simulation.findRoute
from C++:
https://sumo.dlr.de/docs/Libsumo.html
https://sumo.dlr.de/docs/Libtraci.html
There is currently no C++ equivalent for sumolib.
Hi all,
Can I use sumolib inside veins omnet++?
Regards Hassan
As fas as I know, Veins means C++, thus no. Please look into Simulation.findRoute
(see post above).
Hi all,
using veins I cannot use simulation.findroute because veins are already connected to sumo with traci and I couldn't implement a function called findroute in veins to connect with the traci findroute because of the return type (stage object)
Regards, Hassan
At this point your best approach is probably to engage with the Veins developers on Stackoverflow: https://veins.car2x.org/documentation/faq/
Veins has its own interface to generate and process TraCI messages, limited to the functions the developers deem useful. See TraCICommandInterface in their github repo.
Hi all,
I want to check if a route exists between a beginning edge and an end edge using Traci. so get the result of verification.
Regards Hassan