79 typedef std::vector<std::pair<SVCPermissions, const std::vector<MSLane*>* > >
AllowedLanesCont;
98 const std::string& streetName,
const std::string& edgeType,
int priority,
111 void initialize(
const std::vector<MSLane*>* lanes);
165 inline const std::vector<MSLane*>&
getLanes()
const {
174 inline const std::set<MSTransportable*>&
getPersons()
const {
422 }
else if (veh != 0) {
614 std::set<MSTransportable*>::iterator i =
myPersons.find(p);
627 std::set<MSTransportable*>::iterator i =
myContainers.find(container);
700 static void insertIDs(std::vector<std::string>& into);
716 const std::string& rid);
726 const std::string& rid);
900 void addToAllowed(
const SVCPermissions permissions,
const std::vector<MSLane*>* allowedLanes, AllowedLanesCont& laneCont)
const;
const SumoXMLEdgeFunc myFunction
the purpose of the edge
virtual bool isSelected() const
whether this lane is selected in the GUI
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
int getNumPredecessors() const
Returns the number of edges this edge is connected to.
const std::vector< double > getSubLaneSides() const
Returns the right side offsets of this edge's sublanes.
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.
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.
int getPriority() const
Returns the priority of the edge.
double getLengthGeometryFactor() const
return shape.length() / myLength
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
double getVehicleMaxSpeed(const SUMOTrafficObject *const veh) const
Returns the maximum speed the vehicle may use on this edge.
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...
virtual void unlock() const
release exclusive access to the mesoscopic state
void recalcCache()
Recalculates the cached values.
const MSEdgeVector & getPredecessors() const
The base class for an intersection.
static MSEdgeVector myEdges
Static list of edges.
std::vector< std::pair< const MSEdge *, const MSEdge * > > MSConstEdgePairVector
double myTimePenalty
flat penalty when computing traveltime
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
void setCrossingEdges(const std::vector< std::string > &crossingEdges)
Sets the crossed edge ids for a crossing edge.
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 double myDistance
the kilometrage/mileage at the start of the edge
bool isRoundabout() const
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
std::string myEdgeType
the type of the edge (optionally used during network creation)
const std::vector< std::string > & getCrossingEdges() const
Gets the crossed edge ids.
double getMeanSpeed() const
get the mean speed
transportable_by_position_sorter(SUMOTime timestep)
constructor
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
const int myNumericalID
This edge's numerical id.
virtual SUMOVehicleClass getVClass() const =0
Returns the vehicle's access class.
SUMOTime incVaporization(SUMOTime t)
Enables vaporization.
void initialize(const std::vector< MSLane *> *lanes)
Initialize the edge.
std::vector< const MSEdge * > ConstMSEdgeVector
MSConstEdgePairVector myViaSuccessors
MSEdge(const std::string &id, int numericalID, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, int priority, double distance)
Constructor.
int myVaporizationRequests
Vaporizer counter.
double getLength() const
return the length of the edge
const MSJunction * getToJunction() const
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep, bool includeRiding=false) const
Returns this edge's persons sorted by pos.
SUMOTime decVaporization(SUMOTime t)
Disables vaporization.
int getNumericalID() const
Returns the numerical id of the edge.
double getSpeedLimit() const
Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be...
A class that stores a 2D geometrical boundary.
const MSEdge * getBidiEdge() const
return opposite superposable/congruent edge, if it exist and 0 else
bool hasLaneChanger() const
std::map< std::string, MSEdge *> DictType
definition of the static dictionary type
bool isVaporizing() const
Returns whether vehicles on this edge shall be vaporized.
int getNumSuccessors() const
Returns the number of edges that may be reached from this edge.
const std::string & getEdgeType() const
Returns the type of the edge.
int operator()(const MSEdge *const e1, const MSEdge *const e2) const
comparing operator
double getCurrentTravelTime(const double minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
void addToAllowed(const SVCPermissions permissions, const std::vector< MSLane *> *allowedLanes, AllowedLanesCont &laneCont) const
MSEdge & operator=(const MSEdge &)
assignment operator.
Performs lane changing of vehicles.
A road/street connecting two junctions.
SUMOTime myLastFailedInsertionTime
The time of last insertion failure.
std::map< SUMOVehicleClass, MSEdgeVector > myClassesSuccessorMap
The successors available for a given vClass.
void rebuildAllowedLanes()
double myLength
the length of the edge (cached value for speedup)
Representation of a vehicle.
static double getTravelTimeStatic(const MSEdge *const edge, const SUMOVehicle *const veh, double time)
Returns the travel time for the given edge.
static double getTravelTime(const MSEdge *const e, const SUMOVehicle *const v, double t)
Returns the travel time to pass an edge.
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.
static void clear()
Clears the dictionary.
SVCPermissions myMinimumPermissions
The intersection of lane permissions for this edge.
virtual void addPerson(MSTransportable *p) const
const std::set< MSTransportable * > & getPersons() const
Returns this edge's persons set.
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
double getMinimumTravelTime(const SUMOVehicle *const veh) const
returns the minimum travel time for the given vehicle
MSJunction * myToJunction
MSLaneChanger * myLaneChanger
This member will do the lane-change.
double getRoutingSpeed() const
Returns the averaged speed used by the routing device.
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 ...
bool myAmFringe
whether this edge is at the network fringe
MSLane * getDepartLane(MSVehicle &veh) const
Finds a depart lane for the given vehicle parameters.
virtual void removePerson(MSTransportable *p) const
SUMOTime getLastFailedInsertionTime() const
Returns the last time a vehicle could not be inserted.
const MSConstEdgePairVector & getViaSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges with internal vias, restricted by vClass.
const std::vector< MSLane * > * myLanes
Container for the edge's lane; should be sorted: (right-hand-traffic) the more left the lane...
bool isCrossing() const
return whether this edge is a pedestrian crossing
bool isFringe() const
return whether this edge is at the fringe of the network
const MSEdge * myBidiEdge
the oppositing superposble edge
bool isInternal() const
return whether this edge is an internal edge
An upper class for objects with additional parameters.
bool isSuperposable(const MSEdge *other)
virtual void removeContainer(MSTransportable *container) const
Remove container from myContainers.
bool canChangeToOpposite()
whether this edge allows changing to the opposite direction edge
const std::string & getStreetName() const
Returns the street name of the edge.
Base class for objects which have an id.
const MSEdge * getInternalFollowingEdge(const MSEdge *followerAfterInternal) const
Definition of vehicle stop (position and duration)
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.
std::map< const MSEdge *, AllowedLanesCont > AllowedLanesByTarget
Succeeding edges (keys) and allowed lanes to reach these edges (values).
void buildLaneChanger()
Has to be called after all sucessors and predecessors have been set (after closeBuilding()) ...
static const Position getStopPosition(const SUMOVehicleParameter::Stop &stop)
return the coordinates of the center of the given stop
Structure representing possible vehicle parameter.
bool prohibits(const SUMOVehicle *const vehicle) const
Returns whether the vehicle (class) is not allowed on the edge.
Representation of a vehicle or person.
bool isTazConnector() const
std::map< SUMOVehicleClass, MSConstEdgePairVector > myClassesViaSuccessorMap
The successors available for a given vClass.
virtual void addContainer(MSTransportable *container) const
Add a container to myContainers.
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
virtual void changeLanes(SUMOTime t)
Performs lane changing on this edge.
const MSJunction * getFromJunction() const
bool myAmRoundabout
whether this edge belongs to a roundabout
double myWidth
Edge width [m].
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
std::string myStreetName
the real-world name of this edge (need not be unique)
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...
MSLane * parallelLane(const MSLane *const lane, int offset, bool includeOpposite=true) const
Returns the lane with the given offset parallel to the given lane one or 0 if it does not exist...
void setMaxSpeed(double val) const
Sets a new maximum speed for all lanes (used by TraCI and MSCalibrator)
void setJunctions(MSJunction *from, MSJunction *to)
virtual void lock() const
grant exclusive access to the mesoscopic state
by_id_sorter()
constructor
const int myPriority
the priority of the edge (used during network creation)
bool isWalkingArea() const
return whether this edge is walking area
std::vector< std::string > myCrossingEdges
The crossed edges id for a crossing edge. On not crossing edges it is empty.
static DictType myDict
Static dictionary to associate string-ids with objects.
Static storage of an output device and its base (abstract) implementation.
Sorts transportables by their positions.
std::vector< std::pair< SVCPermissions, const std::vector< MSLane * > *> > AllowedLanesCont
"Map" from vehicle class to allowed lanes
bool isNormal() const
return whether this edge is an internal edge
std::vector< MSEdge * > MSEdgeVector
SVCPermissions getPermissions() const
double getDistance() const
Returns the kilometrage/mileage at the start of the edge.
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.
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.
SumoXMLEdgeFunc getFunction() const
Returns the edge type (SumoXMLEdgeFunc)
vehicles ignoring classes
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.
void setLastFailedInsertionTime(SUMOTime time) const
Sets the last time a vehicle could not be inserted.
double getWidth() const
Returns the edges's width (sum over all lanes)