52 #define BEST_LANE_LOOKAHEAD 3000.0 66 const std::string& streetName,
67 const std::string& edgeType,
69 Named(id), myNumericalID(numericalID), myLanes(nullptr),
70 myLaneChanger(nullptr), myFunction(function), myVaporizationRequests(0),
71 myLastFailedInsertionTime(-1),
72 myFromJunction(nullptr), myToJunction(nullptr),
73 myStreetName(streetName),
78 myEmptyTraveltime(0.),
80 myAmRoundabout(false),
94 for (
auto i1 : i2.second) {
111 for (std::vector<MSLane*>::const_iterator i =
myLanes->begin(); i !=
myLanes->end(); ++i) {
114 double widthBefore = 0;
115 for (std::vector<MSLane*>::const_iterator i =
myLanes->begin(); i !=
myLanes->end(); ++i) {
116 (*i)->setRightSideOnEdge(widthBefore, (
int)
mySublaneSides.size());
121 widthBefore += (*i)->getWidth();
136 for (std::vector<MSLane*>::const_iterator i =
myLanes->begin(); i !=
myLanes->end(); ++i) {
139 for (MSLinkCont::const_iterator j = lc.begin(); j != lc.end(); ++j) {
142 if (minPenalty == -1) {
143 minPenalty = linkPenalty;
145 minPenalty =
MIN2(minPenalty, linkPenalty);
149 if (minPenalty > 0) {
159 for (
MSLink*
const link : lane->getLinkCont()) {
160 link->initParallelLinks();
161 MSLane*
const toL = link->getLane();
162 MSLane*
const viaL = link->getViaLane();
163 if (toL !=
nullptr) {
176 if (viaL !=
nullptr) {
217 for (std::vector<MSLane*>::const_iterator it =
myLanes->begin(); it !=
myLanes->end(); ++it) {
238 if (allowedLanes->empty()) {
240 allowedLanes =
nullptr;
242 for (
auto& allowed : laneCont) {
243 if (*allowed.second == *allowedLanes) {
245 allowedLanes =
nullptr;
246 allowed.first |= permissions;
251 if (allowedLanes !=
nullptr) {
252 laneCont.push_back(std::make_pair(permissions, allowedLanes));
268 if (i.second != myLanes) {
274 myAllowed.push_back(std::make_pair(
SVC_IGNORING, myLanes));
277 std::vector<MSLane*>*
allowedLanes =
new std::vector<MSLane*>();
278 for (
MSLane*
const lane : *myLanes) {
279 if (lane->allowsVehicleClass(vclass)) {
280 allowedLanes->push_back(lane);
294 for (
const auto i1 : i2.second) {
300 myAllowedTargets.clear();
303 bool universalMap =
true;
304 std::vector<MSLane*>* allLanes =
new std::vector<MSLane*>();
308 for (
const MSLink*
const link : lane->getLinkCont()) {
309 if (&link->getLane()->getEdge() == target) {
310 allLanes->push_back(lane);
311 combinedTargetPermissions |= link->getLane()->getPermissions();
314 if (combinedTargetPermissions == 0 || (lane->getPermissions() & combinedTargetPermissions) != lane->getPermissions()) {
315 universalMap =
false;
325 addToAllowed(i.first,
new std::vector<MSLane*>(*i.second), myAllowedTargets[target]);
333 std::vector<MSLane*>*
allowedLanes =
new std::vector<MSLane*>();
334 for (
MSLane*
const lane : *myLanes) {
335 if (lane->allowsVehicleClass(vclass)) {
336 for (
const MSLink*
const link : lane->getLinkCont()) {
337 if (link->getLane()->allowsVehicleClass(vclass) && &link->getLane()->getEdge() == target) {
338 allowedLanes->push_back(lane);
343 addToAllowed(vclass, allowedLanes, myAllowedTargets[target]);
348 if (updateVehicles) {
352 veh->updateBestLanes(
true);
354 lane->releaseVehicles();
377 if (index == (
int)
myLanes->size()) {
380 const int resultIndex = index + offset;
381 if (resultIndex >= (
int)
myLanes->size() || resultIndex < 0) {
384 return (*
myLanes)[resultIndex];
389 const std::vector<MSLane*>*
391 AllowedLanesByTarget::const_iterator i =
myAllowedTargets.find(&destination);
393 for (
const auto& allowed : i->second) {
394 if ((allowed.first & vclass) == vclass) {
395 return allowed.second;
403 const std::vector<MSLane*>*
410 if ((allowed.first & vclass) == vclass) {
411 return allowed.second;
437 if (allowed ==
nullptr) {
441 if (allowed !=
nullptr) {
442 double largestGap = 0;
443 MSLane* resByGap =
nullptr;
444 double leastOccupancy = std::numeric_limits<double>::max();;
445 for (std::vector<MSLane*>::const_iterator i = allowed->begin(); i != allowed->end(); ++i) {
446 const double occupancy = (*i)->getBruttoOccupancy();
447 if (occupancy < leastOccupancy) {
449 leastOccupancy = occupancy;
451 const MSVehicle* last = (*i)->getLastFullVehicle();
453 if (lastGap > largestGap) {
454 largestGap = lastGap;
458 if (resByGap !=
nullptr) {
491 for (std::vector<MSLane*>::const_iterator i =
myLanes->begin(); i !=
myLanes->end(); ++i) {
492 MSVehicle* last = (*i)->getLastFullVehicle();
493 if (last !=
nullptr) {
531 const std::vector<MSVehicle::LaneQ>& bl = veh.
getBestLanes();
532 double bestLength = -1;
533 for (std::vector<MSVehicle::LaneQ>::const_iterator i = bl.begin(); i != bl.end(); ++i) {
534 if ((*i).length > bestLength) {
535 bestLength = (*i).length;
541 double departPos = 0;
546 std::vector<MSLane*>* bestLanes =
new std::vector<MSLane*>();
547 for (std::vector<MSVehicle::LaneQ>::const_iterator i = bl.begin(); i != bl.end(); ++i) {
548 if (((*i).length - departPos) >= bestLength) {
549 bestLanes->push_back((*i).lane);
558 for (std::vector<MSLane*>::const_iterator i =
myLanes->begin(); i !=
myLanes->end(); ++i) {
584 if (speedFactorParams[1] > 0.) {
592 "' is too high for the departure edge '" +
getID() +
"'.");
609 v.
getID() +
"'. Inserting at lane end instead.");
624 while (segment !=
nullptr && !result) {
647 if (insertionLane ==
nullptr) {
655 for (std::vector<MSLane*>::const_iterator i =
myLanes->begin(); i !=
myLanes->end(); ++i) {
656 const double occupancy = (*i)->getBruttoOccupancy();
665 if (insertionLane ==
nullptr) {
681 bool success = insertionLane->
insertVehicle(static_cast<MSVehicle&>(v));
704 for (
const MSLink*
const link : l->getLinkCont()) {
705 if (&link->getLane()->getEdge() == followerAfterInternal) {
706 if (link->getViaLane() !=
nullptr) {
707 return &link->getViaLane()->getEdge();
719 assert(followerAfterInternal != 0);
724 while (edge !=
nullptr && edge->
isInternal()) {
733 const MSEdge* result =
this;
747 const int vehNo = segment->getCarNumber();
749 v += vehNo * segment->getMeanSpeed();
757 for (std::vector<MSLane*>::const_iterator i =
myLanes->begin(); i !=
myLanes->end(); ++i) {
758 const double vehNo = (double)(*i)->getVehicleNumber();
759 v += vehNo * (*i)->getMeanSpeed();
772 assert(minSpeed > 0);
789 DictType::iterator it =
myDict.find(
id);
805 DictType::iterator it =
myDict.find(
id);
816 return (
int)
myDict.size();
828 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); ++i) {
838 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); ++i) {
839 into.push_back((*i).first);
846 const std::string& rid) {
848 std::istringstream in(desc, std::ios::binary);
861 const std::string& rid) {
862 for (std::vector<std::string>::const_iterator i = desc.begin(); i != desc.end(); ++i) {
865 if (edge ==
nullptr) {
866 throw ProcessError(
"The edge '" + *i +
"' within the route " + rid +
" is not known." 867 +
"\n The route can not be build.");
869 into.push_back(edge);
876 if (doBoundaryEstimate) {
888 return getLanes()[0]->getShape()[-1].distanceTo2D(other->
getLanes()[0]->getShape()[0]);
907 return myLanes->empty() ? 1 :
getLanes()[0]->getLengthGeometryFactor();
920 for (std::vector<MSLane*>::const_iterator i =
myLanes->begin(); i !=
myLanes->end(); ++i) {
921 (*i)->setMaxSpeed(val);
928 std::vector<MSTransportable*>
932 for (std::vector<MSLane*>::const_iterator i =
myLanes->begin(); i !=
myLanes->end(); ++i) {
934 for (MSLane::VehCont::const_iterator j = vehs.begin(); j != vehs.end(); ++j) {
935 const std::vector<MSTransportable*>& persons = (*j)->getPersons();
936 result.insert(result.end(), persons.begin(), persons.end());
938 (*i)->releaseVehicles();
946 std::vector<MSTransportable*>
986 if (MSRoutingEngine::isParallel()) {
987 MSRoutingEngine::lock();
997 if ((*it)->isTazConnector()) {
998 i->second.push_back(*it);
1000 const std::vector<MSLane*>* allowed =
allowedLanes(**it, vClass);
1001 if (allowed !=
nullptr && allowed->size() > 0) {
1002 i->second.push_back(*it);
1009 if (MSRoutingEngine::isParallel()) {
1010 MSRoutingEngine::unlock();
1023 if (MSRoutingEngine::isParallel()) {
1024 MSRoutingEngine::lock();
1031 if (MSRoutingEngine::isParallel()) {
1032 MSRoutingEngine::unlock();
1041 if (viaPair.first->isTazConnector()) {
1042 result.push_back(viaPair);
1044 const std::vector<MSLane*>* allowed =
allowedLanes(*viaPair.first, vClass);
1045 if (allowed !=
nullptr && allowed->size() > 0) {
1046 result.push_back(viaPair);
1051 if (MSRoutingEngine::isParallel()) {
1052 MSRoutingEngine::unlock();
1072 return (!
myLanes->empty() &&
myLanes->back()->getOpposite() !=
nullptr &&
1080 if (!
myLanes->empty() &&
myLanes->back()->getOpposite() !=
nullptr) {
1081 return &(
myLanes->back()->getOpposite()->getEdge());
1090 for (std::vector<MSLane*>::const_iterator i =
myLanes->begin(); i !=
myLanes->end(); ++i) {
1092 for (MSLinkCont::const_iterator j = lc.begin(); j != lc.end(); ++j) {
1093 if (!(*j)->havePriority()) {
1106 WRITE_ERROR(
"Bidi-edge '" + bidiID +
"' does not exist");
1114 for (ConstMSEdgeVector::const_iterator it = candidates.begin(); it != candidates.end(); it++) {
1127 if (other ==
nullptr || other->
getLanes().size() !=
myLanes->size()) {
1130 std::vector<MSLane*>::const_iterator it1 =
myLanes->begin();
1131 std::vector<MSLane*>::const_reverse_iterator it2 = other->
getLanes().rbegin();
1133 if ((*it1)->getShape().reverse() != (*it2)->getShape()) {
1138 }
while (it1 !=
myLanes->end());
double distanceTo2D(const Position &p) const
returns the euclidean distance in the x-y-plane
void laneChange(SUMOTime t)
Start lane-change-process for all vehicles on the edge'e lanes.
const SumoXMLEdgeFunc myFunction
the purpose of the edge
bool myAmDelayed
whether this edge had a vehicle with less than max speed on it
double getDepartPosBound(const MSVehicle &veh, bool upper=true) const
return upper bound for the depart position on this edge
double getBruttoOccupancy() const
Returns the brutto (including minGaps) occupancy of this lane during the last step.
MESegment * getNextSegment() const
Returns the following segment on the same edge (0 if it is the last).
double getLengthWithGap() const
Get vehicle's length including the minimum gap [m].
static double gLateralResolution
MSLane * getLogicalPredecessorLane() const
get the most likely precedecessor lane (sorted using by_connections_to_sorter). The result is cached ...
bool insertVehicle(SUMOVehicle &v, SUMOTime time, const bool checkOnly=false, const bool forceCheck=false) const
Tries to insert the given vehicle into the network.
std::set< MSTransportable * > myContainers
Containers on the edge.
MSEdge & getEdge() const
Returns the lane's edge.
Representation of a vehicle in the micro simulation.
static void insertIDs(std::vector< std::string > &into)
Inserts IDs of all known edges into the given vector.
void checkAndRegisterBiDirEdge(const std::string &bidiID="")
check and register the opposite superposable edge if any
AllowedLanesByTarget myAllowedTargets
From target edge to lanes allowed to be used to reach it.
Sorts edges by their ids.
A vehicle from the mesoscopic point of view.
MSEdge(const std::string &id, int numericalID, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, int priority)
Constructor.
MESegment * getSegmentForEdge(const MSEdge &e, double pos=0)
Get the segment for a given edge at a given position.
MSLane * parallelLane(const MSLane *const lane, int offset) const
Returns the lane with the given offset parallel to the given lane one or 0 if it does not exist...
SUMOTime getMesoTLSPenalty() const
Returns the time penalty for passing a tls-controlled link (meso)
static double gMesoTLSPenalty
double getLengthGeometryFactor() const
return shape.length() / myLength
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
static int dictSize()
Returns the number of edges.
void addSuccessor(MSEdge *edge, const MSEdge *via=nullptr)
Adds an edge to the list of edges which may be reached from this edge and to the incoming of the othe...
bool initialise(MEVehicle *veh, SUMOTime time)
Inserts (emits) vehicle into the segment.
static void readEdgeVector(std::istream &in, std::vector< const E *> &edges, const std::string &rid)
Reads an edge vector binary.
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
void recalcCache()
Recalculates the cached values.
This is an uncontrolled, minor link, has to stop.
const MSEdgeVector & getPredecessors() const
The base class for an intersection.
static MSEdgeVector myEdges
Static list of edges.
std::vector< double > & getParameter()
Returns the parameters of this distribution.
std::vector< std::pair< const MSEdge *, const MSEdge * > > MSConstEdgePairVector
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
double getPositionOnLane() const
Get the vehicle's position along the lane.
virtual double getEdgePos(SUMOTime now) const
static double rand(std::mt19937 *rng=0)
Returns a random real number in [0, 1)
const SUMOVehicleParameter & getParameter() const
Returns the vehicle's parameter (including departure definition)
The least occupied lane is used.
The link is a 180 degree turn.
void buildSegmentsFor(const MSEdge &e, const OptionsCont &oc)
Build the segments for a given edge.
std::string time2string(SUMOTime t)
virtual ~MSEdge()
Destructor.
const std::vector< MSLane * > * allowedLanes(const MSEdge &destination, SUMOVehicleClass vclass=SVC_IGNORING) const
Get the allowed lanes to reach the destination-edge.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
double getMeanSpeed() const
get the mean speed
const MSRoute & getRoute() const
Returns the current route.
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary...
std::vector< double > mySublaneSides
the right side for each sublane on this edge
This is an uncontrolled, right-before-left link.
SUMOTime incVaporization(SUMOTime t)
Enables vaporization.
The lane is chosen randomly.
std::vector< const MSEdge * > ConstMSEdgeVector
void initialize(const std::vector< MSLane *> *lanes)
Initialize the edge.
const std::string & getID() const
Returns the id.
MSConstEdgePairVector myViaSuccessors
const SVCPermissions SVCAll
all VClasses are allowed
int myVaporizationRequests
Vaporizer counter.
int operator()(const MSTransportable *const c1, const MSTransportable *const c2) const
comparing operator
double getLength() const
return the length of the edge
int size() const
Returns the number of edges to pass.
const MSJunction * getToJunction() const
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep, bool includeRiding=false) const
Returns this edge's persons sorted by pos.
The least occupied lane from best lanes.
The position is chosen randomly.
SUMOTime decVaporization(SUMOTime t)
Disables vaporization.
int getNumericalID() const
Returns the numerical id of the edge.
This is an uncontrolled, all-way stop link.
double getSpeedLimit() const
Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be...
#define WRITE_WARNING(msg)
std::map< std::string, MSEdge *> DictType
definition of the static dictionary type
The car-following model and parameter.
bool isVaporizing() const
Returns whether vehicles on this edge shall be vaporized.
static OptionsCont & getOptions()
Retrieves the options.
Performs lane changing of vehicles.
LinkState getState() const
Returns the current state of the link.
double getCurrentTravelTime(const double minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
bool hasSpaceFor(const MEVehicle *veh, SUMOTime entryTime, bool init=false) const
Returns whether the given vehicle would still fit into the segment.
The link is a straight direction.
void addToAllowed(const SVCPermissions permissions, const std::vector< MSLane *> *allowedLanes, AllowedLanesCont &laneCont) const
Performs lane changing of vehicles.
double departSpeed
(optional) The initial speed of the vehicle
A road/street connecting two junctions.
bool insertVehicle(MSVehicle &v)
Tries to insert the given vehicle.
SUMOTime myLastFailedInsertionTime
The time of last insertion failure.
MSTransportable::Stage * getCurrentStage() const
Return the current stage.
std::map< SUMOVehicleClass, MSEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
void rebuildAllowedLanes()
const int SUMOVehicleClass_MAX
int getIndex() const
Returns the lane's index.
#define BEST_LANE_LOOKAHEAD
DepartSpeedDefinition departSpeedProcedure
Information how the vehicle's initial speed shall be chosen.
virtual void setChosenSpeedFactor(const double factor)=0
double myLength
the length of the edge (cached value for speedup)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Representation of a vehicle.
double startPos
The stopping position start.
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
The least occupied lane from lanes which allow the continuation.
This is an uncontrolled, minor link, has to brake.
AllowedLanesCont myAllowed
Associative container from vehicle class to allowed-lanes.
A point in 2D or 3D with translation and scaling methods.
bool hasMinorLink() const
whether any lane has a minor link
const MSEdge * getOppositeEdge() const
Returns the opposite direction edge if on exists else a nullptr.
void updateBestLanes(bool forceRebuild=false, const MSLane *startLane=0)
computes the best lanes to use in order to continue the route
static void clear()
Clears the dictionary.
SVCPermissions myMinimumPermissions
The intersection of lane permissions for this edge.
void rebuildAllowedTargets(const bool updateVehicles=true)
MSEdgeVector mySuccessors
The succeeding edges.
double getDistanceTo(const MSEdge *other, const bool doBoundaryEstimate=false) const
optimistic air distance heuristic for use in routing
MSJunction * myToJunction
bool havePriority() const
Returns whether this link is a major link.
MSLaneChanger * myLaneChanger
This member will do the lane-change.
double getRoutingSpeed() const
Returns the averaged speed used by the routing device.
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
Boundary myBoundary
The bounding rectangle of end nodes incoming or outgoing edges for taz connectors or of my own start ...
MSLane * leftLane(const MSLane *const lane) const
Returns the lane left to the one given, 0 if the given lane is leftmost.
const MSEdge * getNormalBefore() const
if this edge is an internal edge, return its first normal predecessor, otherwise the edge itself ...
static SUMOTime gMesoMinorPenalty
const Position & getPosition() const
const std::string & getID() const
returns the id of the transportable
bool myAmFringe
whether this edge is at the network fringe
MSLane * getDepartLane(MSVehicle &veh) const
Finds a depart lane for the given vehicle parameters.
const MSConstEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges with internal vias, restricted by vClass.
double endPos
The stopping position end.
const std::vector< MSLane * > * myLanes
Container for the edge's lane; should be sorted: (right-hand-traffic) the more left the lane...
const MSEdge * myBidiEdge
the oppositing superposble edge
bool isInternal() const
return whether this edge is an internal edge
virtual double getChosenSpeedFactor() const =0
If a fixed number of random choices fails, a free position is chosen.
std::vector< MSVehicle * > VehCont
Container for vehicles.
bool isSuperposable(const MSEdge *other)
bool canChangeToOpposite()
whether this edge allows changing to the opposite direction edge
Base class for objects which have an id.
The rightmost lane the vehicle may use.
int departLane
(optional) The lane the vehicle shall depart from (index in edge)
const MSEdge * getInternalFollowingEdge(const MSEdge *followerAfterInternal) const
double getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the maximum speed the vehicle may use on this edge.
const ConstMSEdgeVector & getOutgoing() const
std::string lane
The lane to stop at.
std::vector< std::string > getVector()
SVCPermissions myCombinedPermissions
The union of lane permissions for this edge.
const MSEdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges, restricted by vClass.
No information given; use default.
void buildLaneChanger()
Has to be called after all sucessors and predecessors have been set (after closeBuilding()) ...
double departPos
(optional) The position the vehicle shall depart from
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
static const Position getStopPosition(const SUMOVehicleParameter::Stop &stop)
return the coordinates of the center of the given stop
Structure representing possible vehicle parameter.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
bool isTazConnector() const
std::map< SUMOVehicleClass, MSConstEdgePairVector > myClassesViaSuccessorMap
The successors available for a given vClass.
static double getAssumedSpeed(const MSEdge *edge)
return current travel speed assumption
static MSLink * getConnectingLink(const MSLane &from, const MSLane &to)
Returns the link connecting both lanes Both lanes have to be non-internal; 0 may be returned if no co...
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
virtual void changeLanes(SUMOTime t)
Performs lane changing on this edge.
static const T & getRandomFrom(const std::vector< T > &v, std::mt19937 *rng=0)
Returns a random element from the given vector.
virtual const SUMOVehicleParameter & getParameter() const =0
Returns the vehicle's parameter (including departure definition)
const MSJunction * getFromJunction() const
A single mesoscopic segment (cell)
Definition of vehicle stop (position and duration)
double myWidth
Edge width [m].
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
MSJunction * myFromJunction
the junctions for this edge
double getInternalFollowingLengthTo(const MSEdge *followerAfterInternal) const
returns the length of all internal edges on the junction until reaching the non-internal edge followe...
static MELoop * gMesoNet
mesoscopic simulation infrastructure
double getLength() const
Get vehicle's length [m].
void setMaxSpeed(double val) const
Sets a new maximum speed for all lanes (used by TraCI and MSCalibrator)
void setJunctions(MSJunction *from, MSJunction *to)
static DictType myDict
Static dictionary to associate string-ids with objects.
Sorts transportables by their positions.
std::vector< std::pair< SVCPermissions, const std::vector< MSLane * > *> > AllowedLanesCont
"Map" from vehicle class to allowed lanes
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
No information given; use default.
A free position is chosen.
std::vector< MSEdge * > MSEdgeVector
Insert behind the last vehicle as close as possible to still allow the specified departSpeed. Fallback to DEPART_POS_BASE if there is no vehicle on the departLane yet.
double computeChosenSpeedDeviation(std::mt19937 *rng, const double minDev=-1.) const
Computes and returns the speed deviation.
const MSLinkCont & getLinkCont() const
returns the container with all links !!!
const std::vector< LaneQ > & getBestLanes() const
Returns the description of best lanes to use in order to continue the route.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
static SUMOTime gLaneChangeDuration
MSEdgeVector myPredecessors
The preceeding edges.
std::vector< MSTransportable * > getSortedContainers(SUMOTime timestep, bool includeRiding=false) const
Returns this edge's containers sorted by pos.
Representation of a lane in the micro simulation.
bool allowsLaneChanging() const
MSLane * rightLane(const MSLane *const lane) const
Returns the lane right to the one given, 0 if the given lane is rightmost.
double myEmptyTraveltime
the traveltime on the empty edge (cached value for speedup)
MSLane * getFreeLane(const std::vector< MSLane *> *allowed, const SUMOVehicleClass vclass, double departPos) const
Finds the emptiest lane allowing the vehicle class.
const Distribution_Parameterized & getSpeedFactor() const
Returns this type's speed factor.
static void parseEdgesList(const std::string &desc, ConstMSEdgeVector &into, const std::string &rid)
Parses the given string assuming it contains a list of edge ids divided by spaces.
virtual const std::string & getID() const =0
Get the vehicle's ID.
SumoXMLEdgeFunc getFunction() const
Returns the edge type (SumoXMLEdgeFunc)
vehicles ignoring classes
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
std::string id
The vehicle's id.
std::set< int > myFailedInsertionMemory
A cache for the rejected insertion attempts. Used to assure that no further insertion attempts are ma...
std::set< MSTransportable * > myPersons
Persons on the edge for drawing and pushbutton.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.