|
WSF
|
#include <XWsfRoadTraffic.hpp>


Classes | |
| struct | SGroundTraffic |
| struct | WeightedRegionInput |
| class | VehicleInput |
| struct | ConvoyInput |
| class | WeightedRouteSegment |
| class | RoadTrafficNetworkInput |
| struct | Data |
| Holds the data for XWsfRoadTraffic populated during the ProcessInput phase. More... | |
Public Types | |
| enum | EndOfPath { cRESPAWN , cREVERSE_DIRECTION } |
Public Member Functions | |
| XWsfRoadTraffic (const Data &aData) | |
| ~XWsfRoadTraffic () override | |
| bool | Initialize () override |
| void | AdvanceTime (double aSimTime) |
| const WsfScenario & | GetScenario () const |
| Public Member Functions inherited from WsfSimulationExtension | |
| WsfSimulationExtension () | |
| ~WsfSimulationExtension () override=default | |
| WsfSimulation & | GetSimulation () const |
| const WsfScenario & | GetScenario () const |
| virtual void | AddedToSimulation () |
| virtual bool | PrepareExtension () |
| virtual bool | PlatformsInitialized () |
| virtual void | PendingStart () |
| virtual void | Start () |
| virtual void | Complete (double aSimTime) |
| Public Member Functions inherited from WsfExtension | |
| virtual | ~WsfExtension ()=default |
| const std::string & | GetExtensionName () const |
Protected Member Functions | |
| XWsfRoadTraffic (const XWsfRoadTraffic &aSrc)=delete | |
| Copy constructor and assignment operator are declared but not defined in order to prevent use. | |
| XWsfRoadTraffic & | operator= (const XWsfRoadTraffic &aRhs)=delete |
| Protected Member Functions inherited from WsfExtension | |
| void | InitializeExtensionName (const std::string &aName) |
Additional Inherited Members | |
| static void | __private_SetSim (WsfSimulationExtension &aExtension, WsfSimulation *aSimPtr) |
XWsfRoadTraffic provides a basic background traffic capability. Based on the provided input file a specified number of ground vehicles are created and placed randomly on the specified road network (a vehicle density can also be specified. Weighted regions can be specified so that vehicles populate those regions with a higher density. Vehicle type, velocity, travel time, and quantity can be specified. In addition, vehicles can travel offroad at the end of their route or runtime and pause for a given amount of time. The initial number of vehicles is always maintained, so as a vehicle is removed from the simulation another one is added.
|
inline |
Referenced by operator=(), and XWsfRoadTraffic().
|
override |
|
protecteddelete |
Copy constructor and assignment operator are declared but not defined in order to prevent use.
References XWsfRoadTraffic().
| void XWsfRoadTraffic::AdvanceTime | ( | double | aSimTime | ) |
Update determines if vehicles need to be added, deleted or teleported. NOTE: Actual vehicle motion occurs as part of the normal simulation process.
References cRESPAWN, cREVERSE_DIRECTION, WsfSimulationExtension::GetSimulation(), and moverPtr.
Referenced by Initialize().
| const WsfScenario & WsfSimulationExtension::GetScenario | ( | ) | const |
Returns the scenario in which this extension is registered.
Referenced by Initialize().
|
overridevirtual |
Called in response to WsfSimulation::Initialize. This is called to allow the extension to perform any initialization that is required.
Reimplemented from WsfSimulationExtension.
References WsfObserver::AdvanceTime(), AdvanceTime(), GetScenario(), WsfSimulationExtension::GetSimulation(), XWsfRoadTraffic::RoadTrafficNetworkInput::mConvoyInput, XWsfRouteNetwork::NetworkInput::mNetworkId, moverPtr, XWsfRouteNetwork::NetworkInput::mRouteNetworkPtr, XWsfRoadTraffic::RoadTrafficNetworkInput::mWeightedRouteSegments, ok, pauseTime, WsfRoadMover::SetEndLat(), WsfRoadMover::SetEndLon(), WsfRoadMover::SetPauseTime(), WsfRoadMover::SetRoadNetworkId(), WsfRoadMover::SetSpeed(), WsfRoadMover::SetStartLat(), WsfRoadMover::SetStartLon(), and WsfRoadMover::SetUseClosestWaypoint().
|
protecteddelete |
References XWsfRoadTraffic().