10namespace traffic_manager {
15using Buffer = std::deque<SimpleWaypointPtr>;
49 const std::vector<SimpleWaypointPtr> waypoints);
void UpdatePassingVehicle(uint64_t waypoint_id, ActorId actor_id)
Methods to update, remove and retrieve vehicles passing through a waypoint.
cg::Location GetHeroLocation() const
std::unordered_map< ActorId, std::unordered_set< GeoGridId > > actor_to_grids
Geodesic grids occupied by actors's paths.
WaypointOverlap waypoint_overlap_tracker
void UpdateGridPosition(const ActorId actor_id, const Buffer &buffer)
ActorIdSet GetPassingVehicles(uint64_t waypoint_id) const
cg::Location hero_location
Current hero location.
std::unordered_map< uint64_t, ActorIdSet > WaypointOverlap
Structure to keep track of overlapping waypoints between vehicles.
ActorIdSet GetOverlappingVehicles(ActorId actor_id) const
bool IsGeoGridFree(const GeoGridId geogrid_id) const
std::unordered_set< uint64_t > WaypointIdSet
Structure to keep track of waypoints occupied by vehicles;
void UpdateUnregisteredGridPosition(const ActorId actor_id, const std::vector< SimpleWaypointPtr > waypoints)
std::unordered_map< ActorId, WaypointIdSet > WaypointOccupancyMap
void RemovePassingVehicle(uint64_t waypoint_id, ActorId actor_id)
void DeleteActor(ActorId actor_id)
Method to delete actor data from tracking.
WaypointOccupancyMap waypoint_occupied
void AddTakenGrid(const GeoGridId geogrid_id, const ActorId actor_id)
void SetHeroLocation(const cg::Location location)
std::unordered_map< GeoGridId, ActorIdSet > grid_to_actors
Actors currently passing through grids.
std::deque< std::shared_ptr< SimpleWaypoint > > Buffer
std::shared_ptr< SimpleWaypoint > SimpleWaypointPtr
std::unordered_set< ActorId > ActorIdSet
This file contains definitions of common data structures used in traffic manager.