I am trying to create a function to calculate a route based on two arguments/roads (begin and end). The function should return a list of edges that compose the route.
I know that exists a findRoute() function in the sumo, but I think that it was not implemented in the VEINS. I tried to implement it, but the function does not work for me.
My code below
std::string TraCICommandInterface::Vehicle::findRoute(std::string b, std::string e) {
uint8_t variableId = CMD_SUBSCRIBE_ROUTE_CONTEXT;
uint8_t variableType = TYPE_COMPOUND;
uint8_t edgeIdT = TYPE_STRING;
int32_t count = 3;
std::string begin = b;
std::string end = e;
TraCIBuffer buf = connection->query(CMD_SET_VEHICLE_VARIABLE, TraCIBuffer() << variableId << nodeId << variableType << begin << end << "" << 1 << 0);
ASSERT(buf.eof());
}
When I call this function I get an error.
traciVehicle->findRoute("167283892#2", "-439375716#1");
Note1: About the route, in fact, I want to use the options of algorithms implemented on sumo, such as :dijkstra, astar, etc.
Anybody can help me?