SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUINet Class Reference

A MSNet extended by some values for usage within the gui. More...

#include <GUINet.h>

Inheritance diagram for GUINet:
MSNet GUIGlObject

Public Types

typedef
PedestrianRouterDijkstra
< MSEdge, MSLane, MSJunction
MSPedestrianRouterDijkstra
enum  SimulationState {
  SIMSTATE_RUNNING, SIMSTATE_END_STEP_REACHED, SIMSTATE_NO_FURTHER_VEHICLES, SIMSTATE_CONNECTION_CLOSED,
  SIMSTATE_ERROR_IN_SIM, SIMSTATE_TOO_MANY_VEHICLES
}
 Possible states of a simulation - running or stopped with different reasons. More...

Public Member Functions

void closeBuilding (MSEdgeControl *edges, MSJunctionControl *junctions, SUMORouteLoaderControl *routeLoaders, MSTLLogicControl *tlc, std::vector< SUMOTime > stateDumpTimes, std::vector< std::string > stateDumpFiles)
 Closes the network's building process.
void closeSimulation (SUMOTime start)
 Closes the simulation (all files, connections, etc.)
virtual void drawGLAdditional (GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
 Draws additional, user-triggered visualisations.
void drawName (const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
const BoundarygetBoundary () const
 returns the bounder of the network
SUMOTime getCurrentTimeStep () const
 Returns the current simulation step.
GUIVehicleControlgetGUIVehicleControl ()
 Returns the vehicle control.
Position getJunctionPosition (const std::string &name) const
 returns the position of a junction
const NamedRTreegetLanesRTree () const
 Returns an RTree that contains lane IDs.
MSPedestrianRouterDijkstragetPedestrianRouter (const std::vector< MSEdge * > &prohibited=std::vector< MSEdge * >()) const
SUMOAbstractRouter< MSEdge,
SUMOVehicle > & 
getRouterEffort (const std::vector< MSEdge * > &prohibited=std::vector< MSEdge * >()) const
SUMOAbstractRouter< MSEdge,
SUMOVehicle > & 
getRouterTT (const std::vector< MSEdge * > &prohibited=std::vector< MSEdge * >()) const
SUMORTreegetVisualisationSpeedUp ()
 Returns the RTree used for visualisation speed-up.
const SUMORTreegetVisualisationSpeedUp () const
 Returns the RTree used for visualisation speed-up.
 GUINet (MSVehicleControl *vc, MSEventControl *beginOfTimestepEvents, MSEventControl *endOfTimestepEvents, MSEventControl *insertionEvents)
 Constructor.
void guiSimulationStep ()
 Some further steps needed for gui processing.
void initGUIStructures ()
 Initialises gui wrappers.
void loadRoutes ()
 loads routes for the next few steps
void lock ()
 grant exclusive access to the simulation state
bool logSimulationDuration () const
 Returns whether duration shall be logged.
void setCurrentTimeStep (const SUMOTime step)
 Sets the current simulation step (used by state loading)
int simulate (SUMOTime start, SUMOTime stop)
 Simulates from timestep start to stop.
SimulationState simulationState (SUMOTime stopTime) const
 Called after a simulation step, this method returns the current simulation state.
void simulationStep ()
 Performs a single simulation step (locking the simulation)
void unlock ()
 release exclusive access to the simulation state
bool vehicleExists (const std::string &name) const
 returns the information whether the vehicle still exists
void writeOutput ()
 Write netstate, summary and detector output.
 ~GUINet ()
 Destructor.
inherited from GUIGlObject
GUIGLObjectPopupMenugetPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own popup-menu.
GUIParameterTableWindowgetParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own parameter window.
Boundary getCenteringBoundary () const
 Returns the boundary to which the view shall be centered in order to show the object.
void drawGL (const GUIVisualizationSettings &s) const
 Draws the object.
functions for performance measurements
unsigned int getWholeDuration () const
 Returns the duration of the last step (sim+visualisation+idle) (in ms)
unsigned int getSimDuration () const
 Returns the duration of the last step's simulation part (in ms)
SUMOReal getRTFactor () const
 Returns the simulation speed as a factor to real time.
SUMOReal getUPS () const
 Returns the update per seconds rate.
SUMOReal getMeanRTFactor (int duration) const
 Returns the simulation speed as a factor to real time.
SUMOReal getMeanUPS () const
 Returns the update per seconds rate.
unsigned int getIdleDuration () const
 Returns the duration of the last step's idle part (in ms)
void setSimDuration (int val)
 Sets the duration of the last step's simulation part.
void setIdleDuration (int val)
 Sets the duration of the last step's idle part.
MSPersonControlgetPersonControl ()
 Returns the person control.
unsigned int getLinkTLID (MSLink *link) const
int getLinkTLIndex (MSLink *link) const
locator-methods
std::vector< GUIGlIDgetJunctionIDs (bool includeInternal) const
std::vector< GUIGlIDgetTLSIDs () const
 Returns the gl-ids of all traffic light logics within the net.
Output during the simulation
void preSimStepOutput () const
 Prints the current step number.
void postSimStepOutput () const
 Prints the statistics of the step at its end.
Retrieval of references to substructures
MSVehicleControlgetVehicleControl ()
 Returns the vehicle control.
MSEdgeControlgetEdgeControl ()
 Returns the edge control.
MSInsertionControlgetInsertionControl ()
 Returns the insertion control.
MSDetectorControlgetDetectorControl ()
 Returns the detector control.
MSTLLogicControlgetTLSControl ()
 Returns the tls logics control.
MSJunctionControlgetJunctionControl ()
 Returns the junctions control.
MSEventControlgetBeginOfTimestepEvents ()
 Returns the event control for events executed at the begin of a time step.
MSEventControlgetEndOfTimestepEvents ()
 Returns the event control for events executed at the end of a time step.
MSEventControlgetInsertionEvents ()
 Returns the event control for insertion events.
ShapeContainergetShapeContainer ()
 Returns the shapes container.
MSEdgeWeightsStoragegetWeightsStorage ()
 Returns the net's internal edge travel times/efforts container.
Insertion and retrieval of bus stops
bool addBusStop (MSBusStop *busStop)
 Adds a bus stop.
MSBusStopgetBusStop (const std::string &id) const
 Returns the named bus stop.
std::string getBusStopID (const MSLane *lane, const SUMOReal pos) const
 Returns the bus stop close to the given position.
Atomar getter methods
const std::string & getFullName () const
 Returns the full name appearing in the tool tip.
GUIGlID getGlID () const
 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)
 Lets this object know a parameter window showing the object's values was opened.
void removeParameterTable (GUIParameterTableWindow *w)
 Lets this object know a parameter window showing the object's values was closed.

Static Public Member Functions

static void clearAll ()
 Clears all dictionaries.
static SUMOReal getEffort (const MSEdge *const e, const SUMOVehicle *const v, SUMOReal t)
 Returns the effort to pass an edge.
static GUINetgetGUIInstance ()
 Returns the pointer to the unique instance of GUINet (singleton).
static MSNetgetInstance ()
 Returns the pointer to the unique instance of MSNet (singleton).
static std::string getStateMessage (SimulationState state)
 Returns the message to show if a certain state occurs.
static SUMOReal getTravelTime (const MSEdge *const e, const SUMOVehicle *const v, SUMOReal t)
 Returns the travel time to pass an edge.

Static Public Attributes

static StringBijection
< GUIGlObjectType
TypeNames
 associates object types with strings

Protected Types

typedef std::map< MSLink
*, std::string > 
Links2LogicMap
 Definition of a link-to-logic-id map.
typedef std::map
< MSTrafficLightLogic
*, GUITrafficLightLogicWrapper * > 
Logics2WrapperMap
 Definition of a traffic light-to-wrapper map.

Protected Member Functions

void setPrefix (const std::string &prefix)
helper methods for building popup-menus
void buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
 Builds the header.
void buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to center to the object.
void buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds entries which allow to copy the name / typed name into the clipboard.
void buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to (de)select the object.
void buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the parameter window.
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.
void buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the manipulator window.

Protected Attributes

Boundary myBoundary
 The networks boundary.
NamedObjectCont< MSBusStop * > myBusStopDict
 Dictionary of bus stops.
std::vector< GUIDetectorWrapper * > myDetectorDict
 A detector dictionary.
std::vector< GUIEdge * > myEdgeWrapper
 Wrapped MS-edges.
LayeredRTree myGrid
 The visualization speed-up.
std::vector< GUIJunctionWrapper * > myJunctionWrapper
 Wrapped MS-junctions.
std::pair< bool, NamedRTreemyLanesRTree
 An RTree structure holding lane IDs.
unsigned int myLastIdleDuration
unsigned int myLastSimDuration
 The step durations (simulation, /*visualisation, */idle)
long myLastVehicleMovementCount
Links2LogicMap myLinks2Logic
 The link-to-logic-id map.
Logics2WrapperMap myLogics2Wrapper
 The traffic light-to-wrapper map.
long myOverallSimDuration
long myOverallVehicleCount
MSPedestrianRouterDijkstramyPedestrianRouter
SUMORouteLoaderControlmyRouteLoaders
 Route loader for dynamic loading of routes.
DijkstraRouterEffort_ByProxi
< MSEdge, SUMOVehicle,
prohibited_withRestrictions
< MSEdge, SUMOVehicle > > * 
myRouterEffort
AStarRouterTT_ByProxi< MSEdge,
SUMOVehicle,
prohibited_withRestrictions
< MSEdge, SUMOVehicle > > * 
myRouterTTAStar
DijkstraRouterTT_ByProxi
< MSEdge, SUMOVehicle,
prohibited_withRestrictions
< MSEdge, SUMOVehicle > > * 
myRouterTTDijkstra
bool myRouterTTInitialized
SUMOTime myStep
 Current time step.
std::vector
< MSTrafficLightLogic * > 
myTLLogicWrappers
 Wrapped TL-Logics.
int myTooManyVehicles
 Storage for maximum vehicle number.
std::vector
< VehicleStateListener * > 
myVehicleStateListeners
 Container for vehicle state listener.
Substructures
MSVehicleControlmyVehicleControl
 Controls vehicle building and deletion;.
MSPersonControlmyPersonControl
 Controls person building and deletion;.
MSEdgeControlmyEdges
 Controls edges, performs vehicle movement;.
MSJunctionControlmyJunctions
 Controls junctions, realizes right-of-way rules;.
MSTLLogicControlmyLogics
 Controls tls logics, realizes waiting on tls rules;.
MSInsertionControlmyInserter
 Controls vehicle insertion;.
MSDetectorControlmyDetectorControl
 Controls detectors;.
MSEventControlmyBeginOfTimestepEvents
 Controls events executed at the begin of a time step;.
MSEventControlmyEndOfTimestepEvents
 Controls events executed at the end of a time step;.
MSEventControlmyInsertionEvents
 Controls insertion events;.
ShapeContainermyShapeContainer
 A container for geometrical shapes;.
MSEdgeWeightsStoragemyEdgeWeights
 The net's knowledge about edge efforts/travel times;.
data needed for computing performance values
bool myLogExecutionTime
 Information whether the simulation duration shall be logged.
bool myLogStepNumber
 Information whether the number of the simulation step shall be logged.
long mySimStepBegin
 The last simulation step begin, end and duration.
long mySimStepEnd
long mySimStepDuration
long mySimBeginMillis
 The overall simulation duration.
SUMOLong myVehiclesMoved
 The overall number of vehicle movements.
State output variables
std::vector< SUMOTimemyStateDumpTimes
 Times at which a state shall be written.
std::vector< std::string > myStateDumpFiles
 The names for the state files.

Static Protected Attributes

static MSNetmyInstance = 0
 Unique instance of MSNet.
static const std::string STAGE_EVENTS
 string constants for simstep stages
static const std::string STAGE_INSERTIONS
static const std::string STAGE_LANECHANGE
static const std::string STAGE_MOVEMENTS

Private Member Functions

GUIGlID createTLWrapper (MSTrafficLightLogic *tll)
 creates a wrapper for the given logic and returns the GlID
void initTLMap ()
 Initialises the tl-logic map and wrappers.

Private Attributes

MFXMutex myLock
 The mutex used to avoid concurrent updates of the vehicle buffer.

Friends

class GUIOSGBuilder
class GUITrafficLightLogicWrapper

Notification about vehicle state changes

void addVehicleStateListener (VehicleStateListener *listener)
 Adds a vehicle states listener.
void removeVehicleStateListener (VehicleStateListener *listener)
 Removes a vehicle states listener.
void informVehicleStateListener (const SUMOVehicle *const vehicle, VehicleState to)
 Informs all added listeners about a vehicle's state change.
enum  VehicleState {
  VEHICLE_STATE_BUILT, VEHICLE_STATE_DEPARTED, VEHICLE_STATE_STARTING_TELEPORT, VEHICLE_STATE_ENDING_TELEPORT,
  VEHICLE_STATE_ARRIVED, VEHICLE_STATE_NEWROUTE, VEHICLE_STATE_STARTING_PARKING, VEHICLE_STATE_ENDING_PARKING,
  VEHICLE_STATE_STARTING_STOP, VEHICLE_STATE_ENDING_STOP
}
 Definition of a vehicle state. More...

Detailed Description

A MSNet extended by some values for usage within the gui.

This gui version of the network allows the retrieval of some more information than the normal network version does. Due to this, not only these retrieval, but also some further initialisation methods must have been implemented. Nonethenless, this class has almost the same functions as the MSNet-class.

Some microsimulation items are wrapped in certain classes to allow their drawing and their enumerated access. This enumeration is realised by inserting the wrapped items into vectors and is needed to fasten the network's drawing as only visible items are being drawn.

Definition at line 90 of file GUINet.h.

Member Typedef Documentation

typedef std::map<MSLink*, std::string> GUINet::Links2LogicMap
protected

Definition of a link-to-logic-id map.

Definition at line 327 of file GUINet.h.

Definition of a traffic light-to-wrapper map.

Definition at line 333 of file GUINet.h.

Member Enumeration Documentation

enum MSNet::SimulationState
inherited

Possible states of a simulation - running or stopped with different reasons.

Enumerator:
SIMSTATE_RUNNING 

The simulation is running.

SIMSTATE_END_STEP_REACHED 

The final simulation step has been performed.

SIMSTATE_NO_FURTHER_VEHICLES 

The simulation does not contain further vehicles.

SIMSTATE_CONNECTION_CLOSED 

The connection to a client was closed by the client.

SIMSTATE_ERROR_IN_SIM 

An error occured during the simulation step.

SIMSTATE_TOO_MANY_VEHICLES 

The simulation contains too many vehicles (.

Deprecated:
)

Definition at line 96 of file MSNet.h.

enum MSNet::VehicleState
inherited

Definition of a vehicle state.

Enumerator:
VEHICLE_STATE_BUILT 

The vehicle was built, but has not yet departed.

VEHICLE_STATE_DEPARTED 

The vehicle has departed (was inserted into the network)

VEHICLE_STATE_STARTING_TELEPORT 

The vehicle started to teleport.

VEHICLE_STATE_ENDING_TELEPORT 

The vehicle ended being teleported.

VEHICLE_STATE_ARRIVED 

The vehicle arrived at his destination (is deleted)

VEHICLE_STATE_NEWROUTE 

The vehicle got a new route.

VEHICLE_STATE_STARTING_PARKING 

The vehicles starts to park.

VEHICLE_STATE_ENDING_PARKING 

The vehicle ends to park.

VEHICLE_STATE_STARTING_STOP 

The vehicles starts to stop.

VEHICLE_STATE_ENDING_STOP 

The vehicle ends to stop.

Definition at line 423 of file MSNet.h.

Constructor & Destructor Documentation

GUINet::GUINet ( MSVehicleControl vc,
MSEventControl beginOfTimestepEvents,
MSEventControl endOfTimestepEvents,
MSEventControl insertionEvents 
)

Constructor.

Parameters
[in]vcThe vehicle control to use
[in]beginOfTimestepEventsThe event control to use for simulation step begin events
[in]endOfTimestepEventsThe event control to use for simulation step end events
[in]insertionEventsThe event control to use for insertion events
Exceptions
ProcessErrorIf a network was already constructed

Definition at line 87 of file GUINet.cpp.

References GUIGlObjectStorage::gIDStorage, and GUIGlObjectStorage::setNetObject().

Member Function Documentation

bool MSNet::addBusStop ( MSBusStop busStop)
inherited

Adds a bus stop.

If another bus stop with the same id exists, false is returned. Otherwise, the bus stop is added to the internal bus stop container "myBusStopDict".

This control gets responsible for deletion of the added bus stop.

Parameters
[in]busStopThe bus stop to add
Returns
Whether the bus stop could be added

Definition at line 703 of file MSNet.cpp.

References NamedObjectCont< T >::add(), Named::getID(), and MSNet::myBusStopDict.

Referenced by GUITriggerBuilder::buildBusStop(), and NLTriggerBuilder::buildBusStop().

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 MSNet::addVehicleStateListener ( VehicleStateListener listener)
inherited

Adds a vehicle states listener.

Parameters
[in]listenerThe listener to add

Definition at line 676 of file MSNet.cpp.

References MSNet::myVehicleStateListeners.

Referenced by MSDevice_Vehroutes::init().

void GUIGlObject::buildCenterPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited
void GUIGlObject::buildNameCopyPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited
void GUIGlObject::buildPositionCopyEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 166 of file GUIGlObject.cpp.

References GeoConvHelper::getFinal(), MID_COPY_CURSOR_GEOPOSITION, and MID_COPY_CURSOR_POSITION.

Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIEdge::getPopUpMenu(), getPopUpMenu(), and GUILane::getPopUpMenu().

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

Builds an entry which allows to open the manipulator window.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether 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(), and GUITriggeredRerouter::getPopUpMenu().

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

Builds an entry which allows to open the parameter window.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether 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 GUIDetectorWrapper::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIVehicle::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIEdge::getPopUpMenu(), getPopUpMenu(), and GUILane::getPopUpMenu().

void MSNet::clearAll ( )
staticinherited

Clears all dictionaries.

Todo:
Try to move all this to the destructor

Definition at line 513 of file MSNet.cpp.

References MSTrigger::cleanup(), MSPModel::cleanup(), MSCalibrator::cleanup(), MSDevice_Routing::cleanup(), MSRoute::clear(), MSLane::clear(), MSEdge::clear(), and MSNet::getInstance().

Referenced by GUILoadThread::run(), and MSNet::~MSNet().

void MSNet::closeBuilding ( MSEdgeControl edges,
MSJunctionControl junctions,
SUMORouteLoaderControl routeLoaders,
MSTLLogicControl tlc,
std::vector< SUMOTime stateDumpTimes,
std::vector< std::string >  stateDumpFiles 
)
inherited

Closes the network's building process.

Assigns the structures built while loading to this network.

Parameters
[in]edgesThe control of edges which belong to this network
[in]junctionsThe control of junctions which belong to this network
[in]routeLoadersThe route loaders used
[in]tlcThe control of traffic lights which belong to this network
[in]stateDumpTimesList of time steps at which state shall be written
[in]stateDumpFilesFilenames for states
Todo:
Try to move all this to the constructor?

Definition at line 212 of file MSNet.cpp.

References SysUtils::getCurrentMillis(), MSNet::myEdges, MSNet::myJunctions, MSNet::myLogExecutionTime, MSNet::myLogics, MSNet::myRouteLoaders, MSNet::mySimBeginMillis, MSNet::myStateDumpFiles, MSNet::myStateDumpTimes, and MSJunctionControl::postloadInitContainer().

Referenced by NLBuilder::buildNet().

GUIGlID GUINet::createTLWrapper ( MSTrafficLightLogic tll)
private
void GUINet::drawGL ( const GUIVisualizationSettings s) const
virtual

Draws the object.

Parameters
[in]sThe settings for the current view (may influence drawing)
See Also
GUIGlObject::drawGL

Implements GUIGlObject.

Definition at line 464 of file GUINet.cpp.

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.

MSEventControl& MSNet::getBeginOfTimestepEvents ( )
inlineinherited

Returns the event control for events executed at the begin of a time step.

Returns
The control reponsible for events that are executed at the begin of a time step
See Also
MSEventControl
myBeginOfTimestepEvents

Definition at line 340 of file MSNet.h.

References MSNet::myBeginOfTimestepEvents.

Referenced by MSPModel_NonInteracting::add(), NLTriggerBuilder::buildVaporizer(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSTLLogicControl::closeWAUT(), MSLaneSpeedTrigger::init(), MSPModel_Striping::MSPModel_Striping(), MSTrafficLightLogic::MSTrafficLightLogic(), and MSDevice_Routing::notifyEnter().

const Boundary & GUINet::getBoundary ( ) const

returns the bounder of the network

Definition at line 120 of file GUINet.cpp.

References myBoundary.

Referenced by getCenteringBoundary().

MSBusStop * MSNet::getBusStop ( const std::string &  id) const
inherited

Returns the named bus stop.

Parameters
[in]idThe id of the bus stop to return.
Returns
The named bus stop, or 0 if no such stop exists

Definition at line 709 of file MSNet.cpp.

References NamedObjectCont< T >::get(), and MSNet::myBusStopDict.

Referenced by MSRouteHandler::addStop(), MSVehicle::addStop(), MSRouteHandler::myStartElement(), and TraCIServerAPI_Simulation::processGet().

std::string MSNet::getBusStopID ( const MSLane lane,
const SUMOReal  pos 
) const
inherited

Returns the bus stop close to the given position.

Parameters
[in]lanethe lane of the bus stop to return.
[in]posthe position of the bus stop to return.
Returns
The bus stop id on the location, or "" if no such stop exists

Definition at line 715 of file MSNet.cpp.

References MSBusStop::getEndLanePosition(), Named::getID(), MSBusStop::getLane(), NamedObjectCont< T >::getMyMap(), MSNet::myBusStopDict, and POSITION_EPS.

Referenced by MSVehicle::addTraciStop().

Boundary GUINet::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 468 of file GUINet.cpp.

References getBoundary().

SUMOTime MSNet::getCurrentTimeStep ( ) const
inlineinherited

Returns the current simulation step.

Returns
the current simulation step

Definition at line 216 of file MSNet.h.

References MSNet::myStep.

Referenced by MSLCM_JE2013::_wantsChange(), MSLCM_LC2013::_wantsChange(), MSDevice_Vehroutes::addRoute(), MSTLLogicControl::addWAUTJunction(), NLDetectorBuilder::buildE2Detector(), MSVehicle::checkRewindLinkLanes(), NLJunctionControlBuilder::closeTrafficLightLogic(), MSTLLogicControl::closeWAUT(), MSInductLoop::collectVehiclesOnDet(), TraCIServerAPI_Simulation::commandDistanceRequest(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), Command_SaveTLCoupledLaneDet::execute(), Command_SaveTLCoupledDet::execute(), MSActuatedTrafficLightLogic::gapControl(), MSPerson::getAngle(), MSInductLoop::getCurrentOccupancy(), GUIApplicationWindow::getCurrentSimTime(), MSLaneSpeedTrigger::getCurrentSpeed(), GUIViewTraffic::getCurrentTimeStep(), MSEventControl::getCurrentTimeStep(), MSPerson::getEdgePos(), MSLane::getLeaderOnConsecutive(), MSPerson::getPosition(), MSPerson::getWaitingSeconds(), GUIApplicationWindow::handleEvent_SimulationStep(), MSLaneSpeedTrigger::init(), TraCIServer::initialiseSubscription(), MSTLLogicControl::initWautSwitch(), MSLane::isInsertionSuccess(), GUIRunThread::makeStep(), MSPModel_Striping::MSPModel_Striping(), MSDevice_Vehroutes::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Vehroutes::notifyLeave(), MSDevice_Person::notifyMove(), GUIApplicationWindow::onCmdTimeToggle(), MSBaseVehicle::onDepart(), TraCIServerAPI_Lane::processGet(), MSVehicle::processNextStop(), TraCIServerAPI_TLS::processSet(), TraCIServerAPI_Vehicle::processSet(), MSTrafficLightLogic::resetLinkStates(), GUIRunThread::run(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSNet::simulate(), MSSimpleTrafficLightLogic::trySwitch(), and MSActuatedTrafficLightLogic::trySwitch().

SUMOReal MSNet::getEffort ( const MSEdge *const  e,
const SUMOVehicle *const  v,
SUMOReal  t 
)
staticinherited

Returns the effort to pass an edge.

Parameters
[in]eThe edge for which the effort to be passed shall be returned
[in]vThe vehicle that is rerouted
[in]tThe time for which the effort shall be returned [s]
Returns
The effort (abstract) for an edge
See Also
DijkstraRouterTT_ByProxi

Definition at line 127 of file MSNet.cpp.

References MSNet::getInstance(), MSVehicle::getWeightsStorage(), MSNet::getWeightsStorage(), MSEdgeWeightsStorage::retrieveExistingEffort(), and SUMOReal.

Referenced by MSNet::getRouterEffort().

MSEventControl& MSNet::getEndOfTimestepEvents ( )
inlineinherited
GUINet * GUINet::getGUIInstance ( )
static

Returns the pointer to the unique instance of GUINet (singleton).

Returns
Pointer to the unique GUINet-instance
Exceptions
ProcessErrorIf a network was not yet constructed

Definition at line 474 of file GUINet.cpp.

References MSNet::getInstance().

Referenced by GUIViewTraffic::doPaintGL(), GUIEdge::drawGL(), and GUITrafficLightLogicWrapper::switchTLSLogic().

GUIVehicleControl * GUINet::getGUIVehicleControl ( )

Returns the vehicle control.

Returns
The vehicle control
See Also
MSVehicleControl
myVehicleControl

Definition at line 484 of file GUINet.cpp.

References MSNet::myVehicleControl.

unsigned int GUINet::getIdleDuration ( ) const

Returns the duration of the last step's idle part (in ms)

Definition at line 377 of file GUINet.cpp.

References myLastIdleDuration.

Referenced by getParameterWindow().

MSEventControl& MSNet::getInsertionEvents ( )
inlineinherited

Returns the event control for insertion events.

Returns
The control reponsible for insertion events
See Also
MSEventControl
myInsertionEvents

Definition at line 360 of file MSNet.h.

References MSNet::myInsertionEvents.

Referenced by MSDevice_Routing::MSDevice_Routing().

MSNet * MSNet::getInstance ( void  )
staticinherited

Returns the pointer to the unique instance of MSNet (singleton).

Returns
Pointer to the unique MSNet-instance
Exceptions
ProcessErrorIf a network was not yet constructed

Definition at line 159 of file MSNet.cpp.

References MSNet::myInstance.

Referenced by MSLCM_JE2013::_patchSpeed(), MSLCM_JE2013::_wantsChange(), MSLCM_LC2013::_wantsChange(), MSDevice_Routing::adaptEdgeEfforts(), MSInsertionControl::add(), MSTrafficLightLogic::addLink(), MSTLLogicControl::TLSLogicVariants::addLogic(), MSDevice_BTreceiver::BTreceiverUpdate::addRecognitionPoint(), MSDevice_Vehroutes::addRoute(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSVehicle::addTraciStop(), MSTLLogicControl::addWAUTJunction(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSDevice_BTreceiver::BTreceiverUpdate::BTreceiverUpdate(), NLTriggerBuilder::buildVaporizer(), GUIVehicleControl::buildVehicle(), MSVehicleControl::buildVehicle(), MSDevice_Routing::buildVehicleDevices(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSLane::checkFailure(), MSInsertionControl::checkFlows(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkRewindLinkLanes(), MSNet::clearAll(), MSRouteHandler::closeFlow(), MSRouteHandler::closePerson(), MSRouteHandler::closeRoute(), MSRouteHandler::closeVehicle(), MSRouteHandler::closeVehicleTypeDistribution(), MSTLLogicControl::closeWAUT(), MSInductLoop::collectVehiclesOnDet(), Command_SaveTLSState::Command_SaveTLSState(), Command_SaveTLSSwitches::Command_SaveTLSSwitches(), Command_SaveTLSSwitchStates::Command_SaveTLSSwitchStates(), TraCIServerAPI_Simulation::commandDistanceRequest(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), TraCIServerAPI_Simulation::convertCartesianToRoadMap(), NLDetectorBuilder::createEdgeLaneMeanData(), MSLane::detectCollisions(), GUITrafficLightLogicWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), MSDevice_BTreceiver::BTreceiverUpdate::enterRange(), MSDevice::equippedByDefaultAssignmentOptions(), MSPersonControl::erase(), MSCalibrator::execute(), Command_SaveTLCoupledLaneDet::execute(), Command_SaveTLCoupledDet::execute(), MSVTypeProbe::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), MSActuatedTrafficLightLogic::gapControl(), MSDevice_Vehroutes::generateOutput(), MSPerson::getAngle(), GUILane::getColorValue(), MSInductLoop::getCurrentLength(), MSInductLoop::getCurrentOccupancy(), MSInductLoop::getCurrentPassedNumber(), MSLaneSpeedTrigger::getCurrentSpeed(), MSInductLoop::getCurrentSpeed(), GUIViewTraffic::getCurrentTimeStep(), MSEventControl::getCurrentTimeStep(), MSInductLoop::getCurrentVehicleIDs(), MSPerson::getEdgePos(), MSNet::getEffort(), getGUIInstance(), MSLane::getLeaderOnConsecutive(), MSPModel::getModel(), MSPModel_Striping::getNextLane(), TraCIServerAPI_Vehicle::getOrBuildVTDMap(), MSTLLogicControl::getPhaseDef(), TraCIServerAPI_POI::getPoI(), TraCIServerAPI_Polygon::getPolygon(), TraCIServerAPI_InductionLoop::getPosition(), TraCIServerAPI_Junction::getPosition(), TraCIServerAPI_Vehicle::getPosition(), MSPerson::getPosition(), MSVTKExport::getPositions(), MSVTKExport::getSpeed(), GUILane::getStoredEdgeTravelTime(), MSInductLoop::getTimestepsSinceLastDetection(), MSNet::getTravelTime(), TraCIServerAPI_InductionLoop::getTree(), TraCIServerAPI_Junction::getTree(), TraCIServerAPI_POI::getTree(), TraCIServerAPI_Polygon::getTree(), MSPerson::getWaitingSeconds(), MSLane::incorporateVehicle(), MSVehicle::influenceChangeDecision(), MSLCM_JE2013::inform(), MSLCM_JE2013::informFollower(), MSLCM_JE2013::informLeader(), MSDevice_Vehroutes::init(), MSLaneSpeedTrigger::init(), MSCalibrator::init(), MSMeanData::init(), TraCIServer::initialiseSubscription(), MSTLLogicControl::initWautSwitch(), MSLane::isInsertionSuccess(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSDevice_Routing::MSDevice_Routing(), MSTrafficLightLogic::MSTrafficLightLogic(), MSVTypeProbe::MSVTypeProbe(), MSRouteHandler::myEndElement(), MSStateHandler::myEndElement(), MSRouteHandler::myStartElement(), MSStateHandler::myStartElement(), MSCalibrator::myStartElement(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Person::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Vehroutes::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Routing::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Person::notifyLeave(), MSDevice_Vehroutes::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Person::notifyMove(), MSInstantInductLoop::notifyMove(), MSE3Collector::MSE3EntryReminder::notifyMove(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), MSInductLoop::notifyMove(), MSE3Collector::MSE3LeaveReminder::notifyMove(), GUISUMOViewParent::onCmdLocate(), MSBaseVehicle::onDepart(), GUIViewTraffic::onGamingClick(), MSRouteHandler::openVehicleTypeDistribution(), MSLCM_JE2013::patchSpeed(), MSVehicle::planMoveInternal(), TraCIServer::postProcessVTD(), MSPerson::MSPersonStage_Walking::proceed(), TraCIServerAPI_Edge::processGet(), TraCIServerAPI_Polygon::processGet(), TraCIServerAPI_MeMeDetector::processGet(), TraCIServerAPI_POI::processGet(), TraCIServerAPI_ArealDetector::processGet(), TraCIServerAPI_VehicleType::processGet(), TraCIServerAPI_Junction::processGet(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Simulation::processGet(), TraCIServerAPI_Lane::processGet(), MSVehicle::processNextStop(), TraCIServerAPI_Edge::processSet(), TraCIServerAPI_POI::processSet(), TraCIServerAPI_TLS::processSet(), TraCIServerAPI_Polygon::processSet(), TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_Simulation::processSet(), TraCIServerAPI_GUI::processSet(), TraCIServerAPI_VehicleType::processSet(), MSPModel_Striping::PState::PState(), MSCalibrator::remainingVehicleCapacity(), MSCalibrator::removePending(), MSVehicle::replaceRoute(), MSTrafficLightLogic::resetLinkStates(), MSVehicle::resumeFromStopping(), MSLCM_JE2013::saveBlockerLength(), MSStateHandler::saveState(), MSVehicleControl::scheduleVehicleRemoval(), GUIVehicle::setFunctionalColor(), MSLaneSpeedTrigger::setOverriding(), MSLaneSpeedTrigger::setOverridingValue(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSNet::simulationStep(), MSLCM_JE2013::slowDownForBlocked(), MSLane::succLinkSec(), MSTLLogicControl::TLSLogicVariants::switchTo(), MSSimpleTrafficLightLogic::trySwitch(), MSActuatedTrafficLightLogic::trySwitch(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), MSVehicleControl::vehicleDeparted(), MSLCM_JE2013::wantsChange(), MSFCDExport::write(), MSEmissionExport::write(), MSAmitranTrajectories::write(), MSMeanData_Emissions::MSLaneMeanDataValues::write(), MSQueueExport::writeEdge(), MSFullExport::writeEdge(), MSNet::writeOutput(), MSFullExport::writeTLS(), MSFullExport::writeVehicles(), and MSDevice_BTreceiver::BTreceiverUpdate::~BTreceiverUpdate().

MSJunctionControl& MSNet::getJunctionControl ( )
inlineinherited

Returns the junctions control.

Returns
The junctions control
See Also
MSJunctionControl
myJunctions

Definition at line 330 of file MSNet.h.

References MSNet::myJunctions.

Referenced by TraCIServerAPI_Junction::getPosition(), TraCIServerAPI_Junction::getTree(), and TraCIServerAPI_Junction::processGet().

std::vector< GUIGlID > GUINet::getJunctionIDs ( bool  includeInternal) const

Definition at line 230 of file GUINet.cpp.

References myJunctionWrapper.

Position GUINet::getJunctionPosition ( const std::string &  name) const

returns the position of a junction

Definition at line 175 of file GUINet.cpp.

References NamedObjectCont< T >::get(), MSJunction::getPosition(), and MSNet::myJunctions.

const NamedRTree & MSNet::getLanesRTree ( ) const
inherited

Returns an RTree that contains lane IDs.

Returns
An Rtree containing lane IDs

Definition at line 776 of file MSNet.cpp.

References MSLane::fill(), and MSNet::myLanesRTree.

unsigned int GUINet::getLinkTLID ( MSLink link) const

Returns the gl-id of the traffic light that controls the given link valid only if the link is controlled by a tls

Definition at line 188 of file GUINet.cpp.

References MSTLLogicControl::getActive(), myLinks2Logic, MSNet::myLogics, and myLogics2Wrapper.

Referenced by GUILane::drawLinkRule().

int GUINet::getLinkTLIndex ( MSLink link) const

Returns the index of the link within the junction that controls the given link; Returns -1 if the link is not controlled by a tls

Definition at line 203 of file GUINet.cpp.

References MSTLLogicControl::getActive(), myLinks2Logic, MSNet::myLogics, and myLogics2Wrapper.

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

SUMOReal GUINet::getMeanRTFactor ( int  duration) const

Returns the simulation speed as a factor to real time.

Definition at line 359 of file GUINet.cpp.

References myOverallSimDuration, and SUMOReal.

SUMOReal GUINet::getMeanUPS ( ) const

Returns the update per seconds rate.

Definition at line 368 of file GUINet.cpp.

References myOverallSimDuration, MSNet::myVehiclesMoved, and SUMOReal.

Referenced by getParameterWindow().

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().

MSNet::MSPedestrianRouterDijkstra & MSNet::getPedestrianRouter ( const std::vector< MSEdge * > &  prohibited = std::vector<MSEdge*>()) const
inherited
MSPersonControl & GUINet::getPersonControl ( )
virtual

Returns the person control.

If the person control does not exist, yet, it is created.

Returns
The person control
See Also
MSPersonControl
myPersonControl

Reimplemented from MSNet.

Definition at line 126 of file GUINet.cpp.

References MSNet::myPersonControl.

GUIGLObjectPopupMenu * GUINet::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 405 of file GUINet.cpp.

References GUIGlObject::buildCenterPopupEntry(), GUIGlObject::buildPopupHeader(), GUIGlObject::buildPositionCopyEntry(), and GUIGlObject::buildShowParamsPopupEntry().

SUMOAbstractRouter< MSEdge, SUMOVehicle > & MSNet::getRouterEffort ( const std::vector< MSEdge * > &  prohibited = std::vector<MSEdge*>()) const
inherited
SUMOReal GUINet::getRTFactor ( ) const

Returns the simulation speed as a factor to real time.

Definition at line 341 of file GUINet.cpp.

References myLastSimDuration, and SUMOReal.

Referenced by getParameterWindow().

unsigned int GUINet::getSimDuration ( ) const

Returns the duration of the last step's simulation part (in ms)

Returns
How long it took to compute the last step

Definition at line 327 of file GUINet.cpp.

References myLastSimDuration.

Referenced by getParameterWindow().

std::string MSNet::getStateMessage ( MSNet::SimulationState  state)
staticinherited
std::vector< GUIGlID > GUINet::getTLSIDs ( ) const

Returns the gl-ids of all traffic light logics within the net.

Definition at line 242 of file GUINet.cpp.

References myLogics2Wrapper.

SUMOReal MSNet::getTravelTime ( const MSEdge *const  e,
const SUMOVehicle *const  v,
SUMOReal  t 
)
staticinherited

Returns the travel time to pass an edge.

Parameters
[in]eThe edge for which the travel time to be passed shall be returned
[in]vThe vehicle that is rerouted
[in]tThe time for which the travel time shall be returned [s]
Returns
The travel time for an edge
See Also
DijkstraRouterTT_ByProxi

Definition at line 141 of file MSNet.cpp.

References MSNet::getInstance(), MSEdge::getMinimumTravelTime(), MSVehicle::getWeightsStorage(), MSNet::getWeightsStorage(), MSEdgeWeightsStorage::retrieveExistingTravelTime(), and SUMOReal.

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

SUMOReal GUINet::getUPS ( ) const

Returns the update per seconds rate.

Definition at line 350 of file GUINet.cpp.

References myLastSimDuration, myLastVehicleMovementCount, and SUMOReal.

Referenced by getParameterWindow().

MSVehicleControl& MSNet::getVehicleControl ( )
inlineinherited
SUMORTree& GUINet::getVisualisationSpeedUp ( )
inline

Returns the RTree used for visualisation speed-up.

Returns
The visualisation speed-up

Definition at line 252 of file GUINet.h.

References myGrid.

const SUMORTree& GUINet::getVisualisationSpeedUp ( ) const
inline

Returns the RTree used for visualisation speed-up.

Returns
The visualisation speed-up

Definition at line 260 of file GUINet.h.

References myGrid.

MSEdgeWeightsStorage & MSNet::getWeightsStorage ( )
inherited

Returns the net's internal edge travel times/efforts container.

If the net does not have such a container, it is built.

Returns
The net's knowledge about edge weights

Definition at line 636 of file MSNet.cpp.

References MSNet::myEdgeWeights.

Referenced by NLBuilder::EdgeFloatTimeLineRetriever_EdgeEffort::addEdgeWeight(), NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime::addEdgeWeight(), GUILane::getColorValue(), MSNet::getEffort(), GUILane::getStoredEdgeTravelTime(), MSNet::getTravelTime(), and TraCIServerAPI_Edge::processSet().

unsigned int GUINet::getWholeDuration ( ) const

Returns the duration of the last step (sim+visualisation+idle) (in ms)

Returns
How long it took to compute and display the last step

Definition at line 321 of file GUINet.cpp.

References myLastIdleDuration, and myLastSimDuration.

Referenced by getParameterWindow().

void GUINet::guiSimulationStep ( )

Some further steps needed for gui processing.

Definition at line 216 of file GUINet.cpp.

Referenced by GUIRunThread::makeStep().

void MSNet::informVehicleStateListener ( const SUMOVehicle *const  vehicle,
VehicleState  to 
)
inherited

Informs all added listeners about a vehicle's state change.

Parameters
[in]vehicleThe vehicle which changed its state
[in]toThe state the vehicle has changed to
See Also
VehicleStateListener:vehicleStateChanged

Definition at line 693 of file MSNet.cpp.

References MSNet::myVehicleStateListeners.

Referenced by GUIVehicleControl::buildVehicle(), MSVehicleControl::buildVehicle(), MSVehicle::processNextStop(), MSVehicle::replaceRoute(), MSVehicle::resumeFromStopping(), MSVehicleControl::scheduleVehicleRemoval(), and MSVehicleControl::vehicleDeparted().

void GUINet::initTLMap ( )
private

Initialises the tl-logic map and wrappers.

Definition at line 135 of file GUINet.cpp.

References createTLWrapper(), MSTLLogicControl::getAllLogics(), MSNet::getTLSControl(), and myTLLogicWrappers.

Referenced by initGUIStructures().

void MSNet::loadRoutes ( )
inherited

loads routes for the next few steps

Definition at line 314 of file MSNet.cpp.

References SUMORouteLoaderControl::loadNext(), MSNet::myRouteLoaders, and MSNet::myStep.

Referenced by GUIRunThread::init(), MSNet::simulate(), and MSNet::simulationStep().

void GUINet::lock ( )

grant exclusive access to the simulation state

Definition at line 490 of file GUINet.cpp.

References MFXMutex::lock(), and myLock.

Referenced by GUIViewTraffic::doPaintGL().

bool MSNet::logSimulationDuration ( ) const
inherited

Returns whether duration shall be logged.

Returns
Whether duration shall be logged

Definition at line 621 of file MSNet.cpp.

References MSNet::myLogExecutionTime.

Referenced by getParameterWindow().

void MSNet::postSimStepOutput ( ) const
inherited

Prints the statistics of the step at its end.

Called on the end of a simulation step

Definition at line 651 of file MSNet.cpp.

References DELTA_T, MSVehicleControl::getDepartedVehicleNo(), MSVehicleControl::getRunningVehicleNo(), MSNet::myLogExecutionTime, MSNet::mySimStepDuration, MSNet::myStep, MSNet::myVehicleControl, OUTPUT_ACCURACY, SUMOReal, and time2string().

Referenced by MSNet::simulate().

void MSNet::preSimStepOutput ( ) const
inherited

Prints the current step number.

Called on the begin of a simulation step

Definition at line 645 of file MSNet.cpp.

References MSNet::myStep, and time2string().

Referenced by MSNet::simulate().

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 MSNet::removeVehicleStateListener ( VehicleStateListener listener)
inherited

Removes a vehicle states listener.

Parameters
[in]listenerThe listener to remove

Definition at line 684 of file MSNet.cpp.

References MSNet::myVehicleStateListeners.

void MSNet::setCurrentTimeStep ( const SUMOTime  step)
inlineinherited

Sets the current simulation step (used by state loading)

Parameters
stepthe current simulation step

Definition at line 224 of file MSNet.h.

References MSNet::myStep.

Referenced by GUIRunThread::init().

void GUINet::setIdleDuration ( int  val)

Sets the duration of the last step's idle part.

Definition at line 399 of file GUINet.cpp.

References myLastIdleDuration.

Referenced by GUIRunThread::run().

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
void GUINet::setSimDuration ( int  val)

Sets the duration of the last step's simulation part.

Definition at line 383 of file GUINet.cpp.

References MSVehicleControl::getRunningVehicleNo(), MSNet::getVehicleControl(), myLastSimDuration, myLastVehicleMovementCount, myOverallSimDuration, and myOverallVehicleCount.

Referenced by GUIRunThread::run().

int MSNet::simulate ( SUMOTime  start,
SUMOTime  stop 
)
inherited

Simulates from timestep start to stop.

Parameters
[in]startThe begin time step of the simulation
[in]stopThe end time step of the simulation
Returns
Returns always 0
Todo:

Recheck return value

What exceptions may occure?

Definition at line 269 of file MSNet.cpp.

References MSNet::closeSimulation(), MSNet::getCurrentTimeStep(), OptionsCont::getOptions(), MSNet::getStateMessage(), MSNet::loadRoutes(), MSNet::myLogStepNumber, MSNet::myStep, MSNet::postSimStepOutput(), MSNet::preSimStepOutput(), MSNet::SIMSTATE_RUNNING, MSNet::simulationState(), MSNet::simulationStep(), time2string(), TraCIServer::wasClosed(), and WRITE_MESSAGE.

Referenced by main().

void GUINet::simulationStep ( )

Performs a single simulation step (locking the simulation)

Reimplemented from MSNet.

Definition at line 223 of file GUINet.cpp.

References myLock.

Referenced by GUIRunThread::makeStep().

void GUINet::unlock ( )

release exclusive access to the simulation state

Definition at line 496 of file GUINet.cpp.

References myLock, and MFXMutex::unlock().

Referenced by GUIViewTraffic::doPaintGL().

bool GUINet::vehicleExists ( const std::string &  name) const

returns the information whether the vehicle still exists

Definition at line 182 of file GUINet.cpp.

References MSVehicleControl::getVehicle(), and MSNet::myVehicleControl.

Friends And Related Function Documentation

friend class GUIOSGBuilder
friend

Definition at line 304 of file GUINet.h.

friend class GUITrafficLightLogicWrapper
friend

Definition at line 92 of file GUINet.h.

Referenced by createTLWrapper().

Field Documentation

MSEventControl* MSNet::myBeginOfTimestepEvents
protectedinherited

Controls events executed at the begin of a time step;.

See Also
MSEventControl

Definition at line 555 of file MSNet.h.

Referenced by MSNet::getBeginOfTimestepEvents(), MSNet::MSNet(), MSNet::simulationStep(), and MSNet::~MSNet().

Boundary GUINet::myBoundary
protected

The networks boundary.

Definition at line 311 of file GUINet.h.

Referenced by getBoundary(), and initGUIStructures().

NamedObjectCont<MSBusStop*> MSNet::myBusStopDict
protectedinherited

Dictionary of bus stops.

Definition at line 604 of file MSNet.h.

Referenced by MSNet::addBusStop(), MSNet::getBusStop(), and MSNet::getBusStopID().

MSDetectorControl* MSNet::myDetectorControl
protectedinherited
std::vector<GUIDetectorWrapper*> GUINet::myDetectorDict
protected

A detector dictionary.

Definition at line 323 of file GUINet.h.

Referenced by initGUIStructures(), and ~GUINet().

MSEdgeControl* MSNet::myEdges
protectedinherited

Controls edges, performs vehicle movement;.

See Also
MSEdgeControl

Definition at line 545 of file MSNet.h.

Referenced by MSNet::closeBuilding(), MSNet::getEdgeControl(), MSNet::MSNet(), MSNet::simulationStep(), MSNet::writeOutput(), and MSNet::~MSNet().

MSEdgeWeightsStorage* MSNet::myEdgeWeights
protectedinherited

The net's knowledge about edge efforts/travel times;.

See Also
MSEdgeWeightsStorage

Definition at line 563 of file MSNet.h.

Referenced by MSNet::getWeightsStorage(), MSNet::MSNet(), and MSNet::~MSNet().

std::vector<GUIEdge*> GUINet::myEdgeWrapper
protected

Wrapped MS-edges.

Definition at line 314 of file GUINet.h.

Referenced by initGUIStructures().

MSEventControl* MSNet::myEndOfTimestepEvents
protectedinherited

Controls events executed at the end of a time step;.

See Also
MSEventControl

Definition at line 557 of file MSNet.h.

Referenced by MSNet::getEndOfTimestepEvents(), MSNet::MSNet(), MSNet::simulationStep(), and MSNet::~MSNet().

LayeredRTree GUINet::myGrid
protected

The visualization speed-up.

Definition at line 308 of file GUINet.h.

Referenced by createTLWrapper(), getVisualisationSpeedUp(), and initGUIStructures().

MSInsertionControl* MSNet::myInserter
protectedinherited
MSEventControl* MSNet::myInsertionEvents
protectedinherited

Controls insertion events;.

See Also
MSEventControl

Definition at line 559 of file MSNet.h.

Referenced by MSNet::getInsertionEvents(), MSNet::MSNet(), MSNet::simulationState(), MSNet::simulationStep(), and MSNet::~MSNet().

MSNet * MSNet::myInstance = 0
staticprotectedinherited

Unique instance of MSNet.

Definition at line 527 of file MSNet.h.

Referenced by MSNet::getInstance(), MSNet::MSNet(), and MSNet::~MSNet().

MSJunctionControl* MSNet::myJunctions
protectedinherited

Controls junctions, realizes right-of-way rules;.

See Also
MSJunctionControl

Definition at line 547 of file MSNet.h.

Referenced by MSNet::closeBuilding(), MSNet::getJunctionControl(), getJunctionPosition(), initGUIStructures(), MSNet::MSNet(), and MSNet::~MSNet().

std::vector<GUIJunctionWrapper*> GUINet::myJunctionWrapper
protected

Wrapped MS-junctions.

Definition at line 317 of file GUINet.h.

Referenced by getJunctionIDs(), initGUIStructures(), and ~GUINet().

std::pair<bool, NamedRTree> MSNet::myLanesRTree
mutableprotectedinherited

An RTree structure holding lane IDs.

Definition at line 622 of file MSNet.h.

Referenced by MSNet::getLanesRTree(), MSNet::MSNet(), and MSNet::~MSNet().

unsigned int GUINet::myLastIdleDuration
protected

Definition at line 339 of file GUINet.h.

Referenced by getIdleDuration(), getWholeDuration(), and setIdleDuration().

unsigned int GUINet::myLastSimDuration
protected

The step durations (simulation, /*visualisation, */idle)

Definition at line 339 of file GUINet.h.

Referenced by getRTFactor(), getSimDuration(), getUPS(), getWholeDuration(), and setSimDuration().

long GUINet::myLastVehicleMovementCount
protected

Definition at line 341 of file GUINet.h.

Referenced by getUPS(), and setSimDuration().

Links2LogicMap GUINet::myLinks2Logic
protected

The link-to-logic-id map.

Definition at line 329 of file GUINet.h.

Referenced by createTLWrapper(), getLinkTLID(), and getLinkTLIndex().

MFXMutex GUINet::myLock
mutableprivate

The mutex used to avoid concurrent updates of the vehicle buffer.

Definition at line 346 of file GUINet.h.

Referenced by lock(), simulationStep(), unlock(), and ~GUINet().

bool MSNet::myLogExecutionTime
protectedinherited

Information whether the simulation duration shall be logged.

Definition at line 572 of file MSNet.h.

Referenced by MSNet::closeBuilding(), MSNet::closeSimulation(), MSNet::logSimulationDuration(), MSNet::MSNet(), MSNet::postSimStepOutput(), MSNet::simulationStep(), and MSNet::writeOutput().

MSTLLogicControl* MSNet::myLogics
protectedinherited

Controls tls logics, realizes waiting on tls rules;.

See Also
MSJunctionControl

Definition at line 549 of file MSNet.h.

Referenced by MSNet::closeBuilding(), createTLWrapper(), getLinkTLID(), getLinkTLIndex(), MSNet::getTLSControl(), MSNet::MSNet(), MSNet::simulationStep(), and MSNet::~MSNet().

Logics2WrapperMap GUINet::myLogics2Wrapper
protected

The traffic light-to-wrapper map.

Definition at line 335 of file GUINet.h.

Referenced by createTLWrapper(), getLinkTLID(), getLinkTLIndex(), getTLSIDs(), and ~GUINet().

bool MSNet::myLogStepNumber
protectedinherited

Information whether the number of the simulation step shall be logged.

Definition at line 575 of file MSNet.h.

Referenced by MSNet::MSNet(), and MSNet::simulate().

long GUINet::myOverallSimDuration
protected

Definition at line 342 of file GUINet.h.

Referenced by getMeanRTFactor(), getMeanUPS(), and setSimDuration().

long GUINet::myOverallVehicleCount
protected

Definition at line 341 of file GUINet.h.

Referenced by setSimDuration().

MSPedestrianRouterDijkstra* MSNet::myPedestrianRouter
mutableprotectedinherited

Definition at line 618 of file MSNet.h.

Referenced by MSNet::getPedestrianRouter().

MSPersonControl* MSNet::myPersonControl
protectedinherited

Controls person building and deletion;.

See Also
MSPersonControl

Definition at line 543 of file MSNet.h.

Referenced by getPersonControl(), MSNet::getPersonControl(), MSNet::MSNet(), MSNet::simulationState(), MSNet::simulationStep(), and MSNet::~MSNet().

SUMORouteLoaderControl* MSNet::myRouteLoaders
protectedinherited

Route loader for dynamic loading of routes.

Definition at line 530 of file MSNet.h.

Referenced by MSNet::closeBuilding(), MSNet::loadRoutes(), MSNet::MSNet(), and MSNet::~MSNet().

DijkstraRouterEffort_ByProxi<MSEdge, SUMOVehicle, prohibited_withRestrictions<MSEdge, SUMOVehicle> >* MSNet::myRouterEffort
mutableprotectedinherited

Definition at line 617 of file MSNet.h.

Referenced by MSNet::getRouterEffort(), and MSNet::~MSNet().

AStarRouterTT_ByProxi<MSEdge, SUMOVehicle, prohibited_withRestrictions<MSEdge, SUMOVehicle> >* MSNet::myRouterTTAStar
mutableprotectedinherited

Definition at line 616 of file MSNet.h.

Referenced by MSNet::getRouterTT(), and MSNet::~MSNet().

DijkstraRouterTT_ByProxi<MSEdge, SUMOVehicle, prohibited_withRestrictions<MSEdge, SUMOVehicle> >* MSNet::myRouterTTDijkstra
mutableprotectedinherited

Definition at line 615 of file MSNet.h.

Referenced by MSNet::getRouterTT(), and MSNet::~MSNet().

bool MSNet::myRouterTTInitialized
mutableprotectedinherited

Definition at line 614 of file MSNet.h.

Referenced by MSNet::getRouterTT().

ShapeContainer* MSNet::myShapeContainer
protectedinherited

A container for geometrical shapes;.

See Also
ShapeContainer

Definition at line 561 of file MSNet.h.

Referenced by MSNet::getShapeContainer(), MSNet::MSNet(), and MSNet::~MSNet().

long MSNet::mySimBeginMillis
protectedinherited

The overall simulation duration.

Definition at line 581 of file MSNet.h.

Referenced by MSNet::closeBuilding(), and MSNet::closeSimulation().

long MSNet::mySimStepBegin
protectedinherited

The last simulation step begin, end and duration.

Definition at line 578 of file MSNet.h.

Referenced by MSNet::simulationStep().

long MSNet::mySimStepDuration
protectedinherited

Definition at line 578 of file MSNet.h.

Referenced by MSNet::postSimStepOutput(), MSNet::simulationStep(), and MSNet::writeOutput().

long MSNet::mySimStepEnd
protectedinherited

Definition at line 578 of file MSNet.h.

Referenced by MSNet::simulationStep().

std::vector<std::string> MSNet::myStateDumpFiles
protectedinherited

The names for the state files.

Definition at line 595 of file MSNet.h.

Referenced by MSNet::closeBuilding(), and MSNet::simulationStep().

std::vector<SUMOTime> MSNet::myStateDumpTimes
protectedinherited

Times at which a state shall be written.

Definition at line 593 of file MSNet.h.

Referenced by MSNet::closeBuilding(), and MSNet::simulationStep().

std::vector<MSTrafficLightLogic*> GUINet::myTLLogicWrappers
protected

Wrapped TL-Logics.

Definition at line 320 of file GUINet.h.

Referenced by initTLMap().

int MSNet::myTooManyVehicles
protectedinherited

Storage for maximum vehicle number.

Definition at line 601 of file MSNet.h.

Referenced by MSNet::MSNet(), and MSNet::simulationState().

SUMOLong MSNet::myVehiclesMoved
protectedinherited

The overall number of vehicle movements.

Definition at line 584 of file MSNet.h.

Referenced by MSNet::closeSimulation(), getMeanUPS(), and MSNet::simulationStep().

std::vector<VehicleStateListener*> MSNet::myVehicleStateListeners
protectedinherited

Container for vehicle state listener.

Definition at line 607 of file MSNet.h.

Referenced by MSNet::addVehicleStateListener(), MSNet::informVehicleStateListener(), and MSNet::removeVehicleStateListener().

const std::string MSNet::STAGE_EVENTS
staticprotectedinherited

string constants for simstep stages

Definition at line 626 of file MSNet.h.

Referenced by MSNet::simulationStep().

const std::string MSNet::STAGE_INSERTIONS
staticprotectedinherited

Definition at line 629 of file MSNet.h.

Referenced by MSNet::simulationStep().

const std::string MSNet::STAGE_LANECHANGE
staticprotectedinherited

Definition at line 628 of file MSNet.h.

Referenced by MSNet::simulationStep().

const std::string MSNet::STAGE_MOVEMENTS
staticprotectedinherited

Definition at line 627 of file MSNet.h.

Referenced by MSNet::simulationStep().

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: