 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
80 for (
auto i = vehInfos.begin(); i != vehInfos.end(); ++i) {
81 if (i->myVeh == veh) {
97 std::sort(vehInfos.begin(), vehInfos.end());
98 for (
auto i = vehInfos.begin(); i != vehInfos.end();) {
131 i = vehInfos.erase(i);
145 const double departPos = 0;
155 i = vehInfos.erase(i);
166 i = vehInfos.erase(i);
207 if (vehInfo.myParking) {
219 if (veh ==
nullptr) {
226 if (parkingLane !=
nullptr) {
double processNextStop(double currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
double getCurrentTravelTime(const double minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Left blinker lights are switched on.
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
A lane area vehicles can halt at.
bool enterLaneAtMove(MSLane *enteredLane, bool onTeleporting=false)
Update when the vehicle enters a new lane in the move step.
Representation of a lane in the micro simulation.
virtual std::string getString(int id) const =0
Returns the string-value of the named (by its enum-value) attribute.
void remove(MSVehicle *veh)
Remove a vehicle from this transfer object.
Static storage of an output device and its base (abstract) implementation.
void notifyEgressBlocked()
update state so that vehicles wishing to enter cooperate with exiting vehicles
Right blinker lights are switched on.
MSVehicleTransfer()
Constructor.
void setTentativeLaneAndPosition(MSLane *lane, double pos, double posLat=0)
set tentative lane and position during insertion to ensure that all cfmodels work (some of them requi...
FXSynchQue< VehicleInformation, std::vector< VehicleInformation > > myVehicles
The information about stored vehicles to move virtually.
void informVehicleStateListener(const SUMOVehicle *const vehicle, VehicleState to, const std::string &info="")
Informs all added listeners about a vehicle's state change.
bool isParking() const
Returns whether the vehicle is parking.
MSInsertionControl & getInsertionControl()
Returns the insertion control.
bool keepStopping(bool afterProcessing=false) const
Returns whether the vehicle is stopped and must continue to do so.
double getInsertionPosition(const SUMOVehicle &forVehicle) const
Returns the insertion position of a parked vehicle.
void onRemovalFromNet(const MSMoveReminder::Notification reason)
Called when the vehicle is removed from the network.
#define WRITE_WARNINGF(...)
void scheduleVehicleRemoval(SUMOVehicle *veh, bool checkDuplicate=false)
Removes a vehicle after it has ended.
The vehicle was teleported out of the net.
double getMaxSpeed() const
Returns the maximum speed.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static MSVehicleTransfer * getInstance()
Returns the instance of this object.
double getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
const MSEdge * getEdge() const
Returns the edge the vehicle is currently at.
void switchOnSignal(int signal)
Switches the given signal on.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
void addParking(MSVehicle *veh)
add parking vehicle. This should only used during state loading
void leaveLane(const MSMoveReminder::Notification reason, const MSLane *approachedLane=0)
Update of members if vehicle leaves a new lane in the lane change step or at arrival.
SUMOVehicle * getVehicle(const std::string &id) const
Returns the vehicle with the given id.
bool isInsertionSuccess(MSVehicle *vehicle, double speed, double pos, double posLat, bool recheckNextLanes, MSMoveReminder::Notification notification)
Tries to insert the given vehicle with the given state (speed and pos)
The vehicles starts to park.
double getPositionOnLane() const
Get the vehicle's position along the lane.
static const double TeleportMinSpeed
The minimum speed while teleporting.
static MSVehicleTransfer * myInstance
The static singleton-instance.
MSAbstractLaneChangeModel & getLaneChangeModel()
The vehicle started to teleport.
static bool gModelParkingManoeuver
whether parking simulation includes manoeuver time and any associated lane blocking
std::string time2string(SUMOTime t)
bool freeInsertion(MSVehicle &veh, double speed, double posLat, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
Tries to insert the given vehicle on any place.
A road/street connecting two junctions.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
const std::vector< MSLane * > * allowedLanes(const MSEdge &destination, SUMOVehicleClass vclass=SVC_IGNORING) const
Get the allowed lanes to reach the destination-edge.
void checkInsertions(SUMOTime time)
Checks "movement" of stored vehicles.
MSLane * getLane() const
Returns the lane the vehicle is on.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Vehicle maneuvering either entering or exiting a parking space.
The vehicle starts or ends parking.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSLane * getFreeLane(const std::vector< MSLane * > *allowed, const SUMOVehicleClass vclass, double departPos) const
Finds the emptiest lane allowing the vehicle class.
void endLaneChangeManeuver(const MSMoveReminder::Notification reason=MSMoveReminder::NOTIFICATION_LANE_CHANGE)
const MSEdge * succEdge(int nSuccs) const
Returns the nSuccs'th successor of edge the vehicle is currently at.
NumericalID getNumericalID() const
return the numerical ID which is only for internal usage
virtual ~MSVehicleTransfer()
Destructor.
The vehicle ends to park.
const std::string & getID() const
Returns the name of the vehicle.
bool signalSet(int which) const
Returns whether the given signal is on.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
virtual void removeParking(MSVehicle *veh)
remove parking vehicle. This must be syncrhonized when running with GUI
The vehicle ended being teleported.
void add(const SUMOTime t, MSVehicle *veh)
Adds a vehicle to this transfer object.
The class responsible for building and deletion of vehicles.
double getSpeed() const
Returns the vehicle's current speed.
void loadState(const SUMOSAXAttributes &attrs, const SUMOTime offset, MSVehicleControl &vc)
Loads one transfer vehicle state from the given descriptionn.
MSParkingArea * getCurrentParkingArea()
get the current parking area stop or nullptr
bool setExitManoeuvre()
accessor function to myManoeuvre equivalent
double getSpeedLimit() const
Returns the lane's maximum allowed speed.
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
void saveState(OutputDevice &out)
Saves the current state into the given stream.
virtual long long int getLong(int id) const =0
Returns the long-value of the named (by its enum-value) attribute.
Encapsulated SAX-Attributes.
const std::string & getID() const
Returns the id.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
The vehicle is being teleported.
Representation of a vehicle in the micro simulation.
void alreadyDeparted(SUMOVehicle *veh)
stops trying to emit the given vehicle (because it already departed)