|
SUMO - Simulation of Urban MObility
|
A road/street connecting two junctions (gui-version) More...
#include <GUIEdge.h>
Data Structures | |
| class | lane_wrapper_finder |
| A class to find the matching lane wrapper. More... | |
Public Types | |
| typedef std::map< const MSEdge *, std::vector< MSLane * > * > | AllowedLanesCont |
| Suceeding edges (keys) and allowed lanes to reach these edges (values). | |
| typedef std::map < SUMOVehicleClass, AllowedLanesCont > | ClassedAllowedLanesCont |
| Map from vehicle types to lanes that may be used to reach one of the next edges. | |
| enum | EdgeBasicFunction { EDGEFUNCTION_UNKNOWN = -1, EDGEFUNCTION_NORMAL = 0, EDGEFUNCTION_CONNECTOR = 1, EDGEFUNCTION_INTERNAL = 2, EDGEFUNCTION_DISTRICT = 3 } |
Defines possible edge types. More... | |
Public Member Functions | |
| virtual void | changeLanes (SUMOTime t) throw () |
| Performs lane changing on this edge. | |
| void | closeBuilding () |
| virtual void | drawGLAdditional (GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const throw () |
| Draws additional, user-triggered visualisations. | |
| void | drawName (const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const |
| Boundary | getBoundary () const |
| Returns the street's geometry. | |
| SUMOReal | getCurrentTravelTime () const throw () |
| Computes and returns the current travel time for this edge. | |
| MSLane & | getLane (size_t laneNo) |
| returns the enumerated lane (!!! why not private with a friend?) | |
| GUILaneWrapper & | getLaneGeometry (size_t laneNo) const |
| returns the enumerated lane's geometry (!!! why not private with a friend?) | |
| GUILaneWrapper & | getLaneGeometry (const MSLane *lane) const |
| GUIEdge (const std::string &id, unsigned int numericalID, const std::string &streetName) throw () | |
| Constructor. | |
| void | initGeometry () throw () |
| Builds lane wrappers for this edge's lanes. | |
| void | initialize (std::vector< MSLane * > *lanes, EdgeBasicFunction function) throw () |
| Initialize the edge. | |
| bool | prohibits (const SUMOVehicle *const vehicle) const throw () |
| Returns whether the vehicle (class) is not allowed on the edge. | |
| void | rebuildAllowedLanes () throw () |
| ~GUIEdge () throw () | |
| Destructor. | |
inherited from GUIGlObject | |
| virtual GUIGLObjectPopupMenu * | getPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent) throw () |
| Returns an own popup-menu. | |
| virtual GUIParameterTableWindow * | getParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent) throw () |
| Returns an own parameter window. | |
| Boundary | getCenteringBoundary () const throw () |
| Returns the boundary to which the view shall be centered in order to show the object. | |
| void | drawGL (const GUIVisualizationSettings &s) const throw () |
| Draws the object. | |
Access to the edge's lanes | |
| MSLane * | leftLane (const MSLane *const lane) const throw () |
| Returns the lane left to the one given, 0 if the given lane is leftmost. | |
| MSLane * | rightLane (const MSLane *const lane) const throw () |
| Returns the lane right to the one given, 0 if the given lane is rightmost. | |
| const std::vector< MSLane * > & | getLanes () const throw () |
| Returns this edge's lanes. | |
| const std::vector< MSLane * > * | allowedLanes (const MSEdge &destination, SUMOVehicleClass vclass=SVC_UNKNOWN) const throw () |
| Get the allowed lanes to reach the destination-edge. | |
| const std::vector< MSLane * > * | allowedLanes (SUMOVehicleClass vclass=SVC_UNKNOWN) const throw () |
| Get the allowed lanes for the given vehicle class. | |
Access to other edge attributes | |
| const std::string & | getID () const throw () |
| Returns the id of the edge. | |
| EdgeBasicFunction | getPurpose () const throw () |
| Returns the edge type (EdgeBasicFunction) | |
| unsigned int | getNumericalID () const throw () |
| Returns the numerical id of the edge. | |
| const std::string & | getStreetName () const |
| Returns the street name of the edge. | |
Access to succeeding/predecessing edges | |
| void | addFollower (MSEdge *edge) throw () |
| Returns the list of edges which may be reached from this edge. | |
| const std::vector< MSEdge * > & | getIncomingEdges () const throw () |
| Returns the list of edges from which this edge may be reached. | |
| unsigned int | getNoFollowing () const throw () |
| Returns the number of edges that may be reached from this edge. | |
| const MSEdge * | getFollower (unsigned int n) const throw () |
| Returns the n-th of the following edges. | |
Access to vaporizing interface | |
| bool | isVaporizing () const throw () |
| Returns whether vehicles on this edge shall be vaporized. | |
| SUMOTime | incVaporization (SUMOTime t) throw (ProcessError) |
| Enables vaporization. | |
| SUMOTime | decVaporization (SUMOTime t) throw (ProcessError) |
| Disables vaporization. | |
Methods releated to vehicle insertion | |
| bool | insertVehicle (SUMOVehicle &v, SUMOTime time) const throw (ProcessError) |
| Tries to insert the given vehicle into the network. | |
| MSLane * | getFreeLane (const std::vector< MSLane * > *allowed, const SUMOVehicleClass vclass) const throw () |
| Finds the emptiest lane allowing the vehicle class. | |
| MSLane * | getDepartLane (const MSVehicle &veh) const throw () |
| Finds a depart lane for the given vehicle parameters. | |
| SUMOTime | getLastFailedInsertionTime () const throw () |
| Returns the last time a vehicle could not be inserted. | |
| void | setLastFailedInsertionTime (SUMOTime time) const throw () |
| Sets the last time a vehicle could not be inserted. | |
Atomar getter methods | |
| const std::string & | getFullName () const |
| Returns the full name appearing in the tool tip. | |
| GUIGlID | getGlID () const throw () |
| Returns the numerical id of the object. | |
interfaces to be implemented by derived classes | |
| const std::string & | getMicrosimID () const |
| Returns the id of the object as known to microsim. | |
| void | setMicrosimID (const std::string &newID) |
| Changes the microsimID of the object (happens in NETEDIT) | |
| GUIGlObjectType | getType () const |
| Returns the type of the object as coded in GUIGlObjectType. | |
Parameter table window I/O | |
| void | addParameterTable (GUIParameterTableWindow *w) throw () |
| Lets this object know a parameter window showing the object's values was opened. | |
| void | removeParameterTable (GUIParameterTableWindow *w) throw () |
| Lets this object know a parameter window showing the object's values was closed. | |
Static Public Member Functions | |
| static void | clear () throw () |
| Clears the dictionary. | |
| static bool | dictionary (const std::string &id, MSEdge *edge) throw () |
| Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary. Otherwise returns false. | |
| static MSEdge * | dictionary (const std::string &id) throw () |
| Returns the MSEdge associated to the key id if exists, otherwise returns 0. | |
| static MSEdge * | dictionary (size_t index) throw () |
| Returns the MSEdge at the index. | |
| static size_t | dictSize () throw () |
| Returns the number of edges. | |
| static void | fill (std::vector< GUIEdge * > &netsWrappers) |
| static std::vector< GUIGlID > | getIDs (bool includeInternal) |
| static std::pair< SUMOReal, SUMOReal > | getLaneOffsets (SUMOReal x1, SUMOReal y1, SUMOReal x2, SUMOReal y2, SUMOReal prev, SUMOReal wanted) |
| static void | insertIDs (std::vector< std::string > &into) throw () |
| Inserts IDs of all known edges into the given vector. | |
Static parser helper | |
| static void | parseEdgesList (const std::string &desc, std::vector< const MSEdge * > &into, const std::string &rid) throw (ProcessError) |
| Parses the given string assuming it contains a list of edge ids divided by spaces. | |
| static void | parseEdgesList (const std::vector< std::string > &desc, std::vector< const MSEdge * > &into, const std::string &rid) throw (ProcessError) |
| Parses the given string vector assuming it edge ids. | |
Static Public Attributes | |
| static StringBijection < GUIGlObjectType > | TypeNames |
| associates object types with strings | |
Protected Member Functions | |
| const std::vector< MSLane * > * | allowedLanes (const MSEdge *destination, SUMOVehicleClass vclass=SVC_UNKNOWN) const throw () |
| Get the allowed lanes to reach the destination-edge. | |
| void | setPrefix (const std::string &prefix) |
helper methods for building popup-menus | |
| void | buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true) throw () |
| Builds the header. | |
| void | buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to center to the object. | |
| void | buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds entries which allow to copy the name / typed name into the clipboard. | |
| void | buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to (de)select the object. | |
| void | buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to open the parameter window. | |
| void | buildPositionCopyEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position. | |
| void | buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) throw () |
| Builds an entry which allows to open the manipulator window. | |
Protected Attributes | |
| EdgeBasicFunction | myFunction |
| the purpose of the edge | |
| std::string | myID |
| Unique ID. | |
| MSLaneChanger * | myLaneChanger |
| This member will do the lane-change. | |
| 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. | |
| SUMOTime | myLastFailedInsertionTime |
| The time of last insertion failure. | |
| unsigned int | myNumericalID |
| This edge's numerical id. | |
| std::vector< MSEdge * > | myPredeccesors |
| The preceeding edges. | |
| std::vector< MSEdge * > | mySuccessors |
| The succeeding edges. | |
| int | myVaporizationRequests |
| Vaporizer counter. | |
Storages for allowed lanes (depending on vehicle classes) | |
| AllowedLanesCont | myAllowed |
| Associative container from destination-edge to allowed-lanes. | |
| ClassedAllowedLanesCont | myClassedAllowed |
| From vehicle class to lanes allowed to be used by it. | |
| bool | myHaveClassConstraints |
| Whether any class constraints exist for this edge. | |
| std::string | myStreetName |
Private Types | |
| typedef std::vector < GUILaneWrapper * > | LaneWrapperVector |
| Definition of the lane's positions vector. | |
Private Member Functions | |
| GUIEdge (const GUIEdge &s) | |
| invalidated copy constructor | |
| GUIEdge & | operator= (const GUIEdge &s) |
| invalidated assignment operator | |
Private Attributes | |
| LaneWrapperVector | myLaneGeoms |
| List of the edge's lanes geometrical information. | |
Static edge container | |
| typedef std::map< std::string, MSEdge * > | DictType |
| definition of the static dictionary type | |
| static DictType | myDict |
| Static dictionary to associate string-ids with objects. | |
| static std::vector< MSEdge * > | myEdges |
| Static list of edges. | |
A road/street connecting two junctions (gui-version)
typedef std::map< const MSEdge*, std::vector<MSLane*>* > MSEdge::AllowedLanesCont [inherited] |
typedef std::map< SUMOVehicleClass, AllowedLanesCont > MSEdge::ClassedAllowedLanesCont [inherited] |
typedef std::map< std::string, MSEdge* > MSEdge::DictType [protected, inherited] |
typedef std::vector<GUILaneWrapper*> GUIEdge::LaneWrapperVector [private] |
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.
| GUIEdge::GUIEdge | ( | const std::string & | id, |
| unsigned int | numericalID, | ||
| const std::string & | streetName | ||
| ) | throw () |
Constructor.
| [in] | id | The id of the edge |
| [in] | numericalID | The numerical id (index) of the edge |
Definition at line 64 of file GUIEdge.cpp.
| GUIEdge::~GUIEdge | ( | ) | throw () |
| GUIEdge::GUIEdge | ( | const GUIEdge & | s | ) | [private] |
invalidated copy constructor
| void MSEdge::addFollower | ( | MSEdge * | edge | ) | throw () [inline, inherited] |
Returns the list of edges which may be reached from this edge.
Definition at line 221 of file MSEdge.h.
References MSEdge::mySuccessors.
Referenced by NLHandler::addDistrict(), and NLHandler::addDistrictEdge().
| void GUIGlObject::addParameterTable | ( | GUIParameterTableWindow * | w | ) | throw () [inherited] |
Lets this object know a parameter window showing the object's values was opened.
| [in] | w | The opened parameter window |
Definition at line 187 of file GUIGlObject.cpp.
References GUIGlObject::myParamWindows.
| const std::vector< MSLane * > * MSEdge::allowedLanes | ( | SUMOVehicleClass | vclass = SVC_UNKNOWN | ) | const throw () [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.
| [in] | vclass | The vehicle class for which this information shall be returned |
Definition at line 195 of file MSEdge.cpp.
| const std::vector< MSLane * > * MSEdge::allowedLanes | ( | const MSEdge * | destination, |
| SUMOVehicleClass | vclass = SVC_UNKNOWN |
||
| ) | const throw () [protected, 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.
| [in] | destination | The edge to reach |
| [in] | vclass | The vehicle class for which this information shall be returned |
Definition at line 201 of file MSEdge.cpp.
References SVC_UNKNOWN.
| const std::vector< MSLane * > * MSEdge::allowedLanes | ( | const MSEdge & | destination, |
| SUMOVehicleClass | vclass = SVC_UNKNOWN |
||
| ) | const throw () [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.
| [in] | destination | The edge to reach |
| [in] | vclass | The vehicle class for which this information shall be returned |
Definition at line 189 of file MSEdge.cpp.
Referenced by MSVehicleTransfer::checkInsertions(), MSVehicle::getBestLanes(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), MSLane::by_connections_to_sorter::operator()(), and MSLane::succLinkSec().
| void GUIGlObject::buildCenterPopupEntry | ( | GUIGLObjectPopupMenu * | ret, |
| bool | addSeparator = true |
||
| ) | throw () [protected, inherited] |
Builds an entry which allows to center to the object.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 125 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_RECENTERVIEW, and MID_CENTER.
Referenced by GUIVehicle::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), and GUILaneSpeedTrigger::getPopUpMenu().
| void GUIGlObject::buildNameCopyPopupEntry | ( | GUIGLObjectPopupMenu * | ret, |
| bool | addSeparator = true |
||
| ) | throw () [protected, inherited] |
Builds entries which allow to copy the name / typed name into the clipboard.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 134 of file GUIGlObject.cpp.
References MID_COPY_NAME, and MID_COPY_TYPED_NAME.
Referenced by GUIVehicle::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), and GUILaneSpeedTrigger::getPopUpMenu().
| void GUIGlObject::buildPopupHeader | ( | GUIGLObjectPopupMenu * | ret, |
| GUIMainWindow & | app, | ||
| bool | addSeparator = true |
||
| ) | throw () [protected, inherited] |
Builds the header.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 115 of file GUIGlObject.cpp.
References GUIGlObject::getFullName().
Referenced by GUIVehicle::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), and GUILaneSpeedTrigger::getPopUpMenu().
| void GUIGlObject::buildPositionCopyEntry | ( | GUIGLObjectPopupMenu * | ret, |
| bool | addSeparator = true |
||
| ) | throw () [protected, inherited] |
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 166 of file GUIGlObject.cpp.
References GeoConvHelper::getDefaultInstance(), MID_COPY_CURSOR_GEOPOSITION, and MID_COPY_CURSOR_POSITION.
Referenced by GUIVehicle::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), and GUILaneSpeedTrigger::getPopUpMenu().
| void GUIGlObject::buildSelectionPopupEntry | ( | GUIGLObjectPopupMenu * | ret, |
| bool | addSeparator = true |
||
| ) | throw () [protected, inherited] |
Builds an entry which allows to (de)select the object.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 144 of file GUIGlObject.cpp.
References GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), GUIGlObject::getType(), gSelected, ICON_FLAG_MINUS, ICON_FLAG_PLUS, GUISelectedStorage::isSelected(), MID_ADDSELECT, and MID_REMOVESELECT.
Referenced by GUIVehicle::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), and GUILaneSpeedTrigger::getPopUpMenu().
| void GUIGlObject::buildShowManipulatorPopupEntry | ( | GUIGLObjectPopupMenu * | ret, |
| bool | addSeparator = true |
||
| ) | throw () [protected, inherited] |
Builds an entry which allows to open the manipulator window.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 178 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.
Referenced by GUILaneSpeedTrigger::getPopUpMenu().
| void GUIGlObject::buildShowParamsPopupEntry | ( | GUIGLObjectPopupMenu * | ret, |
| bool | addSeparator = true |
||
| ) | throw () [protected, inherited] |
Builds an entry which allows to open the parameter window.
| in,filled] | ret The popup menu to add the entry to | |
| [in] | addSeparator | Whether a separator shall be added, too |
Definition at line 157 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWPARS.
Referenced by GUIVehicle::getPopUpMenu(), and GUILaneSpeedTrigger::getPopUpMenu().
| void MSEdge::changeLanes | ( | SUMOTime | t | ) | throw () [virtual, inherited] |
Performs lane changing on this edge.
Definition at line 350 of file MSEdge.cpp.
Referenced by MSEdgeControl::changeLanes().
| void MSEdge::clear | ( | ) | throw () [static, inherited] |
Clears the dictionary.
Definition at line 465 of file MSEdge.cpp.
References MSEdge::myDict.
Referenced by MSNet::clearAll().
| void MSEdge::closeBuilding | ( | ) | [inherited] |
Definition at line 96 of file MSEdge.cpp.
References MSLane::getEdge(), MSEdge::myAllowed, MSEdge::myLanes, MSEdge::myPredeccesors, MSEdge::mySuccessors, and MSEdge::rebuildAllowedLanes().
| SUMOTime MSEdge::decVaporization | ( | SUMOTime | t | ) | throw (ProcessError) [inherited] |
Disables vaporization.
The internal vaporization counter is decreased what disables the vaporization if it was only once enabled. Called from the event handler.
| [in] | t | The current time (unused) |
| ProcessError | not thrown by this method, just derived |
Definition at line 233 of file MSEdge.cpp.
References MSEdge::myVaporizationRequests.
Referenced by NLTriggerBuilder::buildVaporizer().
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary. Otherwise returns false.
Definition at line 425 of file MSEdge.cpp.
Referenced by NLHandler::addConnection(), NLHandler::addDistrict(), NLHandler::addDistrictEdge(), NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime::addEdgeWeight(), NLBuilder::EdgeFloatTimeLineRetriever_EdgeEffort::addEdgeWeight(), NLEdgeControlBuilder::beginEdgeParsing(), NLTriggerBuilder::buildVaporizer(), MSDevice_Routing::buildVehicleDevices(), NLHandler::closeEdge(), TraCIServerAPI_Simulation::convertCartesianToRoadMap(), GUINet::getEdgeBoundary(), NLDetectorBuilder::getEdgeChecking(), TraCIServerAPI_Simulation::getLaneChecking(), MSTriggeredRerouter::myStartElement(), MSRouteHandler::myStartElement(), NLTriggerBuilder::parseAndBuildRerouter(), MSEdge::parseEdgesList(), MSDevice_Routing::preInsertionReroute(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Edge::processGet(), TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_Route::processSet(), TraCIServerAPI_Edge::processSet(), and MSBaseVehicle::reroute().
| MSEdge * MSEdge::dictionary | ( | const std::string & | id | ) | throw () [static, inherited] |
Returns the MSEdge associated to the key id if exists, otherwise returns 0.
Definition at line 441 of file MSEdge.cpp.
| MSEdge * MSEdge::dictionary | ( | size_t | index | ) | throw () [static, inherited] |
Returns the MSEdge at the index.
Definition at line 452 of file MSEdge.cpp.
| size_t MSEdge::dictSize | ( | ) | throw () [static, inherited] |
Returns the number of edges.
Definition at line 459 of file MSEdge.cpp.
References MSEdge::myDict.
Referenced by TraCIServerAPI_Simulation::commandDistanceRequest(), fill(), MSTriggeredRerouter::notifyEnter(), MSDevice_Routing::preInsertionReroute(), TraCIServerAPI_Vehicle::processSet(), and MSDevice_Routing::wrappedRerouteCommandExecute().
| void GUIEdge::drawGL | ( | const GUIVisualizationSettings & | s | ) | const throw () [virtual] |
Draws the object.
| [in] | s | The settings for the current view (may influence drawing) |
Implements GUIGlObject.
Definition at line 206 of file GUIEdge.cpp.
References Position::add(), GLHelper::drawText(), MSEdge::EDGEFUNCTION_CONNECTOR, GUILaneWrapper::getShape(), GLO_MAX, PositionVector::length(), Position::mul(), PositionVector::positionAtLengthPosition(), PositionVector::rotationDegreeAtLengthPosition(), SUMOReal, Position::x(), and Position::y().
| virtual void GUIGlObject::drawGLAdditional | ( | GUISUMOAbstractView *const | parent, |
| const GUIVisualizationSettings & | s | ||
| ) | const throw () [inline, virtual, inherited] |
Draws additional, user-triggered visualisations.
| [in] | parent | The view |
| [in] | s | The settings for the current view (may influence drawing) |
Reimplemented in GUIVehicle.
Definition at line 173 of file GUIGlObject.h.
References UNUSED_PARAMETER.
| void GUIGlObject::drawName | ( | const Position & | pos, |
| const SUMOReal | scale, | ||
| const GUIVisualizationTextSettings & | settings, | ||
| const SUMOReal | angle = 0 |
||
| ) | const [inherited] |
Definition at line 214 of file GUIGlObject.cpp.
References GUIVisualizationTextSettings::color, GLHelper::drawText(), GUIGlObject::getMicrosimID(), GLO_MAX, GUIVisualizationTextSettings::show, and GUIVisualizationTextSettings::size.
Referenced by GUIVehicle::drawGL(), and GUILaneSpeedTrigger::drawGL().
| void GUIEdge::fill | ( | std::vector< GUIEdge * > & | netsWrappers | ) | [static] |
Definition at line 143 of file GUIEdge.cpp.
References MSEdge::dictSize(), MSEdge::EDGEFUNCTION_DISTRICT, and MSEdge::myDict.
Referenced by GUINet::initGUIStructures().
| Boundary GUIEdge::getBoundary | ( | ) | const |
Returns the street's geometry.
Definition at line 129 of file GUIEdge.cpp.
References Boundary::add(), Boundary::grow(), myLaneGeoms, and PositionVector::size().
Referenced by getCenteringBoundary(), and GUINet::getEdgeBoundary().
| Boundary GUIEdge::getCenteringBoundary | ( | ) | const throw () [virtual] |
Returns the boundary to which the view shall be centered in order to show the object.
Implements GUIGlObject.
Definition at line 198 of file GUIEdge.cpp.
References getBoundary(), and Boundary::grow().
| SUMOReal MSEdge::getCurrentTravelTime | ( | ) | const throw () [inherited] |
Computes and returns the current travel time for this edge.
The mean travel time of all lanes is summed and divided by the number of lanes. If the result is zero, 1000000. (a very large number) is returned, otherwise the edge's length divided by this speed.
Definition at line 380 of file MSEdge.cpp.
References MSEdge::myLanes, and SUMOReal.
Referenced by MSVehicleTransfer::addVeh(), MSVehicleTransfer::checkInsertions(), and TraCIServerAPI_Edge::processGet().
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.
| [in] | veh | The vehicle to get the depart lane for |
Definition at line 259 of file MSEdge.cpp.
References DEPART_LANE_ALLOWED_FREE, DEPART_LANE_BEST_FREE, DEPART_LANE_DEFAULT, DEPART_LANE_FREE, DEPART_LANE_GIVEN, DEPART_LANE_RANDOM, RandHelper::getRandomFrom(), and SUMOReal.
| const MSEdge* MSEdge::getFollower | ( | unsigned int | n | ) | const throw () [inline, inherited] |
Returns the n-th of the following edges.
| [in] | n | The index within following edges of the edge to return |
Definition at line 245 of file MSEdge.h.
References MSEdge::mySuccessors.
Referenced by MSRouteHandler::myStartElement().
| MSLane * MSEdge::getFreeLane | ( | const std::vector< MSLane * > * | allowed, |
| const SUMOVehicleClass | vclass | ||
| ) | const throw () [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.
| [in] | allowed | The lanes to choose from |
| [in] | vclass | The vehicle class to look for |
Definition at line 240 of file MSEdge.cpp.
References MSLane::getVehicleNumber().
Referenced by MSVehicleTransfer::checkInsertions().
| const std::string& GUIGlObject::getFullName | ( | ) | const [inline, inherited] |
Returns the full name appearing in the tool tip.
Definition at line 98 of file GUIGlObject.h.
References GUIGlObject::myFullName.
Referenced by GUIGlObject::buildPopupHeader(), GUIGlObject_AbstractAdd::GUIGlObject_AbstractAdd(), GUIGLObjectPopupMenu::onCmdCopyTypedName(), GUIParam_PopupMenuInterface::onCmdOpenTracker(), GUITriggeredRerouter::openManipulator(), GUILaneSpeedTrigger::openManipulator(), GUIDialog_GLChosenEditor::rebuildList(), GUISelectedStorage::save(), and GUISUMOAbstractView::showToolTipFor().
| GUIGlID GUIGlObject::getGlID | ( | ) | const throw () [inline, inherited] |
Returns the numerical id of the object.
Definition at line 106 of file GUIGlObject.h.
References GUIGlObject::myGlID.
Referenced by GUIGlObject::buildSelectionPopupEntry(), GUINet::createTLWrapper(), GUIVehicle::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIVehicle::drawGLAdditional(), GUILaneWrapper::getColorValue(), getIDs(), GUISUMOAbstractView::getObjectAtPosition(), GUIGlObjectStorage::getObjectBlocking(), GUIVehicle::getPopUpMenu(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GUISUMOViewParent::isSelected(), GUIGlChildWindow::isSelected(), GUISelectedStorage::loadIDs(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCenter(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GUIVehicle::GUIVehiclePopupMenu::onCmdStartTrack(), GUISUMOAbstractView::removeAdditionalGLVisualisation(), GUILaneWrapper::ROWdrawAction_drawLinkRules(), and GUIGlObject::~GUIGlObject().
| const std::string& MSEdge::getID | ( | ) | const throw () [inline, inherited] |
Returns the id of the edge.
Definition at line 184 of file MSEdge.h.
References MSEdge::myID.
Referenced by MSVehicleTransfer::checkInsertions(), NLHandler::closeEdge(), NLHandler::getLanesFromIndices(), MSEdge::by_id_sorter::operator()(), TraCIServerAPI_Vehicle::processGet(), and TraCIServerAPI_Lane::processGet().
Definition at line 114 of file GUIEdge.cpp.
References MSEdge::EDGEFUNCTION_INTERNAL, GUIGlObject::getGlID(), MSEdge::getPurpose(), and MSEdge::myDict.
Referenced by GUISUMOViewParent::onCmdLocate().
| const std::vector<MSEdge*>& MSEdge::getIncomingEdges | ( | ) | const throw () [inline, inherited] |
Returns the list of edges from which this edge may be reached.
Definition at line 229 of file MSEdge.h.
References MSEdge::myPredeccesors.
Referenced by MSLane::getLogicalPredecessorLane().
| MSLane & GUIEdge::getLane | ( | size_t | laneNo | ) |
returns the enumerated lane (!!! why not private with a friend?)
Definition at line 91 of file GUIEdge.cpp.
| GUILaneWrapper & GUIEdge::getLaneGeometry | ( | size_t | laneNo | ) | const |
returns the enumerated lane's geometry (!!! why not private with a friend?)
Definition at line 98 of file GUIEdge.cpp.
References myLaneGeoms.
Referenced by GUIVehicle::draw(), GUITriggeredRerouter::drawGL(), GUITriggeredRerouter::GUITriggeredRerouter(), GUISUMOViewParent::isSelected(), and GUI_E2_ZS_CollectorOverLanes::MyWrapper::MyWrapper().
| GUILaneWrapper & GUIEdge::getLaneGeometry | ( | const MSLane * | lane | ) | const |
Definition at line 105 of file GUIEdge.cpp.
References myLaneGeoms.
| 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 throw () [inline, inherited] |
Returns this edge's lanes.
Definition at line 149 of file MSEdge.h.
References MSEdge::myLanes.
Referenced by MSBaseVehicle::calculateArrivalPos(), MSEdgeControl::changeLanes(), MSVehicle::Influencer::checkForLaneChanges(), GUITriggeredRerouter::drawGL(), MS_E2_ZS_CollectorOverLanes::extendTo(), MSVehicle::getBestLanes(), GUILaneWrapper::getEdgeLaneNumber(), MSDevice_Routing::getEffort(), TraCIServerAPI_Simulation::getLaneChecking(), NLHandler::getLanesFromIndices(), MSNet::EdgeWeightsProxi::getTravelTime(), GUITriggeredRerouter::GUITriggeredRerouter(), GUINet::initGUIStructures(), GUISUMOViewParent::isSelected(), MSLCM_DK2004::patchSpeed(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Edge::processGet(), TraCIServerAPI_Vehicle::processSet(), and TraCIServerAPI_Edge::processSet().
| SUMOTime MSEdge::getLastFailedInsertionTime | ( | ) | const throw () [inline, inherited] |
Returns the last time a vehicle could not be inserted.
Definition at line 352 of file MSEdge.h.
References MSEdge::myLastFailedInsertionTime.
| const std::string& GUIGlObject::getMicrosimID | ( | ) | const [inline, inherited] |
Returns the id of the object as known to microsim.
Definition at line 137 of file GUIGlObject.h.
References GUIGlObject::myMicrosimID.
Referenced by GUIGlObject::createFullName(), GUIGlObject::drawName(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), and GUIGLObjectPopupMenu::onCmdCopyName().
| unsigned int MSEdge::getNoFollowing | ( | ) | const throw () [inline, inherited] |
Returns the number of edges that may be reached from this edge.
Definition at line 237 of file MSEdge.h.
References MSEdge::mySuccessors.
Referenced by MSRouteHandler::myStartElement().
| unsigned int MSEdge::getNumericalID | ( | ) | const throw () [inline, inherited] |
Returns the numerical id of the edge.
Definition at line 201 of file MSEdge.h.
References MSEdge::myNumericalID.
Referenced by MSEdgeControl::changeLanes().
| GUIParameterTableWindow * GUIEdge::getParameterWindow | ( | GUIMainWindow & | app, |
| GUISUMOAbstractView & | parent | ||
| ) | throw () [virtual] |
Returns an own parameter window.
| [in] | app | The application needed to build the parameter window |
| [in] | parent | The parent window needed to build the parameter window |
Implements GUIGlObject.
Definition at line 173 of file GUIEdge.cpp.
References GUIParameterTableWindow::closeBuilding(), GUIParameterTableWindow::mkItem(), MSEdge::myLanes, and UNUSED_PARAMETER.
| GUIGLObjectPopupMenu * GUIEdge::getPopUpMenu | ( | GUIMainWindow & | app, |
| GUISUMOAbstractView & | parent | ||
| ) | throw () [virtual] |
Returns an own popup-menu.
| [in] | app | The application needed to build the popup-menu |
| [in] | parent | The parent window needed to build the popup-menu |
Implements GUIGlObject.
Definition at line 156 of file GUIEdge.cpp.
| EdgeBasicFunction MSEdge::getPurpose | ( | ) | const throw () [inline, inherited] |
Returns the edge type (EdgeBasicFunction)
Definition at line 193 of file MSEdge.h.
References MSEdge::myFunction.
Referenced by MSLane::appropriate(), MSVehicle::enterLaneAtMove(), getIDs(), and MSVehicle::vsafeCriticalCont().
| const std::string& MSEdge::getStreetName | ( | ) | const [inline, inherited] |
Returns the street name of the edge.
Definition at line 208 of file MSEdge.h.
References MSEdge::myStreetName.
| GUIGlObjectType GUIGlObject::getType | ( | ) | const [inline, inherited] |
Returns the type of the object as coded in GUIGlObjectType.
Definition at line 150 of file GUIGlObject.h.
References GUIGlObject::myGLObjectType.
Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIVehicle::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIVehicle::drawGLAdditional(), GUILaneWrapper::getColorValue(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOViewParent::isSelected(), GUIGlChildWindow::isSelected(), GUISelectedStorage::loadIDs(), and GUISelectedStorage::toggleSelection().
| SUMOTime MSEdge::incVaporization | ( | SUMOTime | t | ) | throw (ProcessError) [inherited] |
Enables vaporization.
The internal vaporization counter is increased enabling the vaporization. Called from the event handler.
| [in] | t | The current time (unused) |
| ProcessError | not thrown by this method, just derived |
Definition at line 226 of file MSEdge.cpp.
References MSEdge::myVaporizationRequests.
Referenced by NLTriggerBuilder::buildVaporizer().
| void GUIEdge::initGeometry | ( | ) | throw () |
Builds lane wrappers for this edge's lanes.
Definition at line 77 of file GUIEdge.cpp.
References myLaneGeoms, and MSEdge::myLanes.
| void MSEdge::initialize | ( | std::vector< MSLane * > * | lanes, |
| EdgeBasicFunction | function | ||
| ) | throw () [inherited] |
Initialize the edge.
| [in] | allowed | Information which edges may be reached from which lanes |
| [in] | lanes | List of this edge's lanes |
| [in] | function | A basic type of the edge |
Definition at line 85 of file MSEdge.cpp.
References OptionsCont::getOptions().
Referenced by NLHandler::addDistrict(), and NLEdgeControlBuilder::closeEdge().
| void MSEdge::insertIDs | ( | std::vector< std::string > & | into | ) | throw () [static, inherited] |
Inserts IDs of all known edges into the given vector.
Definition at line 474 of file MSEdge.cpp.
Referenced by TraCIServerAPI_Edge::processGet().
| bool MSEdge::insertVehicle | ( | SUMOVehicle & | v, |
| SUMOTime | time | ||
| ) | const throw (ProcessError) [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.
| [in] | v | The vehicle to insert |
| [in] | time | The current simulation time |
Definition at line 306 of file MSEdge.cpp.
References DEPART_POS_FREE, DEPART_POS_GIVEN, DEPART_POS_RANDOM, DEPART_POS_RANDOM_FREE, SUMOVehicleParameter::departPos, SUMOVehicleParameter::departPosProcedure, MSLane::insertVehicle(), RandHelper::rand(), and SUMOReal.
| bool MSEdge::isVaporizing | ( | ) | const throw () [inline, inherited] |
Returns whether vehicles on this edge shall be vaporized.
Definition at line 258 of file MSEdge.h.
References MSEdge::myVaporizationRequests.
Referenced by MSVehicle::moveChecked(), and MSLane::setCritical().
Returns the lane left to the one given, 0 if the given lane is leftmost.
| [in] | lane | The lane right to the one to be returned |
Definition at line 169 of file MSEdge.cpp.
Referenced by MSLane::getLeftLane().
| void MSEdge::parseEdgesList | ( | const std::vector< std::string > & | desc, |
| std::vector< const MSEdge * > & | into, | ||
| const std::string & | rid | ||
| ) | throw (ProcessError) [static, inherited] |
Parses the given string vector assuming it edge ids.
| [in] | desc | The string vector containing edge ids |
| [out] | into | The vector to fill |
| [in] | rid | The id of the route these description belongs to; used for error message generation |
| ProcessError | If one of the strings contained is not a known edge id |
Definition at line 490 of file MSEdge.cpp.
References MSEdge::dictionary().
| void MSEdge::parseEdgesList | ( | const std::string & | desc, |
| std::vector< const MSEdge * > & | into, | ||
| const std::string & | rid | ||
| ) | throw (ProcessError) [static, inherited] |
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.
| [in] | desc | The string containing space-separated edge ids |
| [out] | into | The vector to fill |
| [in] | rid | The id of the route these description belongs to; used for error message generation |
| ProcessError | If one of the strings contained is not a known edge id |
Definition at line 482 of file MSEdge.cpp.
References StringTokenizer::getVector().
Referenced by MSRouteHandler::myStartElement(), MSRouteHandler::openRoute(), and TraCIServerAPI_Vehicle::processSet().
| bool MSEdge::prohibits | ( | const SUMOVehicle *const | vehicle | ) | const throw () [inherited] |
Returns whether the vehicle (class) is not allowed on the edge.
Definition at line 410 of file MSEdge.cpp.
| void MSEdge::rebuildAllowedLanes | ( | ) | throw () [inherited] |
Definition at line 126 of file MSEdge.cpp.
References MSEdge::myAllowed, MSEdge::myClassedAllowed, MSEdge::myHaveClassConstraints, and MSEdge::myLanes.
Referenced by MSEdge::closeBuilding(), TraCIServerAPI_Lane::processSet(), and TraCIServerAPI_Edge::processSet().
| void GUIGlObject::removeParameterTable | ( | GUIParameterTableWindow * | w | ) | throw () [inherited] |
Lets this object know a parameter window showing the object's values was closed.
| [in] | w | The closed parameter window |
Definition at line 193 of file GUIGlObject.cpp.
References GUIGlObject::myParamWindows.
Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().
Returns the lane right to the one given, 0 if the given lane is rightmost.
| [in] | lane | The lane left to the one to be returned |
Definition at line 179 of file MSEdge.cpp.
Referenced by MSLane::getRightLane().
| void MSEdge::setLastFailedInsertionTime | ( | SUMOTime | time | ) | const throw () [inline, inherited] |
Sets the last time a vehicle could not be inserted.
| [in] | time | the new value |
Definition at line 360 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 | ) | [protected, inherited] |
Definition at line 202 of file GUIGlObject.cpp.
References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myPrefix.
AllowedLanesCont MSEdge::myAllowed [protected, inherited] |
Associative container from destination-edge to allowed-lanes.
Definition at line 492 of file MSEdge.h.
Referenced by MSEdge::closeBuilding(), MSEdge::rebuildAllowedLanes(), and MSEdge::~MSEdge().
ClassedAllowedLanesCont MSEdge::myClassedAllowed [protected, inherited] |
From vehicle class to lanes allowed to be used by it.
Definition at line 495 of file MSEdge.h.
Referenced by MSEdge::rebuildAllowedLanes(), and MSEdge::~MSEdge().
MSEdge::DictType MSEdge::myDict [static, protected, inherited] |
Static dictionary to associate string-ids with objects.
Definition at line 514 of file MSEdge.h.
Referenced by MSEdge::clear(), MSEdge::dictSize(), fill(), and getIDs().
std::vector< MSEdge * > MSEdge::myEdges [static, protected, inherited] |
Static list of edges.
EdgeBasicFunction MSEdge::myFunction [protected, inherited] |
the purpose of the edge
Definition at line 472 of file MSEdge.h.
Referenced by MSEdge::getPurpose().
bool MSEdge::myHaveClassConstraints [protected, inherited] |
Whether any class constraints exist for this edge.
Definition at line 498 of file MSEdge.h.
Referenced by MSEdge::rebuildAllowedLanes().
std::string MSEdge::myID [protected, inherited] |
MSLaneChanger* MSEdge::myLaneChanger [protected, inherited] |
This member will do the lane-change.
Definition at line 469 of file MSEdge.h.
Referenced by MSEdge::~MSEdge().
LaneWrapperVector GUIEdge::myLaneGeoms [private] |
List of the edge's lanes geometrical information.
Definition at line 156 of file GUIEdge.h.
Referenced by getBoundary(), getLaneGeometry(), initGeometry(), and ~GUIEdge().
std::vector<MSLane*>* MSEdge::myLanes [protected, inherited] |
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 466 of file MSEdge.h.
Referenced by MSEdge::closeBuilding(), MSEdge::getCurrentTravelTime(), MSEdge::getLanes(), getParameterWindow(), initGeometry(), MSEdge::rebuildAllowedLanes(), and MSEdge::~MSEdge().
SUMOTime MSEdge::myLastFailedInsertionTime [mutable, protected, inherited] |
The time of last insertion failure.
Definition at line 478 of file MSEdge.h.
Referenced by MSEdge::getLastFailedInsertionTime(), and MSEdge::setLastFailedInsertionTime().
unsigned int MSEdge::myNumericalID [protected, inherited] |
This edge's numerical id.
Definition at line 463 of file MSEdge.h.
Referenced by MSEdge::getNumericalID().
std::vector<MSEdge*> MSEdge::myPredeccesors [protected, inherited] |
The preceeding edges.
Definition at line 484 of file MSEdge.h.
Referenced by MSEdge::closeBuilding(), and MSEdge::getIncomingEdges().
std::string MSEdge::myStreetName [protected, inherited] |
Definition at line 500 of file MSEdge.h.
Referenced by MSEdge::getStreetName().
std::vector<MSEdge*> MSEdge::mySuccessors [protected, inherited] |
The succeeding edges.
Definition at line 481 of file MSEdge.h.
Referenced by MSEdge::addFollower(), MSEdge::closeBuilding(), MSEdge::getFollower(), and MSEdge::getNoFollowing().
int MSEdge::myVaporizationRequests [protected, inherited] |
Vaporizer counter.
Definition at line 475 of file MSEdge.h.
Referenced by MSEdge::decVaporization(), MSEdge::incVaporization(), and MSEdge::isVaporizing().
StringBijection< GUIGlObjectType > GUIGlObject::TypeNames [static, inherited] |
associates object types with strings
Definition at line 90 of file GUIGlObject.h.