115 MSEdge(
const std::string&
id,
int numericalID,
const EdgeBasicFunction function,
const std::string& streetName =
"");
391 #ifdef HAVE_INTERNAL_LANES
392 const MSEdge* getInternalFollowingEdge(
MSEdge* followerAfterInternal)
const;
442 std::set<MSPerson*>::iterator i =
myPersons.find(p);
480 static void insertIDs(std::vector<std::string>& into);
495 static void parseEdgesList(
const std::string& desc, std::vector<const MSEdge*>& into,
496 const std::string& rid);
505 static void parseEdgesList(
const std::vector<std::string>& desc, std::vector<const MSEdge*>& into,
506 const std::string& rid);
std::set< MSPerson * > myPersons
Persons on the edge (only for drawing)
Representation of a vehicle in the micro simulation.
std::vector< MSLane * > * myLanes
Container for the edge's lane; should be sorted: (right-hand-traffic) the more left the lane...
static void insertIDs(std::vector< std::string > &into)
Inserts IDs of all known edges into the given vector.
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
Sorts edges by their ids.
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.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
std::vector< MSEdge * > mySuccessors
The succeeding edges.
const EdgeBasicFunction myFunction
the purpose of the edge
ClassedAllowedLanesCont myClassedAllowed
From vehicle class to lanes allowed to be used by it.
virtual ~MSEdge()
Destructor.
const std::string & getStreetName() const
Returns the street name of the edge.
The edge is a macroscopic connector (source/sink)
SUMOReal getCurrentTravelTime(const SUMOReal minSpeed=0.00001) const
Computes and returns the current travel time for this edge.
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...
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.
virtual SUMOReal getMaxSpeed() const =0
Returns the vehicle's maximum speed.
int myVaporizationRequests
Vaporizer counter.
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.
std::map< std::string, MSEdge * > DictType
definition of the static dictionary type
MSEdge(const std::string &id, int numericalID, const EdgeBasicFunction function, const std::string &streetName="")
Constructor.
void initialize(std::vector< MSLane * > *lanes)
Initialize the edge.
static std::vector< MSEdge * > myEdges
Static list of edges.
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.
static void parseEdgesList(const std::string &desc, std::vector< const MSEdge * > &into, const std::string &rid)
Parses the given string assuming it contains a list of edge ids divided by spaces.
SUMOTime myLastFailedInsertionTime
The time of last insertion failure.
void rebuildAllowedLanes()
SUMOReal getLength() const
return the length of the edge
The edge is a district edge.
Representation of a vehicle.
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.
unsigned int getNoFollowing() const
Returns the number of edges that may be reached from this edge.
MSLane * leftLane(const MSLane *const lane) const
Returns the lane left to the one given, 0 if the given lane is leftmost.
MSLaneChanger * myLaneChanger
This member will do the lane-change.
bool isRoundabout() const
bool isVaporizing() const
Returns whether vehicles on this edge shall be vaporized.
std::vector< MSEdge * > myPredeccesors
The preceeding edges.
virtual void removePerson(MSPerson *p) const
MSLane * getDepartLane(const MSVehicle &veh) const
Finds a depart lane for the given vehicle parameters.
virtual void addPerson(MSPerson *p) const
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...
Base class for objects which have an id.
SVCPermissions myCombinedPermissions
The union of lane permissions for this edge.
const std::vector< MSLane * > * allowedLanes(const MSEdge &destination, SUMOVehicleClass vclass=SVC_UNKNOWN) const
Get the allowed lanes to reach the destination-edge.
EdgeBasicFunction getPurpose() const
Returns the edge type (EdgeBasicFunction)
const std::vector< MSEdge * > & getIncomingEdges() const
Returns the list of edges from which this edge may be reached.
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.
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.
bool myAmRoundabout
whether this edge belongs to a roundabout
void addFollower(MSEdge *edge)
Returns the list of edges which may be reached from this edge.
static size_t dictSize()
Returns the number of edges.
std::string myStreetName
the real-world name of this edge (need not be unique)
SUMOTime getLastFailedInsertionTime() const
Returns the last time a vehicle could not be inserted.
by_id_sorter()
constructor
const MSEdge * getFollower(unsigned int n) const
Returns the n-th of the following edges.
std::map< const MSEdge *, std::vector< MSLane * > * > AllowedLanesCont
Suceeding edges (keys) and allowed lanes to reach these edges (values).
int myNumericalID
This edge's numerical id.
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.
SUMOReal getMinimumTravelTime(const SUMOVehicle *const veh) const
returns the minimum travel time for the given vehicle
bool laneChangeAllowed() const
whether lane changing may be performed on this edge
SUMOReal getVehicleMaxSpeed(const SUMOVehicle *const veh) const
Returns the maximum speed the vehicle may use on this edge.
MSLane * rightLane(const MSLane *const lane) const
Returns the lane right to the one given, 0 if the given lane is rightmost.
bool insertVehicle(SUMOVehicle &v, SUMOTime time) const
Tries to insert the given vehicle into the network.
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
Representation of a lane in the micro simulation.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.