hello,

I am changing the route of a vehicle before it reaches the destination  
and get deleted to a new destination according to a certain input file
as follows

// build a new route between the vehicle's current edge and destination edge
             MSEdgeVector newRoute;
             const MSEdge* currentEdge = veh->getEdge();
                        int edgeID= MSEdge::dictSize()-2;

                        const MSEdge* destEdge=select_new_destination(veh);

             MSNet::getInstance()->getRouterTT().compute(
                 currentEdge, destEdge, (const MSVehicle * const) veh,  
MSNet::getInstance()->getCurrentTimeStep(), newRoute);
             // replace the vehicle's route by the new one
             if (!veh->replaceRouteEdges(newRoute)) {
                  WRITE_ERROR( "Route replacement failed for " + veh->getID());
             }

however the information in the input file about the vehicle new  
destination is in terms of node id.
is there a way to map a node to the nearest edge. is there a function  
for that?

best regards



------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to