120 const double _lanePos,
const int _routePos)
159 for (std::vector<VehicleState>::const_iterator i =
updates.begin(); i !=
updates.end(); ++i) {
160 ret.
add((*i).position);
186 static std::map<std::string, VehicleInformation*>
sVehicles;
std::vector< const MSEdge * > ConstMSEdgeVector
A class that stores a 2D geometrical boundary.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
A single movement state of the vehicle.
~VehicleState()
Destructor.
int routePos
The position in the route of the vehicle.
double speed
The speed of the vehicle.
Position position
The position of the vehicle.
VehicleState(const double _speed, const Position &_position, const std::string &_laneID, const double _lanePos, const int _routePos)
Constructor.
double lanePos
The position at the lane of the vehicle.
std::string laneID
The lane the vehicle was at.
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Adds the vehicle to running vehicles if it (re-) enters the network.
MSDevice_BTsender & operator=(const MSDevice_BTsender &)
Invalidated assignment operator.
bool notifyLeave(SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Moves (the known) vehicle from running to arrived vehicles' list.
static std::string getLocation(const SUMOTrafficObject &o)
return either lane or edge id (depending on availability)
MSDevice_BTsender(const MSDevice_BTsender &)
Invalidated copy constructor.
~MSDevice_BTsender()
Destructor.
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Checks whether the reminder still has to be notified about the vehicle moves.
static void cleanup()
removes remaining vehicleInformation in sVehicles
static std::map< std::string, VehicleInformation * > sVehicles
The list of arrived senders.
MSDevice_BTsender()
Constructor.
Representation of a lane in the micro simulation.
Notification
Definition of a vehicle state.
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Checks whether the reminder is activated by a vehicle entering the lane.
const std::string deviceName() const
return the name for this type of device
bool notifyLeave(SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Called if the vehicle leaves the reminder's lane.
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_BTsender-options.
MSTransportableDevice_BTsender(MSTransportable &holder, const std::string &id)
Constructor.
static void buildDevices(MSTransportable &t, std::vector< MSTransportableDevice * > &into)
Build devices for the given vehicle, if needed.
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Checks whether the reminder still has to be notified about the vehicle moves.
Abstract in-person device.
MSVehicleDevice_BTsender(SUMOVehicle &holder, const std::string &id)
Constructor.
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_BTsender-options.
bool notifyLeave(SUMOTrafficObject &veh, double lastPos, Notification reason, const MSLane *enteredLane=0)
Called if the vehicle leaves the reminder's lane.
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Checks whether the reminder still has to be notified about the vehicle moves.
bool notifyEnter(SUMOTrafficObject &veh, Notification reason, const MSLane *enteredLane=0)
Checks whether the reminder is activated by a vehicle entering the lane.
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into)
Build devices for the given vehicle, if needed.
const std::string deviceName() const
return the name for this type of device
Abstract in-vehicle device.
Base class for objects which have an id.
A storage for options typed value containers)
A point in 2D or 3D with translation and scaling methods.
Representation of a vehicle, person, or container.
Representation of a vehicle.