WSF
XWsfRoadTraffic Class Reference

#include <XWsfRoadTraffic.hpp>

Inheritance diagram for XWsfRoadTraffic:
Collaboration diagram for XWsfRoadTraffic:

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 WsfScenarioGetScenario () const
Public Member Functions inherited from WsfSimulationExtension
 WsfSimulationExtension ()
 ~WsfSimulationExtension () override=default
WsfSimulationGetSimulation () const
const WsfScenarioGetScenario () 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.
XWsfRoadTrafficoperator= (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)

Detailed Description

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.

Member Enumeration Documentation

◆ EndOfPath

Enumerator
cRESPAWN 
cREVERSE_DIRECTION 

Constructor & Destructor Documentation

◆ XWsfRoadTraffic() [1/2]

XWsfRoadTraffic::XWsfRoadTraffic ( const Data & aData)
inline

Referenced by operator=(), and XWsfRoadTraffic().

◆ ~XWsfRoadTraffic()

XWsfRoadTraffic::~XWsfRoadTraffic ( )
override

◆ XWsfRoadTraffic() [2/2]

XWsfRoadTraffic::XWsfRoadTraffic ( const XWsfRoadTraffic & aSrc)
protecteddelete

Copy constructor and assignment operator are declared but not defined in order to prevent use.

References XWsfRoadTraffic().

Member Function Documentation

◆ AdvanceTime()

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

◆ GetScenario()

Returns the scenario in which this extension is registered.

Note
Do not call this method before registering this extension

Referenced by Initialize().

◆ Initialize()

bool XWsfRoadTraffic::Initialize ( )
overridevirtual

◆ operator=()

XWsfRoadTraffic & XWsfRoadTraffic::operator= ( const XWsfRoadTraffic & aRhs)
protecteddelete

References XWsfRoadTraffic().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved