SUMO - Simulation of Urban MObility
GUIEdge Class Reference

A road/street connecting two junctions (gui-version) More...

#include <GUIEdge.h>

Inheritance diagram for GUIEdge:
MSEdge GUIGlObject Named Parameterised

Public Types

typedef std::map< const MSEdge *, std::vector< MSLane * > * > AllowedLanesCont
 Suceeding edges (keys) and allowed lanes to reach these edges (values). More...
 
typedef std::map< SUMOVehicleClass, AllowedLanesContClassedAllowedLanesCont
 Map from vehicle types to lanes that may be used to reach one of the next edges. More...
 
enum  EdgeBasicFunction {
  EDGEFUNCTION_UNKNOWN = -1, EDGEFUNCTION_NORMAL = 0, EDGEFUNCTION_CONNECTOR = 1, EDGEFUNCTION_INTERNAL = 2,
  EDGEFUNCTION_DISTRICT = 3, EDGEFUNCTION_CROSSING = 4, EDGEFUNCTION_WALKINGAREA = 5
}
 Defines possible edge types. More...
 

Public Member Functions

void addParameter (const std::string &key, const std::string &value)
 Adds a parameter. More...
 
void addParameter (const std::map< std::string, std::string > &mapArg)
 Adds all given parameter. More...
 
void addParameter (const Parameterised &p)
 Adds all given parameter. More...
 
void addPerson (MSPerson *p) const
 
void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
virtual void changeLanes (SUMOTime t)
 Performs lane changing on this edge. More...
 
void clearParameter ()
 Clears the parameter map. More...
 
void closeBuilding ()
 
virtual void drawGLAdditional (GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
 Draws additional, user-triggered visualisations. More...
 
void drawName (const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
 
Boundary getBoundary () const
 Returns the street's geometry. More...
 
SUMOReal getCurrentTravelTime (const SUMOReal minSpeed=0.00001) const
 Computes and returns the current travel time for this edge. More...
 
SUMOReal getDistanceTo (const MSEdge *other) const
 optimistic air distance heuristic for use in routing More...
 
const std::string & getID () const
 Returns the id. More...
 
MSLanegetLane (size_t laneNo)
 returns the enumerated lane (!!! why not private with a friend?) More...
 
SUMOReal getLength () const
 return the length of the edge More...
 
const std::map< std::string, std::string > & getMap () const
 Returns the inner key/value map. More...
 
SUMOReal getMinimumTravelTime (const SUMOVehicle *const veh) const
 returns the minimum travel time for the given vehicle More...
 
const std::string & getParameter (const std::string &key, const std::string &defaultValue) const
 Returns the value for a given key. More...
 
SUMOReal getSpeedLimit () const
 Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be the fastest edge. More...
 
SUMOReal getVehicleMaxSpeed (const SUMOVehicle *const veh) const
 Returns the maximum speed the vehicle may use on this edge. More...
 
 GUIEdge (const std::string &id, int numericalID, const EdgeBasicFunction function, const std::string &streetName, const std::string &edgeType)
 Constructor. More...
 
void initialize (std::vector< MSLane * > *lanes)
 Initialize the edge. More...
 
bool isRoundabout () const
 
bool knowsParameter (const std::string &key) const
 Returns whether the parameter is known. More...
 
bool laneChangeAllowed () const
 whether lane changing may be performed on this edge More...
 
void markAsRoundabout ()
 
bool prohibits (const SUMOVehicle *const vehicle) const
 Returns whether the vehicle (class) is not allowed on the edge. More...
 
void rebuildAllowedLanes ()
 
void removePerson (MSPerson *p) const
 
void setID (const std::string &newID)
 resets the id More...
 
 ~GUIEdge ()
 Destructor. More...
 
inherited from GUIGlObject
virtual GUIGLObjectPopupMenugetPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own popup-menu. More...
 
virtual GUIParameterTableWindowgetParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own parameter window. More...
 
Boundary getCenteringBoundary () const
 Returns the boundary to which the view shall be centered in order to show the object. More...
 
void drawGL (const GUIVisualizationSettings &s) const
 Draws the object. More...
 
Access to the edge's lanes
MSLaneleftLane (const MSLane *const lane) const
 Returns the lane left to the one given, 0 if the given lane is leftmost. More...
 
MSLanerightLane (const MSLane *const lane) const
 Returns the lane right to the one given, 0 if the given lane is rightmost. More...
 
MSLaneparallelLane (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. More...
 
const std::vector< MSLane * > & getLanes () const
 Returns this edge's lanes. More...
 
std::vector< MSPerson * > getSortedPersons (SUMOTime timestep) const
 Returns this edge's persons sorted by pos. More...
 
const std::vector< MSLane * > * allowedLanes (const MSEdge &destination, SUMOVehicleClass vclass=SVC_IGNORING) const
 Get the allowed lanes to reach the destination-edge. More...
 
const std::vector< MSLane * > * allowedLanes (SUMOVehicleClass vclass=SVC_IGNORING) const
 Get the allowed lanes for the given vehicle class. More...
 
Access to other edge attributes
EdgeBasicFunction getPurpose () const
 Returns the edge type (EdgeBasicFunction) More...
 
bool isInternal () const
 return whether this edge is an internal edge More...
 
bool isCrossing () const
 return whether this edge is a pedestrian crossing More...
 
bool isWalkingArea () const
 return whether this edge is walking area More...
 
int getNumericalID () const
 Returns the numerical id of the edge. More...
 
const std::string & getStreetName () const
 Returns the street name of the edge. More...
 
const std::string & getEdgeType () const
 Returns the type of the edge. More...
 
Access to succeeding/predecessing edges
void addFollower (MSEdge *edge)
 Returns the list of edges which may be reached from this edge. More...
 
const std::vector< MSEdge * > & getIncomingEdges () const
 Returns the list of edges from which this edge may be reached. More...
 
unsigned int getNoFollowing () const
 Returns the number of edges that may be reached from this edge. More...
 
const MSEdgegetFollower (unsigned int n) const
 Returns the n-th of the following edges. More...
 
const MSJunctiongetFromJunction () const
 
const MSJunctiongetToJunction () const
 
void setJunctions (MSJunction *from, MSJunction *to)
 
Access to vaporizing interface
bool isVaporizing () const
 Returns whether vehicles on this edge shall be vaporized. More...
 
SUMOTime incVaporization (SUMOTime t)
 Enables vaporization. More...
 
SUMOTime decVaporization (SUMOTime t)
 Disables vaporization. More...
 
Methods releated to vehicle insertion
bool insertVehicle (SUMOVehicle &v, SUMOTime time) const
 Tries to insert the given vehicle into the network. More...
 
MSLanegetFreeLane (const std::vector< MSLane * > *allowed, const SUMOVehicleClass vclass) const
 Finds the emptiest lane allowing the vehicle class. More...
 
MSLanegetDepartLane (const MSVehicle &veh) const
 Finds a depart lane for the given vehicle parameters. More...
 
SUMOTime getLastFailedInsertionTime () const
 Returns the last time a vehicle could not be inserted. More...
 
void setLastFailedInsertionTime (SUMOTime time) const
 Sets the last time a vehicle could not be inserted. More...
 
Atomar getter methods
const std::string & getFullName () const
 Returns the full name appearing in the tool tip. More...
 
GUIGlID getGlID () const
 Returns the numerical id of the object. More...
 
interfaces to be implemented by derived classes
const std::string & getMicrosimID () const
 Returns the id of the object as known to microsim. More...
 
void setMicrosimID (const std::string &newID)
 Changes the microsimID of the object (happens in NETEDIT) More...
 
GUIGlObjectType getType () const
 Returns the type of the object as coded in GUIGlObjectType. More...
 
Parameter table window I/O
void addParameterTable (GUIParameterTableWindow *w)
 Lets this object know a parameter window showing the object's values was opened. More...
 
void removeParameterTable (GUIParameterTableWindow *w)
 Lets this object know a parameter window showing the object's values was closed. More...
 

Static Public Member Functions

static void clear ()
 Clears the dictionary. More...
 
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. Otherwise returns false. More...
 
static MSEdgedictionary (const std::string &id)
 Returns the MSEdge associated to the key id if exists, otherwise returns 0. More...
 
static MSEdgedictionary (size_t index)
 Returns the MSEdge at the index. More...
 
static size_t dictSize ()
 Returns the number of edges. More...
 
static void fill (std::vector< GUIEdge * > &netsWrappers)
 
static std::vector< GUIGlIDgetIDs (bool includeInternal)
 
static std::pair< SUMOReal, SUMORealgetLaneOffsets (SUMOReal x1, SUMOReal y1, SUMOReal x2, SUMOReal y2, SUMOReal prev, SUMOReal wanted)
 
static void insertIDs (std::vector< std::string > &into)
 Inserts IDs of all known edges into the given vector. More...
 
static size_t numericalDictSize ()
 Returns the number of edges with a numerical id. More...
 
Static parser helper
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. More...
 
static void parseEdgesList (const std::vector< std::string > &desc, std::vector< const MSEdge * > &into, const std::string &rid)
 Parses the given string vector assuming it edge ids. More...
 

Static Public Attributes

static StringBijection< GUIGlObjectTypeTypeNames
 associates object types with strings More...
 

Protected Member Functions

const std::vector< MSLane * > * allowedLanes (const MSEdge *destination, SUMOVehicleClass vclass=SVC_IGNORING) const
 Get the allowed lanes to reach the destination-edge. More...
 
const std::vector< MSLane * > * getAllowedLanesWithDefault (const AllowedLanesCont &c, const MSEdge *dest) const
 lookup in map and return 0 if not found More...
 
void setPrefix (const std::string &prefix)
 
helper methods for building popup-menus
void buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
 Builds the header. More...
 
void buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to center to the object. More...
 
void buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds entries which allow to copy the name / typed name into the clipboard. More...
 
void buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to (de)select the object. More...
 
void buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the parameter window. More...
 
void buildPositionCopyEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position. More...
 
void buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the manipulator window. More...
 

Protected Attributes

bool myAmRoundabout
 whether this edge belongs to a roundabout More...
 
std::string myEdgeType
 the type of the edge (optionally used during network creation) More...
 
MSJunctionmyFromJunction
 the junctions for this edge More...
 
const EdgeBasicFunction myFunction
 the purpose of the edge More...
 
std::string myID
 The name of the object. More...
 
MSLaneChangermyLaneChanger
 This member will do the lane-change. More...
 
std::vector< MSLane * > * myLanes
 Container for the edge's lane; should be sorted: (right-hand-traffic) the more left the lane, the higher the container-index. More...
 
SUMOTime myLastFailedInsertionTime
 The time of last insertion failure. More...
 
int myNumericalID
 This edge's numerical id. More...
 
std::set< MSPerson * > myPersons
 Persons on the edge (only for drawing) More...
 
std::vector< MSEdge * > myPredeccesors
 The preceeding edges. More...
 
std::string myStreetName
 the real-world name of this edge (need not be unique) More...
 
std::vector< MSEdge * > mySuccessors
 The succeeding edges. More...
 
MSJunctionmyToJunction
 
int myVaporizationRequests
 Vaporizer counter. More...
 
Storages for allowed lanes (depending on vehicle classes)
AllowedLanesCont myAllowed
 Associative container from destination-edge to allowed-lanes. More...
 
ClassedAllowedLanesCont myClassedAllowed
 From vehicle class to lanes allowed to be used by it. More...
 
SVCPermissions myMinimumPermissions
 The intersection of lane permissions for this edge. More...
 
SVCPermissions myCombinedPermissions
 The union of lane permissions for this edge. More...
 

Private Member Functions

 GUIEdge (const GUIEdge &s)
 invalidated copy constructor More...
 
GUIEdgeoperator= (const GUIEdge &s)
 invalidated assignment operator More...
 

Private Attributes

MFXMutex myLock
 The mutex used to avoid concurrent updates of myPersons. More...
 

Static edge container

typedef std::map< std::string, MSEdge * > DictType
 definition of the static dictionary type More...
 
static DictType myDict
 Static dictionary to associate string-ids with objects. More...
 
static std::vector< MSEdge * > myEdges
 Static list of edges. More...
 

Detailed Description

A road/street connecting two junctions (gui-version)

See also
MSEdge

Definition at line 61 of file GUIEdge.h.

Member Typedef Documentation

typedef std::map< const MSEdge*, std::vector<MSLane*>* > MSEdge::AllowedLanesCont
inherited

Suceeding edges (keys) and allowed lanes to reach these edges (values).

Definition at line 102 of file MSEdge.h.

Map from vehicle types to lanes that may be used to reach one of the next edges.

Definition at line 105 of file MSEdge.h.

typedef std::map< std::string, MSEdge* > MSEdge::DictType
protectedinherited

definition of the static dictionary type

Definition at line 663 of file MSEdge.h.

Member Enumeration Documentation

enum MSEdge::EdgeBasicFunction
inherited

Defines possible edge types.

For different purposes, it is necessary to know whether the edge is a normal street or something special.

Enumerator
EDGEFUNCTION_UNKNOWN 

The purpose of the edge is not known.

EDGEFUNCTION_NORMAL 

The edge is a normal street.

EDGEFUNCTION_CONNECTOR 

The edge is a macroscopic connector (source/sink)

EDGEFUNCTION_INTERNAL 

The edge is an internal edge.

EDGEFUNCTION_DISTRICT 

The edge is a district edge.

EDGEFUNCTION_CROSSING 

The edge is a pedestrian crossing (a special type of internal edge)

EDGEFUNCTION_WALKINGAREA 

The edge is a pedestrian walking area (a special type of internal edge)

Definition at line 83 of file MSEdge.h.

Constructor & Destructor Documentation

GUIEdge::GUIEdge ( const std::string &  id,
int  numericalID,
const EdgeBasicFunction  function,
const std::string &  streetName,
const std::string &  edgeType 
)

Constructor.

Parameters
[in]idThe id of the edge
[in]numericalIDThe numerical id (index) of the edge
See also
MSEdge

Definition at line 75 of file GUIEdge.cpp.

GUIEdge::~GUIEdge ( )

Destructor.

Definition at line 81 of file GUIEdge.cpp.

References MFXMutex::locked(), myLock, and MFXMutex::unlock().

GUIEdge::GUIEdge ( const GUIEdge s)
private

invalidated copy constructor

Member Function Documentation

void MSEdge::addFollower ( MSEdge edge)
inlineinherited

Returns the list of edges which may be reached from this edge.

Returns
Edges reachable from this edge

Definition at line 263 of file MSEdge.h.

References MSEdge::mySuccessors.

Referenced by NLHandler::addDistrict().

void Parameterised::addParameter ( const std::string &  key,
const std::string &  value 
)
inherited
void Parameterised::addParameter ( const std::map< std::string, std::string > &  mapArg)
inherited

Adds all given parameter.

Parameters
[in]mapArgThe keys/values to insert

Definition at line 59 of file Parameterised.cpp.

References Parameterised::myMap.

void Parameterised::addParameter ( const Parameterised p)
inherited

Adds all given parameter.

Parameters
[in]pThe keys/values to insert

Definition at line 67 of file Parameterised.cpp.

References Parameterised::myMap.

void GUIGlObject::addParameterTable ( GUIParameterTableWindow w)
inherited

Lets this object know a parameter window showing the object's values was opened.

Parameters
[in]wThe opened parameter window

Definition at line 187 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

void GUIEdge::addPerson ( MSPerson p) const
inlinevirtual

Reimplemented from MSEdge.

Definition at line 140 of file GUIEdge.h.

References MSEdge::addPerson(), and myLock.

void Named::addTo ( const StoringVisitor cont) const
inlineinherited

Adds this object to the given container.

Parameters

Definition at line 121 of file Named.h.

References Named::StoringVisitor::add().

const std::vector< MSLane * > * MSEdge::allowedLanes ( const MSEdge destination,
SUMOVehicleClass  vclass = SVC_IGNORING 
) const
inherited

Get the allowed lanes to reach the destination-edge.

If there is no such edge, get 0. Then you are on the wrong edge.

Parameters
[in]destinationThe edge to reach
[in]vclassThe vehicle class for which this information shall be returned
Returns
The lanes that may be used to reach the given edge, 0 if no such lanes exist

Definition at line 221 of file MSEdge.cpp.

Referenced by MSEdge::allowedLanes(), MSVehicleTransfer::checkInsertions(), MSEdge::getDepartLane(), MSEdge::getFreeLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), MSLane::by_connections_to_sorter::operator()(), and MSVehicle::updateBestLanes().

const std::vector< MSLane * > * MSEdge::allowedLanes ( SUMOVehicleClass  vclass = SVC_IGNORING) const
inherited

Get the allowed lanes for the given vehicle class.

If there is no such edge, get 0. Then you are on the wrong edge.

Parameters
[in]vclassThe vehicle class for which this information shall be returned
Returns
The lanes that may be used by the given vclass

Definition at line 227 of file MSEdge.cpp.

References MSEdge::allowedLanes().

const std::vector< MSLane * > * MSEdge::allowedLanes ( const MSEdge destination,
SUMOVehicleClass  vclass = SVC_IGNORING 
) const
protectedinherited

Get the allowed lanes to reach the destination-edge.

If there is no such edge, get 0. Then you are on the wrong edge.

Parameters
[in]destinationThe edge to reach
[in]vclassThe vehicle class for which this information shall be returned
Returns
The lanes that may be used to reach the given edge, 0 if no such lanes exist

Definition at line 243 of file MSEdge.cpp.

References MSEdge::getAllowedLanesWithDefault(), MSEdge::myAllowed, MSEdge::myClassedAllowed, and MSEdge::myMinimumPermissions.

void GUIGlObject::buildShowManipulatorPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the manipulator window.

Parameters

Definition at line 178 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.

Referenced by GUILaneSpeedTrigger::getPopUpMenu(), and GUITriggeredRerouter::getPopUpMenu().

void GUIGlObject::buildShowParamsPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited
void MSEdge::changeLanes ( SUMOTime  t)
virtualinherited

Performs lane changing on this edge.

Definition at line 413 of file MSEdge.cpp.

References MSLaneChanger::laneChange(), MSEdge::laneChangeAllowed(), and MSEdge::myLaneChanger.

Referenced by MSEdgeControl::changeLanes().

void MSEdge::clear ( )
staticinherited

Clears the dictionary.

Definition at line 519 of file MSEdge.cpp.

References MSEdge::myDict.

Referenced by MSNet::clearAll(), and MSVehicle::updateBestLanes().

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 91 of file Parameterised.cpp.

References Parameterised::myMap.

void MSEdge::closeBuilding ( )
inherited
Todo:
Has to be called after all edges were built and all connections were set...; Still, is not very nice

Definition at line 134 of file MSEdge.cpp.

References MSLane::getEdge(), MSEdge::myAllowed, MSEdge::myLanes, MSEdge::myPredeccesors, MSEdge::mySuccessors, and MSEdge::rebuildAllowedLanes().

SUMOTime MSEdge::decVaporization ( SUMOTime  t)
inherited

Disables vaporization.

The internal vaporization counter is decreased what disables the vaporization if it was only once enabled. Called from the event handler.

Parameters
[in]tThe current time (unused)
Returns
Time to next call (always 0)
Exceptions
ProcessErrornot thrown by this method, just derived

Definition at line 289 of file MSEdge.cpp.

References MSEdge::myVaporizationRequests.

Referenced by NLTriggerBuilder::buildVaporizer().

bool MSEdge::dictionary ( const std::string &  id,
MSEdge edge 
)
staticinherited
MSEdge * MSEdge::dictionary ( const std::string &  id)
staticinherited

Returns the MSEdge associated to the key id if exists, otherwise returns 0.

Definition at line 489 of file MSEdge.cpp.

References MSEdge::myDict.

MSEdge * MSEdge::dictionary ( size_t  index)
staticinherited

Returns the MSEdge at the index.

Definition at line 500 of file MSEdge.cpp.

References MSEdge::myEdges.

size_t MSEdge::dictSize ( )
staticinherited

Returns the number of edges.

Definition at line 507 of file MSEdge.cpp.

References MSEdge::myDict.

Referenced by fill(), MSPModel_Striping::initWalkingAreaPaths(), GUIApplicationWindow::onCmdEditChosen(), and MSStateHandler::saveState().

virtual void GUIGlObject::drawGLAdditional ( GUISUMOAbstractView *const  parent,
const GUIVisualizationSettings s 
) const
inlinevirtualinherited

Draws additional, user-triggered visualisations.

Parameters
[in]parentThe view
[in]sThe settings for the current view (may influence drawing)

Reimplemented in GUIVehicle, and GUIPerson.

Definition at line 182 of file GUIGlObject.h.

References UNUSED_PARAMETER.

void GUIEdge::fill ( std::vector< GUIEdge * > &  netsWrappers)
static

Definition at line 123 of file GUIEdge.cpp.

References MSEdge::dictSize(), MSEdge::EDGEFUNCTION_DISTRICT, and MSEdge::myDict.

Referenced by GUINet::initGUIStructures().

const std::vector< MSLane * > * MSEdge::getAllowedLanesWithDefault ( const AllowedLanesCont c,
const MSEdge dest 
) const
protectedinherited

lookup in map and return 0 if not found

Definition at line 233 of file MSEdge.cpp.

Referenced by MSEdge::allowedLanes().

Boundary GUIEdge::getBoundary ( ) const

Returns the street's geometry.

Definition at line 112 of file GUIEdge.cpp.

References Boundary::add(), Boundary::grow(), and MSEdge::myLanes.

Referenced by getCenteringBoundary().

Boundary GUIEdge::getCenteringBoundary ( ) const
virtual

Returns the boundary to which the view shall be centered in order to show the object.

Returns
The boundary the object is within
See also
GUIGlObject::getCenteringBoundary

Implements GUIGlObject.

Definition at line 189 of file GUIEdge.cpp.

References getBoundary(), and Boundary::grow().

SUMOReal MSEdge::getCurrentTravelTime ( const SUMOReal  minSpeed = 0.00001) const
inherited

Computes and returns the current travel time for this edge.

The mean speed of all lanes is used to compute the travel time. To avoid infinite travel times, the given minimum speed is used.

Parameters
[in]minSpeedThe minimumSpeed to assume if traffic on this edge is stopped
Returns
The current effort (travel time) to pass the edge

Definition at line 445 of file MSEdge.cpp.

References MSEdge::getLength(), MSGlobals::gUseMesoSim, MAX2(), MSEdge::myLanes, and SUMOReal.

Referenced by MSVehicleTransfer::add(), MSVehicleTransfer::checkInsertions(), TraCIServerAPI_Edge::processGet(), and MSFullExport::writeEdge().

MSLane * MSEdge::getDepartLane ( const MSVehicle veh) const
inherited

Finds a depart lane for the given vehicle parameters.

Depending on the depart lane procedure a depart lane is chosen. Repeated calls with the same vehicle may return different results if the procedure is "random" or "free". In case no appropriate lane was found, 0 is returned.

Parameters
[in]vehThe vehicle to get the depart lane for
Returns
a possible/chosen depart lane, 0 if no lane can be used

Definition at line 315 of file MSEdge.cpp.

References MSEdge::allowedLanes(), MSRoute::begin(), DEPART_LANE_ALLOWED_FREE, DEPART_LANE_BEST_FREE, DEPART_LANE_DEFAULT, DEPART_LANE_FREE, DEPART_LANE_GIVEN, DEPART_LANE_RANDOM, SUMOVehicleParameter::departLane, SUMOVehicleParameter::departLaneProcedure, MSVehicle::getBestLanes(), MSEdge::getFreeLane(), MSBaseVehicle::getParameter(), RandHelper::getRandomFrom(), MSBaseVehicle::getRoute(), MSVehicleType::getVehicleClass(), MSBaseVehicle::getVehicleType(), MSEdge::myLanes, MSRoute::size(), and SUMOReal.

Referenced by MSEdge::insertVehicle().

SUMOReal MSEdge::getDistanceTo ( const MSEdge other) const
inherited

optimistic air distance heuristic for use in routing

Parameters
[in]otherThe edge to which the distance shall be returned
Returns
The distance to the other edge

Definition at line 566 of file MSEdge.cpp.

References MSEdge::getLanes().

const std::string& MSEdge::getEdgeType ( ) const
inlineinherited

Returns the type of the edge.

Definition at line 250 of file MSEdge.h.

References MSEdge::myEdgeType.

Referenced by GUILane::getParameterWindow().

const MSEdge* MSEdge::getFollower ( unsigned int  n) const
inlineinherited

Returns the n-th of the following edges.

Parameters
[in]nThe index within following edges of the edge to return
Returns
The n-th of the following edges

Definition at line 288 of file MSEdge.h.

References MSEdge::mySuccessors.

Referenced by NLEdgeControlBuilder::build(), MSLane::getInternalFollower(), MSPModel_Striping::initWalkingAreaPaths(), and MSRouteHandler::myStartElement().

MSLane * MSEdge::getFreeLane ( const std::vector< MSLane * > *  allowed,
const SUMOVehicleClass  vclass 
) const
inherited

Finds the emptiest lane allowing the vehicle class.

The emptiest lane is the one with the fewest vehicles on. If there is more than one, the first according to its index in the lane container is chosen.

If allowed==0, the lanes allowed for the given vehicle class will be used.

Parameters
[in]allowedThe lanes to choose from
[in]vclassThe vehicle class to look for
Returns
the least occupied lane
See also
allowedLanes

Definition at line 296 of file MSEdge.cpp.

References MSEdge::allowedLanes(), and MSLane::getVehicleNumber().

Referenced by MSVehicleTransfer::checkInsertions(), and MSEdge::getDepartLane().

const MSJunction* MSEdge::getFromJunction ( ) const
inlineinherited
const std::string& Named::getID ( ) const
inlineinherited

Returns the id.

Returns
The stored id

Definition at line 60 of file Named.h.

References Named::myID.

Referenced by NIImporter_SUMO::_loadNetwork(), MSVehicleTransfer::add(), TraCIServerAPI_Lane::StoringVisitor::add(), Named::StoringVisitor::add(), MSDetectorControl::add(), RORouteDef::addAlternative(), MSNet::addBusStop(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NBNode::buildCrossings(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), NBNode::buildInnerEdges(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), NBNode::buildWalkingAreas(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBNode::computeNodeShape(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), MSLane::detectCollisions(), NIVissimDistrictConnection::dict_BuildDistricts(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), PedestrianEdge< E, L, N >::getEffort(), NBEdge::getFirstNonPedestrianLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), AGStreet::getName(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPModel_Striping::getNextLane(), GUIVehicle::getParameterWindow(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), NBEdgeCont::ignoreFilterMatch(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), MSTrafficLightLogic::init(), PedestrianEdge< E, L, N >::initPedestrianNetwork(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBTrafficLightLogicCont::insert(), NBNodeCont::insert(), NBEdgeCont::insert(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), NIImporter_OpenDrive::loadNetwork(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), MSCalibrator::MSCalibrator(), MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting(), NBOwnTLDef::myCompute(), NBLoadedTLDef::myCompute(), NIXMLTrafficLightsHandler::myEndElement(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Example::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), GUIViewTraffic::onGamingClick(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), MSEdge::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processSet(), NWWriter_SUMO::prohibitionConnection(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), PCPolyContainer::save(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), NBNodeCont::setAsTLControlled(), NBEdge::setControllingTLInformation(), NIXMLEdgesHandler::setNodes(), MSLink::setRequestInformation(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap_matchingEdgeLane(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSLCM_JE2013::wantsChange(), MSFCDExport::write(), MSEmissionExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSInductLoop::writeTypedXMLOutput(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

std::vector< GUIGlID > GUIEdge::getIDs ( bool  includeInternal)
static
const std::vector<MSEdge*>& MSEdge::getIncomingEdges ( ) const
inlineinherited

Returns the list of edges from which this edge may be reached.

Returns
Edges from which this edge may be reached

Definition at line 271 of file MSEdge.h.

References MSEdge::myPredeccesors.

Referenced by NLEdgeControlBuilder::build(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), MSLane::getLogicalPredecessorLane(), and MSPModel_Striping::initWalkingAreaPaths().

MSLane & GUIEdge::getLane ( size_t  laneNo)

returns the enumerated lane (!!! why not private with a friend?)

Definition at line 90 of file GUIEdge.cpp.

static std::pair<SUMOReal, SUMOReal> GUIEdge::getLaneOffsets ( SUMOReal  x1,
SUMOReal  y1,
SUMOReal  x2,
SUMOReal  y2,
SUMOReal  prev,
SUMOReal  wanted 
)
static

returns the position on the line given by the coordinates where "prev" is the length of the line and "wanted" the distance from the begin !!! should be within another class

const std::vector<MSLane*>& MSEdge::getLanes ( ) const
inlineinherited

Returns this edge's lanes.

Returns
This edge's lanes

Definition at line 173 of file MSEdge.h.

References MSEdge::myLanes.

Referenced by MSLCM_JE2013::_patchSpeed(), MSLCM_LC2013::_patchSpeed(), MSVehicleTransfer::add(), NLHandler::addConnection(), MSBaseVehicle::calculateArrivalPos(), MSEdgeControl::changeLanes(), MSVehicleTransfer::checkInsertions(), GUILane::drawMarkings(), MSCalibrator::execute(), MS_E2_ZS_CollectorOverLanes::extendTo(), MSEdge::getDistanceTo(), MSPerson::MSPersonStage::getEdgeAngle(), GUILane::getEdgeLaneNumber(), MSPerson::MSPersonStage::getEdgePosition(), TraCIServerAPI_Simulation::getLaneChecking(), MSVehicle::getLaneIndex(), MSEdge::getLength(), getPopUpMenu(), MSVehicle::getPosition(), TraCIServerAPI_Edge::getShape(), MSPModel::getSidewalk(), MSEdge::getSpeedLimit(), MSEdge::getVehicleMaxSpeed(), GUICalibrator::GUICalibrator(), GUITriggeredRerouter::GUITriggeredRerouterEdge::GUITriggeredRerouterEdge(), MSVehicle::Influencer::influenceChangeDecision(), GUINet::initGUIStructures(), MSCalibrator::invalidJam(), GUISUMOViewParent::isSelected(), MSCalibrator::MSCalibrator(), MSRouteProbe::MSRouteProbe(), MSLCM_DK2008::patchSpeed(), TraCIServerAPI_Edge::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Edge::processSet(), TraCIServerAPI_Vehicle::processSet(), MSCalibrator::remainingVehicleCapacity(), MSVehicle::updateBestLanes(), TraCIServerAPI_Vehicle::vtdMap_matchingNearest(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSQueueExport::writeEdge(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), and MSMeanData::writeEdge().

SUMOTime MSEdge::getLastFailedInsertionTime ( ) const
inlineinherited

Returns the last time a vehicle could not be inserted.

Returns
The current value

Definition at line 419 of file MSEdge.h.

References MSEdge::myLastFailedInsertionTime.

const std::map<std::string, std::string>& Parameterised::getMap ( ) const
inlineinherited

Returns the inner key/value map.

Returns
the inner map

Definition at line 107 of file Parameterised.h.

References Parameterised::myMap.

Referenced by NBTrafficLightDefinition::compute(), GUIVehicle::getParameterWindow(), and PCPolyContainer::save().

const std::string& GUIGlObject::getMicrosimID ( ) const
inlineinherited

Returns the id of the object as known to microsim.

Returns
The id of the object

Definition at line 146 of file GUIGlObject.h.

References GUIGlObject::myMicrosimID.

Referenced by GUIGlObject::createFullName(), GUIGlObject::drawName(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), and GUIGLObjectPopupMenu::onCmdCopyName().

SUMOReal MSEdge::getMinimumTravelTime ( const SUMOVehicle *const  veh) const
inlineinherited

returns the minimum travel time for the given vehicle

Definition at line 358 of file MSEdge.h.

References MSEdge::getLength(), SUMOVehicle::getMaxSpeed(), MSEdge::getSpeedLimit(), MSEdge::getVehicleMaxSpeed(), and MIN2().

Referenced by MSDevice_Routing::getEffort(), and MSNet::getTravelTime().

unsigned int MSEdge::getNoFollowing ( ) const
inlineinherited

Returns the number of edges that may be reached from this edge.

Returns
The number of following edges

Definition at line 279 of file MSEdge.h.

References MSEdge::mySuccessors.

Referenced by NLEdgeControlBuilder::build(), MSPModel_Striping::initWalkingAreaPaths(), and MSRouteHandler::myStartElement().

int MSEdge::getNumericalID ( ) const
inlineinherited

Returns the numerical id of the edge.

Returns
This edge's numerical id

Definition at line 237 of file MSEdge.h.

References MSEdge::myNumericalID.

Referenced by MSEdgeControl::changeLanes(), MSEdge::dictionary(), MSMeanData_Amitran::getEdgeID(), and MSDevice_Routing::getEffort().

const std::string & Parameterised::getParameter ( const std::string &  key,
const std::string &  defaultValue 
) const
inherited
GUIParameterTableWindow * GUIEdge::getParameterWindow ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtual

Returns an own parameter window.

Parameters
[in]appThe application needed to build the parameter window
[in]parentThe parent window needed to build the parameter window
Returns
The built parameter window
See also
GUIGlObject::getParameterWindow

Implements GUIGlObject.

Definition at line 153 of file GUIEdge.cpp.

References GUIParameterTableWindow::closeBuilding(), MSEdge::getLength(), GUISUMOAbstractView::getPositionInformation(), GUIParameterTableWindow::mkItem(), MSEdge::myLanes, and UNUSED_PARAMETER.

GUIGLObjectPopupMenu * GUIEdge::getPopUpMenu ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtual

Returns an own popup-menu.

Parameters
[in]appThe application needed to build the popup-menu
[in]parentThe parent window needed to build the popup-menu
Returns
The built popup-menu
See also
GUIGlObject::getPopUpMenu

Implements GUIGlObject.

Definition at line 136 of file GUIEdge.cpp.

References GUIGlObject::buildCenterPopupEntry(), GUIGlObject::buildNameCopyPopupEntry(), GUIGlObject::buildPopupHeader(), GUIGlObject::buildPositionCopyEntry(), GUIGlObject::buildSelectionPopupEntry(), GUIGlObject::buildShowParamsPopupEntry(), MSEdge::getLanes(), GUISUMOAbstractView::getPositionInformation(), MSGlobals::gUseMesoSim, SUMOReal, and toString().

std::vector< MSPerson * > MSEdge::getSortedPersons ( SUMOTime  timestep) const
inherited

Returns this edge's persons sorted by pos.

Returns
This edge's persons sorted by pos

Definition at line 596 of file MSEdge.cpp.

References MSEdge::myPersons.

Referenced by MSXMLRawOut::writeEdge().

SUMOReal MSEdge::getSpeedLimit ( ) const
inherited

Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be the fastest edge.

Returns
The maximum speed allowed on this edge

Definition at line 582 of file MSEdge.cpp.

References MSEdge::getLanes().

Referenced by GUIApplicationWindow::checkGamingEvents(), MSEdge::getMinimumTravelTime(), MSCalibrator::invalidJam(), MSCalibrator::remainingVehicleCapacity(), and MSMeanData::writeEdge().

const std::string& MSEdge::getStreetName ( ) const
inlineinherited

Returns the street name of the edge.

Definition at line 244 of file MSEdge.h.

References MSEdge::myStreetName.

Referenced by drawGL(), and GUILane::getParameterWindow().

const MSJunction* MSEdge::getToJunction ( ) const
inlineinherited
SUMOReal MSEdge::getVehicleMaxSpeed ( const SUMOVehicle *const  veh) const
inherited

Returns the maximum speed the vehicle may use on this edge.

Note that the vehicle's max. speed is not considered herein, only the edge's speed limit and the driver's adaptation of this speed. Only the first lane is considered

Returns
The maximum velocity on this edge for the given vehicle

Definition at line 589 of file MSEdge.cpp.

References MSEdge::getLanes().

Referenced by MSEdge::getMinimumTravelTime().

SUMOTime MSEdge::incVaporization ( SUMOTime  t)
inherited

Enables vaporization.

The internal vaporization counter is increased enabling the vaporization. Called from the event handler.

Parameters
[in]tThe current time (unused)
Returns
Time to next call (always 0)
Exceptions
ProcessErrornot thrown by this method, just derived

Definition at line 282 of file MSEdge.cpp.

References MSEdge::myVaporizationRequests.

Referenced by NLTriggerBuilder::buildVaporizer().

void MSEdge::initialize ( std::vector< MSLane * > *  lanes)
inherited

Initialize the edge.

Parameters
[in]allowedInformation which edges may be reached from which lanes
[in]lanesList of this edge's lanes

Definition at line 100 of file MSEdge.cpp.

References MSEdge::EDGEFUNCTION_DISTRICT, OptionsCont::getOptions(), MSEdge::myCombinedPermissions, MSEdge::myFunction, MSEdge::myLaneChanger, MSEdge::myLanes, and SVCAll.

Referenced by NLHandler::addDistrict(), and NLEdgeControlBuilder::closeEdge().

void MSEdge::insertIDs ( std::vector< std::string > &  into)
staticinherited

Inserts IDs of all known edges into the given vector.

Definition at line 528 of file MSEdge.cpp.

References MSEdge::myDict.

Referenced by TraCIServerAPI_Edge::processGet().

bool MSEdge::insertVehicle ( SUMOVehicle v,
SUMOTime  time 
) const
inherited

Tries to insert the given vehicle into the network.

The procedure for choosing the proper lane is determined, first. In dependance to this, the proper lane is chosen.

Insertion itself is done by calling the chose lane's "insertVehicle" method.

Parameters
[in]vThe vehicle to insert
[in]timeThe current simulation time
Returns
Whether the vehicle could be inserted
See also
MSLane::insertVehicle

Definition at line 362 of file MSEdge.cpp.

References DEPART_POS_FREE, DEPART_POS_GIVEN, DEPART_POS_RANDOM, DEPART_POS_RANDOM_FREE, SUMOVehicleParameter::departPos, SUMOVehicleParameter::departPosProcedure, MSEdge::getDepartLane(), SUMOVehicle::getID(), MSEdge::getLength(), SUMOVehicle::getParameter(), MSGlobals::gUseMesoSim, MSLane::insertVehicle(), MSEdge::isVaporizing(), RandHelper::rand(), SUMOReal, toString(), UNUSED_PARAMETER, and WRITE_WARNING.

Referenced by MSCalibrator::execute().

bool MSEdge::isCrossing ( ) const
inlineinherited

return whether this edge is a pedestrian crossing

Definition at line 225 of file MSEdge.h.

References MSEdge::EDGEFUNCTION_CROSSING, and MSEdge::myFunction.

Referenced by MSPModel_Striping::getNextLane().

bool MSEdge::isInternal ( ) const
inlineinherited

return whether this edge is an internal edge

Definition at line 220 of file MSEdge.h.

References MSEdge::EDGEFUNCTION_INTERNAL, and MSEdge::myFunction.

Referenced by NLEdgeControlBuilder::build(), and MSPModel_Striping::getNextLane().

bool MSEdge::isRoundabout ( ) const
inlineinherited
bool MSEdge::isVaporizing ( ) const
inlineinherited

Returns whether vehicles on this edge shall be vaporized.

Returns
Whether no vehicle shall be on this edge

Definition at line 316 of file MSEdge.h.

References MSEdge::myVaporizationRequests.

Referenced by MSVehicle::executeMove(), MSLane::executeMovements(), and MSEdge::insertVehicle().

bool MSEdge::isWalkingArea ( ) const
inlineinherited

return whether this edge is walking area

Definition at line 230 of file MSEdge.h.

References MSEdge::EDGEFUNCTION_WALKINGAREA, and MSEdge::myFunction.

Referenced by MSPModel_Striping::getNextLane(), MSPModel_Striping::initWalkingAreaPaths(), and MSPModel_Striping::PState::PState().

bool Parameterised::knowsParameter ( const std::string &  key) const
inherited

Returns whether the parameter is known.

Parameters
[in]keyThe key to ask for
Returns
Whether the key is known

Definition at line 75 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSDevice_Example::buildVehicleDevices(), MSDevice::equippedByDefaultAssignmentOptions(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().

bool MSEdge::laneChangeAllowed ( ) const
inherited
MSLane * MSEdge::leftLane ( const MSLane *const  lane) const
inherited

Returns the lane left to the one given, 0 if the given lane is leftmost.

Parameters
[in]laneThe lane right to the one to be returned
Returns
The lane left to the given, 0 if no such lane exists
Todo:
This method searches for the given in the container; probably, this could be done faster

Definition at line 194 of file MSEdge.cpp.

References MSEdge::parallelLane().

void MSEdge::markAsRoundabout ( )
inlineinherited

Definition at line 498 of file MSEdge.h.

References MSEdge::myAmRoundabout.

Referenced by NLHandler::addRoundabout(), and NLEdgeControlBuilder::build().

size_t MSEdge::numericalDictSize ( )
staticinherited

Returns the number of edges with a numerical id.

Definition at line 513 of file MSEdge.cpp.

References MSEdge::myEdges.

Referenced by MSDevice_Routing::getRouter(), MSNet::getRouterEffort(), and MSNet::getRouterTT().

GUIEdge& GUIEdge::operator= ( const GUIEdge s)
private

invalidated assignment operator

MSLane * MSEdge::parallelLane ( const MSLane *const  lane,
int  offset 
) const
inherited

Returns the lane with the given offset parallel to the given lane one or 0 if it does not exist.

Parameters
[in]laneThe base lane
[in]offsetThe offset of the result lane
Todo:
This method searches for the given in the container; probably, this could be done faster

Definition at line 206 of file MSEdge.cpp.

References MSEdge::myLanes.

Referenced by MSLane::getParallelLane(), MSEdge::leftLane(), and MSEdge::rightLane().

void MSEdge::parseEdgesList ( const std::string &  desc,
std::vector< const MSEdge * > &  into,
const std::string &  rid 
)
staticinherited

Parses the given string assuming it contains a list of edge ids divided by spaces.

Splits the string at spaces, uses polymorph method to generate edge vector.

Parameters
[in]descThe string containing space-separated edge ids
[out]intoThe vector to fill
[in]ridThe id of the route these description belongs to; used for error message generation
Exceptions
ProcessErrorIf one of the strings contained is not a known edge id

Definition at line 536 of file MSEdge.cpp.

References BinaryFormatter::BF_ROUTE, StringTokenizer::getVector(), and FileHelpers::readEdgeVector().

Referenced by MSRouteHandler::myStartElement(), MSStateHandler::myStartElement(), MSRouteHandler::openRoute(), and TraCIServerAPI_Vehicle::processSet().

void MSEdge::parseEdgesList ( const std::vector< std::string > &  desc,
std::vector< const MSEdge * > &  into,
const std::string &  rid 
)
staticinherited

Parses the given string vector assuming it edge ids.

Parameters
[in]descThe string vector containing edge ids
[out]intoThe vector to fill
[in]ridThe id of the route these description belongs to; used for error message generation
Exceptions
ProcessErrorIf one of the strings contained is not a known edge id

Definition at line 551 of file MSEdge.cpp.

References MSEdge::dictionary().

bool MSEdge::prohibits ( const SUMOVehicle *const  vehicle) const
inlineinherited

Returns whether the vehicle (class) is not allowed on the edge.

Definition at line 443 of file MSEdge.h.

References MSVehicleType::getVehicleClass(), SUMOVehicle::getVehicleType(), and MSEdge::myCombinedPermissions.

void GUIGlObject::removeParameterTable ( GUIParameterTableWindow w)
inherited

Lets this object know a parameter window showing the object's values was closed.

Parameters
[in]wThe closed parameter window

Definition at line 193 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().

void GUIEdge::removePerson ( MSPerson p) const
inlinevirtual

Reimplemented from MSEdge.

Definition at line 145 of file GUIEdge.h.

References myLock, and MSEdge::removePerson().

MSLane * MSEdge::rightLane ( const MSLane *const  lane) const
inherited

Returns the lane right to the one given, 0 if the given lane is rightmost.

Parameters
[in]laneThe lane left to the one to be returned
Returns
The lane right to the given, 0 if no such lane exists
Todo:
This method searches for the given in the container; probably, this could be done faster

Definition at line 200 of file MSEdge.cpp.

References MSEdge::parallelLane().

void Named::setID ( const std::string &  newID)
inlineinherited

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 68 of file Named.h.

References Named::myID.

Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().

void MSEdge::setJunctions ( MSJunction from,
MSJunction to 
)
inlineinherited

Definition at line 302 of file MSEdge.h.

References MSEdge::myFromJunction, and MSEdge::myToJunction.

Referenced by NLHandler::myEndElement().

void MSEdge::setLastFailedInsertionTime ( SUMOTime  time) const
inlineinherited

Sets the last time a vehicle could not be inserted.

Parameters
[in]timethe new value

Definition at line 427 of file MSEdge.h.

References MSEdge::myLastFailedInsertionTime.

void GUIGlObject::setMicrosimID ( const std::string &  newID)
inherited

Changes the microsimID of the object (happens in NETEDIT)

Definition at line 108 of file GUIGlObject.cpp.

References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myMicrosimID.

void GUIGlObject::setPrefix ( const std::string &  prefix)
protectedinherited

Field Documentation

AllowedLanesCont MSEdge::myAllowed
protectedinherited

Associative container from destination-edge to allowed-lanes.

Definition at line 638 of file MSEdge.h.

Referenced by MSEdge::allowedLanes(), MSEdge::closeBuilding(), and MSEdge::~MSEdge().

bool MSEdge::myAmRoundabout
protectedinherited

whether this edge belongs to a roundabout

Definition at line 657 of file MSEdge.h.

Referenced by MSEdge::isRoundabout(), and MSEdge::markAsRoundabout().

ClassedAllowedLanesCont MSEdge::myClassedAllowed
mutableprotectedinherited

From vehicle class to lanes allowed to be used by it.

Definition at line 642 of file MSEdge.h.

Referenced by MSEdge::allowedLanes(), MSEdge::rebuildAllowedLanes(), and MSEdge::~MSEdge().

SVCPermissions MSEdge::myCombinedPermissions
protectedinherited

The union of lane permissions for this edge.

Definition at line 647 of file MSEdge.h.

Referenced by MSEdge::initialize(), MSEdge::prohibits(), and MSEdge::rebuildAllowedLanes().

MSEdge::DictType MSEdge::myDict
staticprotectedinherited

Static dictionary to associate string-ids with objects.

Deprecated:
Move to MSEdgeControl, make non-static

Definition at line 668 of file MSEdge.h.

Referenced by MSEdge::clear(), MSEdge::dictionary(), MSEdge::dictSize(), fill(), getIDs(), and MSEdge::insertIDs().

std::vector< MSEdge * > MSEdge::myEdges
staticprotectedinherited

Static list of edges.

Deprecated:
Move to MSEdgeControl, make non-static

Definition at line 673 of file MSEdge.h.

Referenced by MSEdge::dictionary(), and MSEdge::numericalDictSize().

std::string MSEdge::myEdgeType
protectedinherited

the type of the edge (optionally used during network creation)

Definition at line 654 of file MSEdge.h.

Referenced by MSEdge::getEdgeType().

MSJunction* MSEdge::myFromJunction
protectedinherited

the junctions for this edge

Definition at line 628 of file MSEdge.h.

Referenced by MSEdge::getFromJunction(), and MSEdge::setJunctions().

const EdgeBasicFunction MSEdge::myFunction
protectedinherited
MSLaneChanger* MSEdge::myLaneChanger
protectedinherited

This member will do the lane-change.

Definition at line 610 of file MSEdge.h.

Referenced by MSEdge::changeLanes(), MSEdge::initialize(), and MSEdge::~MSEdge().

std::vector<MSLane*>* MSEdge::myLanes
protectedinherited

Container for the edge's lane; should be sorted: (right-hand-traffic) the more left the lane, the higher the container-index.

Definition at line 607 of file MSEdge.h.

Referenced by MSEdge::closeBuilding(), drawGL(), getBoundary(), MSEdge::getCurrentTravelTime(), MSEdge::getDepartLane(), MSEdge::getLanes(), getParameterWindow(), MSEdge::initialize(), MSEdge::laneChangeAllowed(), MSEdge::parallelLane(), MSEdge::rebuildAllowedLanes(), and MSEdge::~MSEdge().

SUMOTime MSEdge::myLastFailedInsertionTime
mutableprotectedinherited

The time of last insertion failure.

Definition at line 619 of file MSEdge.h.

Referenced by MSEdge::getLastFailedInsertionTime(), and MSEdge::setLastFailedInsertionTime().

MFXMutex GUIEdge::myLock
mutableprivate

The mutex used to avoid concurrent updates of myPersons.

Definition at line 187 of file GUIEdge.h.

Referenced by addPerson(), drawGL(), removePerson(), and ~GUIEdge().

SVCPermissions MSEdge::myMinimumPermissions
protectedinherited

The intersection of lane permissions for this edge.

Definition at line 645 of file MSEdge.h.

Referenced by MSEdge::allowedLanes(), and MSEdge::rebuildAllowedLanes().

int MSEdge::myNumericalID
protectedinherited

This edge's numerical id.

Definition at line 604 of file MSEdge.h.

Referenced by MSEdge::getNumericalID().

std::set<MSPerson*> MSEdge::myPersons
mutableprotectedinherited

Persons on the edge (only for drawing)

Definition at line 632 of file MSEdge.h.

Referenced by MSEdge::addPerson(), drawGL(), MSEdge::getSortedPersons(), and MSEdge::removePerson().

std::vector<MSEdge*> MSEdge::myPredeccesors
protectedinherited

The preceeding edges.

Definition at line 625 of file MSEdge.h.

Referenced by MSEdge::closeBuilding(), and MSEdge::getIncomingEdges().

std::string MSEdge::myStreetName
protectedinherited

the real-world name of this edge (need not be unique)

Definition at line 651 of file MSEdge.h.

Referenced by drawGL(), and MSEdge::getStreetName().

std::vector<MSEdge*> MSEdge::mySuccessors
protectedinherited

The succeeding edges.

Definition at line 622 of file MSEdge.h.

Referenced by MSEdge::addFollower(), MSEdge::closeBuilding(), MSEdge::getFollower(), and MSEdge::getNoFollowing().

MSJunction* MSEdge::myToJunction
protectedinherited

Definition at line 629 of file MSEdge.h.

Referenced by MSEdge::getToJunction(), and MSEdge::setJunctions().

int MSEdge::myVaporizationRequests
protectedinherited

Vaporizer counter.

Definition at line 616 of file MSEdge.h.

Referenced by MSEdge::decVaporization(), MSEdge::incVaporization(), and MSEdge::isVaporizing().

StringBijection< GUIGlObjectType > GUIGlObject::TypeNames
staticinherited

associates object types with strings

Definition at line 99 of file GUIGlObject.h.


The documentation for this class was generated from the following files: