22 #ifndef MSDevice_Vehroutes_h
23 #define MSDevice_Vehroutes_h
194 std::map<const SUMOVehicle*, MSDevice_Vehroutes*, Named::NamedLikeComparatorIdLess<SUMOVehicle> >
myDevices;
206 static std::map<const SUMOTime, std::map<const std::string, std::string> >
myRouteInfos;
static std::map< const SUMOTime, int > myDepartureCounts
Map needed to sort vehicles by departure time.
static bool myWithTaz
A shortcut for the Option "device.routing.with-taz".
Interface for objects listening to vehicle state changes.
const MSRoute * myCurrentRoute
The currently used route.
MSDevice_Vehroutes(SUMOVehicle &holder, const std::string &id, unsigned int maxRoutes)
Constructor.
static StateListener myStateListener
A class that is notified about reroutings.
void vehicleStateChanged(const SUMOVehicle *const vehicle, MSNet::VehicleState to)
Called if a vehicle changes its state.
static bool myDUAStyle
A shortcut for the Option "vehroute-output.dua".
Notification
Definition of a vehicle state.
RouteReplaceInfo(const MSEdge *const edge_, const SUMOTime time_, const MSRoute *const route_)
Constructor.
std::vector< SUMOTime > myExits
The times the vehicle exites an edge.
static bool mySorted
A shortcut for the Option "vehroute-output.sorted".
static bool mySaveExits
A shortcut for the Option "vehroute-output.exit-times".
bool notifyLeave(SUMOVehicle &veh, SUMOReal lastPos, Notification reason)
Saves exit times if needed.
static bool myIntendedDepart
A shortcut for the Option "vehroute-output.intended-depart".
static void init()
Static intialization.
A road/street connecting two junctions.
MSDevice_Vehroutes & operator=(const MSDevice_Vehroutes &)
Invalidated assignment operator.
static bool myLastRouteOnly
A shortcut for the Option "vehroute-output.last-route".
void addRoute()
Called on route change.
~StateListener()
Destructor.
Representation of a vehicle.
const MSRoute * route
The prior route.
std::vector< RouteReplaceInfo > myReplacedRoutes
Prior routes.
~RouteReplaceInfo()
Destructor.
A class that is notified about reroutings.
const unsigned int myMaxRoutes
The maximum number of routes to report.
static void generateOutputForUnfinished()
generate vehroute output for vehicles which are still in the network
VehicleState
Definition of a vehicle state.
Abstract in-vehicle device.
const MSEdge * edge
The edge the vehicle was on when the route was replaced.
static MSDevice_Vehroutes * buildVehicleDevices(SUMOVehicle &v, std::vector< MSDevice * > &into, unsigned int maxRoutes=INT_MAX)
Build devices for the given vehicle, if needed.
void writeXMLRoute(OutputDevice &os, int index=-1) const
Called on route output.
A device which collects info on the vehicle trip (mainly on departure and arrival) ...
Static storage of an output device and its base (abstract) implementation.
SUMOTime time
The time the route was replaced.
static std::map< const SUMOTime, std::map< const std::string, std::string > > myRouteInfos
std::map< const SUMOVehicle *, MSDevice_Vehroutes *, Named::NamedLikeComparatorIdLess< SUMOVehicle > > myDevices
A map for internal notification.
void generateOutput() const
Called on writing tripinfo output.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason)
Does nothing, returns true only if exit times should be collected.
const MSRoute * getRoute(int index) const
Called on route retrieval.
const MSEdge * myLastSavedAt
The last edge the exit time was saved for.
~MSDevice_Vehroutes()
Destructor.
Information about a replaced route.