WSF
XWsfOSM_Traffic.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2019 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef XWSFOSMTRAFFIC_HPP
13#define XWSFOSMTRAFFIC_HPP
14
15#include "wsf_export.h"
16
17#include <string>
18#include <unordered_map>
19#include <unordered_set>
20#include <vector>
21
22class UtInput;
23#include "UtCallbackHolder.hpp"
24
25class WsfMover;
27class WsfPlatform;
28class WsfRoadMover;
29#include "WsfRoute.hpp"
30class WsfRouteNetwork;
32
42{
43public:
45 {
46 int mIdentifier{0};
48 bool mAlive{false};
49 int mNetwork{-1};
50 double mSpeed{0.0};
53 bool mConvoyVehicle{false};
54 std::string mCurrentRouteName;
56 bool mCatchUp{false};
57 bool mAtIntersection{false};
58
61 bool mScripted{false};
62 };
63
65 {
66 cNONE,
67 cSTOP,
68 cTRAFFIC
69 };
70
72 {
73 public:
74 QueuedOperation(int aVehicleId, WsfRoute& aNewRoute, double aTime, bool aJump = false)
75 : mVehicleId(aVehicleId)
76 , mNewRoute(aNewRoute)
77 , mAddedTime(aTime)
78 , mJump(aJump)
79 {
80 }
81
84 double mAddedTime;
85 bool mJump;
86 };
87
89 {
90 public:
91 QueuedConvoyOperation(double aPrecedingTime, int aVehicleId, WsfRoute& aNewRoute, double aTime, bool aJump = false)
92 : QueuedOperation(aVehicleId, aNewRoute, aTime, aJump)
93 , mPrecedingTime(aPrecedingTime)
94 {
95 }
96
98 };
99
101 {
102 public:
103 QueuedSpeedChange(int aVehicleId, unsigned int aIndex, double aSpeed, double aTime)
104 : mVehicleId(aVehicleId)
105 , mIndex(aIndex)
106 , mSpeed(aSpeed)
107 , mTime(aTime)
108 {
109 }
110
112 unsigned int mIndex;
113 double mSpeed;
114 double mTime;
115 };
116
118 {
119 public:
120 WeightedRouteEdge(int aWeight, unsigned int aRouteIndex, unsigned int aWaypointIndex)
121 : mWeight(aWeight)
122 , mRouteIndex(aRouteIndex)
123 , mWaypointIndex(aWaypointIndex)
124 {
125 }
126
128 unsigned int mRouteIndex;
129 unsigned int mWaypointIndex;
130 };
131
133 {
134 public:
135 RoutePair(const std::string& aSource, const std::string& aDestination, const std::string& aNodeId)
136 : mSourceRoute(aSource)
137 , mDestinationRoute(aDestination)
138 , mNodeId(aNodeId)
139 {
140 }
141
142 bool operator==(const RoutePair& aOther) const
143 {
144 return (mSourceRoute == aOther.mSourceRoute) && (mDestinationRoute == aOther.mDestinationRoute) &&
145 (mNodeId == aOther.mNodeId);
146 }
147
148 std::string mSourceRoute;
149 std::string mDestinationRoute;
150 std::string mNodeId;
151 };
152
154 {
155 std::size_t operator()(const RoutePair& aNode) const
156 {
157 return ((std::hash<std::string>()(aNode.mSourceRoute) ^ (std::hash<std::string>()(aNode.mDestinationRoute) << 1)) >>
158 1) ^
159 (std::hash<std::string>()(aNode.mNodeId) << 1);
160 }
161 };
162
164 {
165 public:
166 WeightedRouteNode(const std::string& aId)
167 : mId(aId)
168 {
169 }
170
171 bool operator==(const WeightedRouteNode& aOther) const { return (mId == aOther.mId); }
172
173 std::string mId;
174 mutable std::vector<WeightedRouteEdge> mEdges;
175 mutable std::vector<std::string> mSourceRoutes; // string = base route name
176 double mWaitTime{0.0};
178 };
179
181 {
182 std::size_t operator()(const WeightedRouteNode& aNode) const { return (std::hash<std::string>()(aNode.mId)); }
183 };
184
186 {
187 public:
188 TrackerDetails(int aId, double aDistance)
189 : mVehicleId(aId)
190 , mDistanceAlongRoute(aDistance)
191 {
192 }
193 bool operator<(const TrackerDetails& aDetail2) const
194 {
196 {
197 return mVehicleId > aDetail2.mVehicleId;
198 }
199 return (mDistanceAlongRoute < aDetail2.mDistanceAlongRoute);
200 }
203 };
204
206 {
207 public:
208 QueuedRoadRelease(const std::string& aName, double aTime, bool aRoad)
209 : mName(aName)
210 , mTime(aTime)
211 , mRoad(aRoad)
212 {
213 }
214
215 bool operator<(const QueuedRoadRelease& aDetail2) const { return mTime > aDetail2.mTime; }
216
217 std::string mName;
218 double mTime;
219 bool mRoad;
220 };
221
223 ~XWsfOSM_Traffic() override;
224 XWsfOSM_Traffic(const XWsfOSM_Traffic& aRoadTraffic) = delete;
225 XWsfOSM_Traffic& operator=(const XWsfOSM_Traffic& aRoadTraffic) = delete;
226
227 void AddedToSimulation() override;
228 bool Initialize() override;
229
230 static XWsfOSM_Traffic* Find(const WsfSimulation& aSimulation);
231
232 static std::unique_ptr<UtScriptClass> CreateScriptClass(const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
233
234 void AdvanceTime(double aSimTime);
235
236 // Script accessors
237 std::vector<WsfRoute*> GetRoutesOnNetwork(const std::string& aNetworkName);
238 WsfRoute* GetIndividualRoute(const std::string& aNetworkName,
239 const std::string& aBaseName,
240 int aLaneNumber = 1,
241 bool aDirection = true,
242 int aSegmentNumber = 1);
243 std::vector<WsfPlatform*> GetPlatformsAlongRoute(const std::string& aNetworkName, const std::string& aRouteName);
244 WsfWaypoint* GetNextWaypoint(const std::string& aNetworkname, const std::string& aRouteName, double aDistance);
245 std::string GetTrafficFlow(double aSimTime, const std::string& aNetworkName, const std::string& aNodeId);
246 std::string GetNodeOnRoute(const std::string& aNetworkName, const std::string& aRouteName, bool aFirstOrLast);
247 std::vector<WsfRoute*> GetConnectedRoutes(const std::string& aNetworkName, const std::string& aNodeId);
248
249 bool AddScriptedVehicle(WsfPlatform* aPlatformPtr, const std::string& aNetworkName, WsfRoute* aRoute, int& aVehicleNumber);
250
251 bool AddScriptedConvoy(const std::vector<WsfPlatform*> aPlatformList,
252 const std::string& aNetworkName,
253 WsfRoute* aRoute,
254 double aInitialSpacing);
255
256 void UpdateScriptedVehicleRoute(WsfPlatform* aPlatformPtr, WsfRoute* aRoute, int aWaypointIndex = 0);
257
258 bool ChangeScriptedLane(WsfPlatform* aPlatformPtr, bool aDirection);
259
260 bool ScriptLockIntersection(const std::string& aNetworkName, const std::string& aNodeId);
261 bool ScriptUnlockIntersection(const std::string& aNetworkName, const std::string& aNodeId);
262 void ScriptGoOffroad(WsfPlatform* aVehicle, const WsfGeoPoint& aGeoPoint);
263
264private:
266 struct TrafficInformation
267 {
269 std::vector<std::unique_ptr<WsfRoute>> mRoadRoutes;
270
271
273 std::unordered_set<WeightedRouteNode, WeightedRouteNodeHash> mRoadGraphs;
274
276 std::unordered_map<std::string, std::unordered_set<unsigned int>> mRouteVehicleTracker;
277 std::unordered_map<std::string, std::unordered_set<unsigned int>> mAdjacentLanes;
278 std::unordered_map<RoutePair, std::deque<QueuedOperation>, RoutePairHash> mQueuedOperations;
279
281 std::unordered_map<int, std::deque<QueuedOperation>> mQueuedConvoys;
282 std::unordered_map<int, std::deque<QueuedSpeedChange>> mQueuedConvoySpeeds;
285
286
287 std::unordered_map<std::string, unsigned int> mIntersectionsInUse;
293 std::unordered_map<std::string, std::unordered_map<unsigned int, double>>
294 mAtIntersection;
297 std::unordered_set<std::string> mReservedRoads;
299 std::deque<QueuedRoadRelease> mQueuedRoadRelease;
300 };
301
302 void AddPlatformToSimulation(double aSimTime, int aVehicleNumber);
303
304 int SlotNumberHandler(WsfStringId aVehicleTypeId);
305 int AllocateVehicle(WsfStringId aVehicleTypeId);
306 void ClearVehicleList();
307 bool CreateVehicle(const RoadTrafficNetworkInput& aNetworkInput,
308 double aCreateTime,
309 int& aVehicleNumber,
310 bool aAtSource = false);
311
312 bool CreateConvoyVehicles(const RoadTrafficNetworkInput& aNetworkInput, double aCreateTime);
313
314 void DeletePlatformFromSimulation(double aSimTime, int aVehicleNumber);
315
316 bool ValidateVehicleTypes(RoadTrafficNetworkInput& aNetwork);
317
318 void BuildSplitRoads(unsigned int aNetIndex, RoadTrafficNetworkInput& aNetwork);
319 void BuildWeightedGraph(unsigned int aNetIndex, RoadTrafficNetworkInput& aNetwork);
320 bool ValidateAuxData(RoadTrafficNetworkInput& aNetwork);
321 bool CheckNetworkValidity(unsigned int aNetIndex) const;
322 void CreateInitialPathForVehicle(const RoadTrafficNetworkInput& aNetwork,
323 int aVehicleNumber,
324 const std::string& aRoute = "",
325 double aDistance = 0.0);
326
327 double GetRandomSpeed(const WsfRoute& aRoute,
328 const RouteAuxMapping& aRouteAuxMap,
329 double aVehicleSpeed,
330 bool aIgnoreSpeedLimit);
331 void AssignRandomSpeeds(WsfRoute& aRoute,
332 const RouteAuxMapping& aRouteAuxMap,
333 double aVehicleSpeed,
334 bool aIgnoreSpeedLimit,
335 bool aConvoy = false);
336 std::string GetRandomSourceRoute(unsigned int aNetworkId) const;
337 void VehiclePathEndedHandler(double aSimTime, WsfMover* aMover);
338 void PlatformDeletedHandler(double aSimTime, WsfPlatform* aPlatform);
339 void CatchUpHandler(double aSimTime, int aVehicleNumber, double aCatchupSpeed);
340 void ConvoyCatchUpHandler(double aSimTime, int aConvoyNumber, unsigned int aIndex, double aCatchupSpeed);
341
342 void TrackerCreationHelper(std::vector<TrackerDetails>& aTracker, unsigned int aVehicleNumber);
343
344 // Lane Change Helper Functions
345 bool CheckLaneAvailability(int aVehicleNumber,
346 unsigned int aLaneIndex,
347 const std::vector<TrackerDetails>& aTracker,
348 double aDistance,
349 double* aNextPoint);
350 void ChangeLane(int aVehicleNumber, unsigned int aLaneIndex, double aDistance, const double* aNextPoint);
351
352 WsfRoute CopyOriginalRoute(unsigned int aNetworkId, unsigned int aRouteIndex, unsigned int aWaypointIndex);
353
354
357
358 const double cSPACING = 4.0;
359 void HandleRegularOperations(double aSimTime);
360 void HandleRoadRelease(double aSimTime);
362
364
365 void HandleQueuedConvoy(double aSimTime);
366 void HandleConvoySpeedChange(double aSimTime);
368
369 void GoToSpeedHelper(double aSimTime,
370 WsfMover* aMover,
371 double aSpeed,
372 double aDifference,
373 int aVehicleNumber,
374 TrafficInformation& aNetworkTraffic);
375 bool ApproachIntersectionDecelerate(double aSimTime,
376 bool aDecelerate,
377 const WsfRoute* aCurrentRoute,
378 WsfMover* aMover,
379 double aCurrentDistance,
380 const std::vector<TrackerDetails>& aVehiclesOnRoute,
381 int aIndex,
382 TrafficInformation& aNetworkTraffic);
383 bool HandleStoppedVehicles(double aSimTime,
384 bool aHandleStop,
385 const WsfRoute* aCurrentRoute,
386 WsfMover* aMover,
387 double aCurrentDistance,
388 const std::vector<TrackerDetails>& aVehiclesOnRoute,
389 int aIndex,
390 TrafficInformation& aNetworkTraffic);
391 bool HandleCollisions(double aSimTime,
392 bool aHandleCollisions,
393 WsfRoute* aCurrentRoute,
394 WsfMover* aMover,
395 double aCurrentDistance,
396 const std::unordered_map<std::string, std::vector<TrackerDetails>>& aDetailedTracker,
397 const std::vector<TrackerDetails>& aVehiclesOnRoute,
398 int aIndex,
399 TrafficInformation& aNetworkTraffic);
400 void ModifyVehicleSpeed(double aSimTime,
401 bool aModifySpeed,
402 RoadTrafficNetworkInput* aNetworkPtr,
403 WsfRoute* aCurrentRoute,
404 WsfMover* aMover,
405 const std::vector<TrackerDetails>& aVehiclesOnRoute,
406 int aIndex,
407 TrafficInformation& aNetworkTraffic);
408
409 std::vector<SGroundTraffic> mTraffic;
410 UtCallbackHolder mCallbacks;
411 int mNextVehicleIdentifier{0};
412 int mNumVehiclesActive{0};
413 int mMaxVehiclesActive{0};
414 double mNextUpdateTime{0.0};
415 double mNextConvoyUpdateTime{std::numeric_limits<double>::max()};
416 double mNextConvoySpeedTime{std::numeric_limits<double>::max()};
417 double mNextConvoyCatchUpTime{std::numeric_limits<double>::max()};
418 double mNextRoadReleaseTime{std::numeric_limits<double>::max()};
419
420 std::deque<QueuedSpeedChange> mQueuedCatchUp;
421 std::unordered_map<int, std::vector<int>> mConvoyIndices;
422 std::unordered_set<int> mCatchUpVehicles;
423 std::unordered_set<unsigned int> mStoppedVehicles;
424 std::unordered_map<std::string, unsigned int> mNetworkToIndex;
425 std::unordered_map<unsigned int, TrafficInformation> mRoadInfo;
427};
428
429#include "UtScriptClass.hpp"
430#include "UtScriptClassDefine.hpp"
431
433class WSF_EXPORT WsfScriptOSM_TrafficClass : public UtScriptClass
434{
435public:
436 WsfScriptOSM_TrafficClass(const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
437
440 UT_DECLARE_SCRIPT_METHOD(IndividualRoute);
441 UT_DECLARE_SCRIPT_METHOD(VehiclesAlongRoute);
442 UT_DECLARE_SCRIPT_METHOD(NextPointInRoute);
443 UT_DECLARE_SCRIPT_METHOD(IntersectionFlow);
444 UT_DECLARE_SCRIPT_METHOD(IntersectionOnRoute);
445 UT_DECLARE_SCRIPT_METHOD(GetConnectedRoads);
446
447 UT_DECLARE_SCRIPT_METHOD(AddVehicleToTraffic);
448 UT_DECLARE_SCRIPT_METHOD(AddConvoyToTraffic);
452 UT_DECLARE_SCRIPT_METHOD(LockIntersection);
453 UT_DECLARE_SCRIPT_METHOD(UnlockIntersection);
455};
456
457#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfGeoPoint.hpp:29
Definition WsfMover.hpp:37
WsfOSM_TrafficInput()=default
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Definition WsfRoadMover.hpp:32
A collection of WsfRoute object that represents a connected network (such as a road network).
Definition WsfRouteNetwork.hpp:40
A collection of WsfWaypoint objects that represent a path to be followed.
Definition WsfRoute.hpp:40
UT_DECLARE_SCRIPT_METHOD(NextPointInRoute)
UT_DECLARE_SCRIPT_METHOD(IntersectionOnRoute)
UT_DECLARE_SCRIPT_METHOD(UnlockIntersection)
UT_DECLARE_SCRIPT_METHOD(IntersectionFlow)
UT_DECLARE_SCRIPT_METHOD(AddConvoyToTraffic)
UT_DECLARE_SCRIPT_METHOD(FollowRoute_2)
UT_DECLARE_SCRIPT_METHOD(AddVehicleToTraffic)
UT_DECLARE_SCRIPT_METHOD(TrafficRoutes)
UT_DECLARE_SCRIPT_METHOD(IndividualRoute)
UT_DECLARE_SCRIPT_METHOD(VehiclesAlongRoute)
UT_DECLARE_SCRIPT_METHOD(LockIntersection)
UT_DECLARE_SCRIPT_METHOD(FollowRoute_1)
UT_DECLARE_SCRIPT_METHOD(GoOffroad)
WsfScriptOSM_TrafficClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition XWsfOSM_Traffic.cpp:3238
UT_DECLARE_SCRIPT_METHOD(GetConnectedRoads)
UT_DECLARE_SCRIPT_METHOD(ChangeLane)
WsfSimulationExtension()
Definition WsfSimulationExtension.cpp:23
friend class WsfSimulation
Definition WsfSimulationExtension.hpp:43
virtual bool Initialize()
Definition WsfSimulationExtension.cpp:49
virtual void AddedToSimulation()
Definition WsfSimulationExtension.cpp:41
Definition WsfWaypoint.hpp:57
double mPrecedingTime
Definition XWsfOSM_Traffic.hpp:97
QueuedConvoyOperation(double aPrecedingTime, int aVehicleId, WsfRoute &aNewRoute, double aTime, bool aJump=false)
Definition XWsfOSM_Traffic.hpp:91
double mAddedTime
Definition XWsfOSM_Traffic.hpp:84
WsfRoute mNewRoute
Definition XWsfOSM_Traffic.hpp:83
bool mJump
Definition XWsfOSM_Traffic.hpp:85
int mVehicleId
Definition XWsfOSM_Traffic.hpp:82
QueuedOperation(int aVehicleId, WsfRoute &aNewRoute, double aTime, bool aJump=false)
Definition XWsfOSM_Traffic.hpp:74
bool mRoad
Definition XWsfOSM_Traffic.hpp:219
double mTime
Definition XWsfOSM_Traffic.hpp:218
std::string mName
Definition XWsfOSM_Traffic.hpp:217
QueuedRoadRelease(const std::string &aName, double aTime, bool aRoad)
Definition XWsfOSM_Traffic.hpp:208
bool operator<(const QueuedRoadRelease &aDetail2) const
Definition XWsfOSM_Traffic.hpp:215
QueuedSpeedChange(int aVehicleId, unsigned int aIndex, double aSpeed, double aTime)
Definition XWsfOSM_Traffic.hpp:103
int mVehicleId
Definition XWsfOSM_Traffic.hpp:111
double mSpeed
Definition XWsfOSM_Traffic.hpp:113
double mTime
Definition XWsfOSM_Traffic.hpp:114
unsigned int mIndex
Definition XWsfOSM_Traffic.hpp:112
TrackerDetails(int aId, double aDistance)
Definition XWsfOSM_Traffic.hpp:188
bool operator<(const TrackerDetails &aDetail2) const
Definition XWsfOSM_Traffic.hpp:193
double mDistanceAlongRoute
Definition XWsfOSM_Traffic.hpp:202
int mVehicleId
Definition XWsfOSM_Traffic.hpp:201
unsigned int mWaypointIndex
Definition XWsfOSM_Traffic.hpp:129
int mWeight
Definition XWsfOSM_Traffic.hpp:127
unsigned int mRouteIndex
Definition XWsfOSM_Traffic.hpp:128
WeightedRouteEdge(int aWeight, unsigned int aRouteIndex, unsigned int aWaypointIndex)
Definition XWsfOSM_Traffic.hpp:120
Definition XWsfOSM_Traffic.hpp:164
std::vector< WeightedRouteEdge > mEdges
Definition XWsfOSM_Traffic.hpp:174
std::vector< std::string > mSourceRoutes
Definition XWsfOSM_Traffic.hpp:175
double mWaitTime
Definition XWsfOSM_Traffic.hpp:176
WeightedRouteNode(const std::string &aId)
Definition XWsfOSM_Traffic.hpp:166
IntersectionRestriction mIntersection
Definition XWsfOSM_Traffic.hpp:177
bool operator==(const WeightedRouteNode &aOther) const
Definition XWsfOSM_Traffic.hpp:171
std::string mId
Definition XWsfOSM_Traffic.hpp:173
bool AddScriptedConvoy(const std::vector< WsfPlatform * > aPlatformList, const std::string &aNetworkName, WsfRoute *aRoute, double aInitialSpacing)
Definition XWsfOSM_Traffic.cpp:774
std::vector< WsfRoute * > GetConnectedRoutes(const std::string &aNetworkName, const std::string &aNodeId)
Definition XWsfOSM_Traffic.cpp:696
XWsfOSM_Traffic(WsfOSM_TrafficInput &aData)
Definition XWsfOSM_Traffic.cpp:154
void ScriptGoOffroad(WsfPlatform *aVehicle, const WsfGeoPoint &aGeoPoint)
Definition XWsfOSM_Traffic.cpp:1013
IntersectionRestriction
Definition XWsfOSM_Traffic.hpp:65
@ cNONE
Definition XWsfOSM_Traffic.hpp:66
std::vector< WsfPlatform * > GetPlatformsAlongRoute(const std::string &aNetworkName, const std::string &aRouteName)
Definition XWsfOSM_Traffic.cpp:615
bool ScriptLockIntersection(const std::string &aNetworkName, const std::string &aNodeId)
Definition XWsfOSM_Traffic.cpp:963
bool ChangeScriptedLane(WsfPlatform *aPlatformPtr, bool aDirection)
Definition XWsfOSM_Traffic.cpp:886
void AdvanceTime(double aSimTime)
Definition XWsfOSM_Traffic.cpp:1042
void UpdateScriptedVehicleRoute(WsfPlatform *aPlatformPtr, WsfRoute *aRoute, int aWaypointIndex=0)
Definition XWsfOSM_Traffic.cpp:854
static std::unique_ptr< UtScriptClass > CreateScriptClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition XWsfOSM_Traffic.cpp:285
std::vector< WsfRoute * > GetRoutesOnNetwork(const std::string &aNetworkName)
Definition XWsfOSM_Traffic.cpp:576
std::string GetTrafficFlow(double aSimTime, const std::string &aNetworkName, const std::string &aNodeId)
Definition XWsfOSM_Traffic.cpp:657
XWsfOSM_Traffic(const XWsfOSM_Traffic &aRoadTraffic)=delete
bool AddScriptedVehicle(WsfPlatform *aPlatformPtr, const std::string &aNetworkName, WsfRoute *aRoute, int &aVehicleNumber)
Definition XWsfOSM_Traffic.cpp:723
XWsfOSM_Traffic & operator=(const XWsfOSM_Traffic &aRoadTraffic)=delete
std::string GetNodeOnRoute(const std::string &aNetworkName, const std::string &aRouteName, bool aFirstOrLast)
Definition XWsfOSM_Traffic.cpp:681
WsfWaypoint * GetNextWaypoint(const std::string &aNetworkname, const std::string &aRouteName, double aDistance)
Definition XWsfOSM_Traffic.cpp:633
static XWsfOSM_Traffic * Find(const WsfSimulation &aSimulation)
Definition XWsfOSM_Traffic.cpp:184
WsfRoute * GetIndividualRoute(const std::string &aNetworkName, const std::string &aBaseName, int aLaneNumber=1, bool aDirection=true, int aSegmentNumber=1)
Definition XWsfOSM_Traffic.cpp:591
bool ScriptUnlockIntersection(const std::string &aNetworkName, const std::string &aNodeId)
Definition XWsfOSM_Traffic.cpp:989
Definition XWsfOSM_Traffic.hpp:154
std::size_t operator()(const RoutePair &aNode) const
Definition XWsfOSM_Traffic.hpp:155
Definition XWsfOSM_Traffic.hpp:133
RoutePair(const std::string &aSource, const std::string &aDestination, const std::string &aNodeId)
Definition XWsfOSM_Traffic.hpp:135
std::string mDestinationRoute
Definition XWsfOSM_Traffic.hpp:149
bool operator==(const RoutePair &aOther) const
Definition XWsfOSM_Traffic.hpp:142
std::string mSourceRoute
Definition XWsfOSM_Traffic.hpp:148
std::string mNodeId
Definition XWsfOSM_Traffic.hpp:150
Definition XWsfOSM_Traffic.hpp:45
int mConvoyNumber
Definition XWsfOSM_Traffic.hpp:55
bool mScripted
Definition XWsfOSM_Traffic.hpp:61
int mNetwork
Is this vehicle alive?
Definition XWsfOSM_Traffic.hpp:49
bool mAtIntersection
Definition XWsfOSM_Traffic.hpp:57
double mSpeed
Index value of network vehicle is traveling on.
Definition XWsfOSM_Traffic.hpp:50
bool mConvoyVehicle
Definition XWsfOSM_Traffic.hpp:53
std::string mCurrentRouteName
Was this vehicle defined as a convoy vehicle?
Definition XWsfOSM_Traffic.hpp:54
int mIdentifier
Definition XWsfOSM_Traffic.hpp:46
size_t mRoadPlatformIndex
Definition XWsfOSM_Traffic.hpp:52
WsfPlatform * mRoadPlatform
Speed (meters/sec).
Definition XWsfOSM_Traffic.hpp:51
bool mAlive
Vehicle type.
Definition XWsfOSM_Traffic.hpp:48
bool mCatchUp
Definition XWsfOSM_Traffic.hpp:56
WsfStringId mVehicleTypeId
Unique identifier for ground vehicle.
Definition XWsfOSM_Traffic.hpp:47
Definition XWsfOSM_Traffic.hpp:181
std::size_t operator()(const WeightedRouteNode &aNode) const
Definition XWsfOSM_Traffic.hpp:182
Copyrights Multiple, All Rights Reserved