22 #ifndef MSDevice_Vehroutes_h 23 #define MSDevice_Vehroutes_h 216 std::map<const SUMOVehicle*, MSDevice_Vehroutes*, SUMOVehicle::ComparatorIdLess>
myDevices;
228 static std::map<const SUMOTime, std::map<const std::string, std::string> >
myRouteInfos;
248 : edge(edge_), time(time_), route(route_) {}
static std::map< const SUMOTime, int > myDepartureCounts
Map needed to sort vehicles by departure time.
const int myMaxRoutes
The maximum number of routes to report.
Interface for objects listening to vehicle state changes.
const MSRoute * myCurrentRoute
The currently used route.
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.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Does nothing, returns true only if exit times should be collected.
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".
void writeXMLRoute(OutputDevice &os, int index=-1) const
Called on route output.
static bool myIntendedDepart
A shortcut for the Option "vehroute-output.intended-depart".
std::map< const SUMOVehicle *, MSDevice_Vehroutes *, SUMOVehicle::ComparatorIdLess > myDevices
A map for internal notification.
void generateOutput() const
Called on writing vehroutes output.
static void init()
Static intialization.
A road/street connecting two junctions.
MSDevice_Vehroutes & operator=(const MSDevice_Vehroutes &)
Invalidated assignment operator.
int myDepartLane
The lane the vehicle departed at.
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.
Encapsulated SAX-Attributes.
double myDepartPosLat
The lateral depart position.
std::vector< RouteReplaceInfo > myReplacedRoutes
Prior routes.
const std::string deviceName() const
return the name for this type of device
static MSDevice_Vehroutes * buildVehicleDevices(SUMOVehicle &v, std::vector< MSDevice *> &into, int maxRoutes=INT_MAX)
Build devices for the given vehicle, if needed.
~RouteReplaceInfo()
Destructor.
A class that is notified about reroutings.
static void generateOutputForUnfinished()
generate vehroute output for vehicles which are still in the network
void writeOutput(const bool hasArrived) const
Called on writing vehroutes output.
static bool myRouteLength
A shortcut for the Option "vehroute-output.route-length".
VehicleState
Definition of a vehicle state.
void saveState(OutputDevice &out) const
Saves the state of the device.
bool notifyLeave(SUMOVehicle &veh, double lastPos, Notification reason, const MSLane *enteredLane=0)
Saves exit times if needed.
Abstract in-vehicle device.
double myDepartSpeed
The speed on departure.
MSDevice_Vehroutes(SUMOVehicle &holder, const std::string &id, int maxRoutes)
Constructor.
const MSEdge * edge
The edge the vehicle was on when the route was replaced.
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.
void loadState(const SUMOSAXAttributes &attrs)
Loads the state of the device from the given description.
const MSRoute * getRoute(int index) const
Called on route retrieval.
static std::map< const SUMOTime, std::map< const std::string, std::string > > myRouteInfos
double myDepartPos
The lane the vehicle departed at.
Representation of a lane in the micro simulation.
const MSEdge * myLastSavedAt
The last edge the exit time was saved for.
~MSDevice_Vehroutes()
Destructor.
Information about a replaced route.