 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
19 #ifndef MSDevice_Vehroutes_h
20 #define MSDevice_Vehroutes_h
173 void addRoute(
const std::string& info);
221 std::map<const SUMOVehicle*, MSDevice_Vehroutes*, ComparatorNumericalIdLess>
myDevices;
233 static std::map<const SUMOTime, std::map<const std::string, std::string> >
myRouteInfos;
static bool myDUAStyle
A shortcut for the Option "vehroute-output.dua".
const MSRoute * getRoute(int index) const
Called on route retrieval.
Representation of a vehicle or person.
const MSRoute * route
The prior route.
static std::map< const SUMOTime, std::map< const std::string, std::string > > myRouteInfos
~RouteReplaceInfo()
Destructor.
Representation of a lane in the micro simulation.
An output device that encapsulates an ofstream.
static bool myIncludeIncomplete
A shortcut for the Option "vehroute-output.incomplete".
std::map< const SUMOVehicle *, MSDevice_Vehroutes *, ComparatorNumericalIdLess > myDevices
A map for internal notification.
Static storage of an output device and its base (abstract) implementation.
void loadState(const SUMOSAXAttributes &attrs)
Loads the state of the device from the given description.
std::vector< SUMOTime > myExits
The times the vehicle exites an edge.
void generateOutput() const
Called on writing vehroutes output.
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Does nothing, returns true only if exit times should be collected.
static void init()
Static intialization.
Interface for objects listening to vehicle state changes.
static bool mySaveExits
A shortcut for the Option "vehroute-output.exit-times".
const int myMaxRoutes
The maximum number of routes to report.
Representation of a vehicle.
double myDepartPosLat
The lateral depart position.
MSDevice_Vehroutes & operator=(const MSDevice_Vehroutes &)
Invalidated assignment operator.
bool notifyLeave(SUMOTrafficObject &veh, double lastPos, Notification reason, const MSLane *enteredLane=0)
Saves exit times if needed.
static std::map< const SUMOTime, int > myDepartureCounts
Map needed to sort vehicles by departure time.
SUMOTime time
The time the route was replaced.
A class that is notified about reroutings.
const MSEdge * edge
The edge the vehicle was on when the route was replaced.
const MSRoute * myCurrentRoute
The currently used route.
static bool myWriteCosts
A shortcut for the Option "vehroute-output.costs".
static StateListener myStateListener
A class that is notified about reroutings.
std::string info
Information regarding rerouting.
static bool myRouteLength
A shortcut for the Option "vehroute-output.route-length".
void saveState(OutputDevice &out) const
Saves the state of the device.
static bool mySorted
A shortcut for the Option "vehroute-output.sorted".
VehicleState
Definition of a vehicle state.
static MSDevice_Vehroutes * buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into, int maxRoutes=std::numeric_limits< int >::max())
Build devices for the given vehicle, if needed.
static bool mySkipPTLines
A shortcut for the Option "vehroute-output.skip-ptlines".
static void generateOutputForUnfinished()
generate vehroute output for vehicles which are still in the network
Information about a replaced route.
void writeXMLRoute(OutputDevice &os, int index=-1) const
Called on route output.
~StateListener()
Destructor.
A road/street connecting two junctions.
void vehicleStateChanged(const SUMOVehicle *const vehicle, MSNet::VehicleState to, const std::string &info="")
Called if a vehicle changes its state.
static bool myLastRouteOnly
A shortcut for the Option "vehroute-output.last-route".
int myDepartLane
The lane the vehicle departed at.
static bool myIntendedDepart
A shortcut for the Option "vehroute-output.intended-depart".
MSDevice_Vehroutes(SUMOVehicle &holder, const std::string &id, int maxRoutes)
Constructor.
void stopEnded(const SUMOVehicleParameter::Stop &stop)
void addRoute(const std::string &info)
Called on route change.
double myDepartPos
The lane the vehicle departed at.
A device which collects info on the vehicle trip (mainly on departure and arrival)
const std::string deviceName() const
return the name for this type of device
const MSEdge * myLastSavedAt
The last edge the exit time was saved for.
std::vector< RouteReplaceInfo > myReplacedRoutes
Prior routes.
void writeOutput(const bool hasArrived) const
Called on writing vehroutes output.
~MSDevice_Vehroutes()
Destructor.
Encapsulated SAX-Attributes.
Notification
Definition of a vehicle state.
OutputDevice_String myStopOut
RouteReplaceInfo(const MSEdge *const edge_, const SUMOTime time_, const MSRoute *const route_, const std::string &info_)
Constructor.
Definition of vehicle stop (position and duration)
double myDepartSpeed
The speed on departure.
Abstract in-vehicle device.