128 const std::string& streetName,
const std::string& edgeType,
int priority);
140 void initialize(
const std::vector<MSLane*>* lanes);
504 #ifdef HAVE_INTERNAL_LANES 505 const MSEdge* getInternalFollowingEdge(
MSEdge* followerAfterInternal)
const;
559 std::set<MSTransportable*>::iterator i =
myPersons.find(p);
572 std::set<MSTransportable*>::iterator i =
myContainers.find(container);
611 static void insertIDs(std::vector<std::string>& into);
627 const std::string& rid);
637 const std::string& rid);
bool myAmDelayed
whether this edge had a vehicle with less than max speed on it
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.
SUMOReal myLength
the length of the edge (cached value for speedup)
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
Sorts edges by their ids.
void addSuccessor(MSEdge *edge)
Adds an edge to the list of edges which may be reached from this edge and to the incoming of the othe...
bool insertVehicle(SUMOVehicle &v, SUMOTime time, const bool checkOnly=false) const
Tries to insert the given vehicle into the network.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
SUMOReal getDistanceTo(const MSEdge *other) const
optimistic air distance heuristic for use in routing
static size_t numericalDictSize()
Returns the number of edges with a numerical id.
void initialize(const std::vector< MSLane * > *lanes)
Initialize the edge.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
unsigned int getNumPredecessors() const
Returns the number of edges this edge is connected to.
void recalcCache()
Recalculates the cached values.
virtual void addContainer(MSTransportable *container) const
Add a container to myContainers.
The base class for an intersection.
static MSEdgeVector myEdges
Static list of edges.
const EdgeBasicFunction myFunction
the purpose of the edge
ClassedAllowedLanesCont myClassedAllowed
From vehicle class to lanes allowed to be used by it.
bool isWalkingArea() const
return whether this edge is walking area
virtual ~MSEdge()
Destructor.
const std::string & getStreetName() const
Returns the street name of the edge.
The edge is a macroscopic connector (source/sink)
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)
SVCPermissions getPermissions() const
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...
const int myNumericalID
This edge's numerical id.
SUMOTime incVaporization(SUMOTime t)
Enables vaporization.
MSLane * getFreeLane(const std::vector< MSLane * > *allowed, const SUMOVehicleClass vclass) const
Finds the emptiest lane allowing the vehicle class.
std::vector< const MSEdge * > ConstMSEdgeVector
int myVaporizationRequests
Vaporizer counter.
const MSEdgeVector & getIncomingEdges() const
Returns the list of edges from which this edge may be reached.
EdgeBasicFunction
Defines possible edge types.
bool prohibits(const SUMOVehicle *const vehicle) const
Returns whether the vehicle (class) is not allowed on the edge.
SUMOTime decVaporization(SUMOTime t)
Disables vaporization.
The purpose of the edge is not known.
virtual void removeContainer(MSTransportable *container) const
Remove container from myContainers.
std::map< std::string, MSEdge * > DictType
definition of the static dictionary type
MSEdge & operator=(const MSEdge &)
assignment operator.
Performs lane changing of vehicles.
const std::string & getID() const
Returns the id.
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()
SUMOReal getLength() const
return the length of the edge
virtual void removePerson(MSTransportable *p) const
The edge is a district edge.
virtual void addPerson(MSTransportable *p) const
Representation of a vehicle.
const MSEdgeVector & getPredecessors() const
Returns the edge at the given position from the list of reachable edges.
AllowedLanesCont myAllowed
Associative container from destination-edge to allowed-lanes.
std::map< SUMOVehicleClass, AllowedLanesCont > ClassedAllowedLanesCont
Map from vehicle types to lanes that may be used to reach one of the next edges.
static void clear()
Clears the dictionary.
SVCPermissions myMinimumPermissions
The intersection of lane permissions for this edge.
static SUMOReal getTravelTime(const MSEdge *const e, const SUMOVehicle *const v, SUMOReal t)
Returns the travel time to pass an edge.
MSEdgeVector mySuccessors
The succeeding edges.
MSLane * leftLane(const MSLane *const lane) const
Returns the lane left to the one given, 0 if the given lane is leftmost.
MSJunction * myToJunction
MSLaneChanger * myLaneChanger
This member will do the lane-change.
MSEdge(const std::string &id, int numericalID, const EdgeBasicFunction function, const std::string &streetName, const std::string &edgeType, int priority)
Constructor.
bool isRoundabout() const
bool isVaporizing() const
Returns whether vehicles on this edge shall be vaporized.
const std::vector< MSLane * > * myLanes
Container for the edge's lane; should be sorted: (right-hand-traffic) the more left the lane...
An upper class for objects with additional parameters.
SUMOReal getSpeedLimit() const
Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be...
bool isInternal() const
return whether this edge is an internal edge
const std::string & getEdgeType() const
Returns the type of the edge.
MSLane * getDepartLane(MSVehicle &veh) const
Finds a depart lane for the given vehicle parameters.
Base class for objects which have an id.
std::vector< MSTransportable * > getSortedContainers(SUMOTime timestep) const
Returns this edge's containers sorted by pos.
SVCPermissions myCombinedPermissions
The union of lane permissions for this edge.
The edge is a pedestrian walking area (a special type of internal edge)
EdgeBasicFunction getPurpose() const
Returns the edge type (EdgeBasicFunction)
Structure representing possible vehicle parameter.
int operator()(const MSEdge *const e1, const MSEdge *const e2) const
comparing operator
int getNumericalID() const
Returns the numerical id of the edge.
int getPriority() const
Returns the priority of the edge.
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...
virtual void changeLanes(SUMOTime t)
Performs lane changing on this edge.
The edge is a normal street.
SUMOReal myEmptyTraveltime
the traveltime on the empty edge (cached value for speedup)
const std::vector< MSLane * > * allowedLanes(const MSEdge &destination, SUMOVehicleClass vclass=SVC_IGNORING) const
Get the allowed lanes to reach the destination-edge.
bool myAmRoundabout
whether this edge belongs to a roundabout
The edge is a pedestrian crossing (a special type of internal edge)
static size_t dictSize()
Returns the number of edges.
std::string myStreetName
the real-world name of this edge (need not be unique)
MSJunction * myFromJunction
the junctions for this edge
SUMOTime getLastFailedInsertionTime() const
Returns the last time a vehicle could not be inserted.
void setJunctions(MSJunction *from, MSJunction *to)
by_id_sorter()
constructor
std::map< const MSEdge *, std::vector< MSLane * > * > AllowedLanesCont
Suceeding edges (keys) and allowed lanes to reach these edges (values).
const int myPriority
the priority of the edge (used during network creation)
void setLastFailedInsertionTime(SUMOTime time) const
Sets the last time a vehicle could not be inserted.
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.
SUMOReal getMinimumTravelTime(const SUMOVehicle *const veh) const
returns the minimum travel time for the given vehicle
bool isCrossing() const
return whether this edge is a pedestrian crossing
unsigned int getNumSuccessors() const
Returns the number of edges that may be reached from this edge.
const MSJunction * getFromJunction() const
const MSEdgeVector & getSuccessors() const
Returns the following edges.
SUMOReal getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the maximum speed the vehicle may use on this edge.
std::vector< MSEdge * > MSEdgeVector
MSLane * rightLane(const MSLane *const lane) const
Returns the lane right to the one given, 0 if the given lane is rightmost.
The edge is an internal edge.
const std::vector< MSLane * > * getAllowedLanesWithDefault(const AllowedLanesCont &c, const MSEdge *dest) const
lookup in map and return 0 if not found
MSEdgeVector myPredecessors
The preceeding edges.
Representation of a lane in the micro simulation.
SUMOReal getCurrentTravelTime(const SUMOReal minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
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.
vehicles ignoring classes
std::vector< MSTransportable * > getSortedPersons(SUMOTime timestep) const
Returns this edge's persons sorted by pos.
static SUMOReal getTravelTimeStatic(const MSEdge *const edge, const SUMOVehicle *const veh, SUMOReal time)
Returns the travel time for the given edge.
const MSJunction * getToJunction() const
std::set< MSTransportable * > myPersons
Persons on the edge (only for drawing)
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.