Class Route

Class Documentation

class Route

A route on the schedule. This is used as a component of a schedule participant’s itinerary.

Public Functions

Route(std::string map, Trajectory trajectory)

Constructor

Parameters:
  • map[in] The map that the trajectory is on

  • trajectory[in] The scheduled trajectory

Route &map(std::string value)

Set the map for this route.

const std::string &map() const

Get the map for this route.

Route &trajectory(Trajectory value)

Set the trajectory for this route.

Trajectory &trajectory()

Get the trajectory for this route.

const Trajectory &trajectory() const

Get the trajectory for this immutable route.

Route &checkpoints(std::set<uint64_t> value)

Set the checkpoints for this route. A checkpoint is a waypoint within this route which will explicitly trigger an traffic event update when it is reached.

std::set<uint64_t> &checkpoints()

Get the checkpoints for this route.

const std::set<uint64_t> &checkpoints() const

Get the checkpoints for this immutable route.

Route &dependencies(DependsOnParticipant value)

Set the dependencies of the route.

DependsOnParticipant &dependencies()

Get the dependencies of the route.

const DependsOnParticipant &dependencies() const

Get the dependencies of the immutable route.

Route &add_dependency(CheckpointId dependent_checkpoint, Dependency dependency)

Tell this route that it has a dependency on the checkpoint of another participant’s route.

Parameters:
  • dependent_checkpoint[in] The checkpoint inside of this route which has a dependency on the other participant’s route.

  • on_participant[in] The other participant which this route is depending on.

  • on_plan[in] The ID of the other participant’s plan that this route is depending on.

  • on_route[in] The ID of the other participant’s route that this robot is depending on.

  • on_checkpoint[in] The ID of the checkpoint

bool should_ignore(ParticipantId participant, PlanId plan) const

True if this route should ignore information about the given (participant, plan) pair. If this route has a dependency on a plan from this participant with a higher ID value, then this will return true. Otherwise it returns false.

const DependsOnCheckpoint *check_dependencies(ParticipantId on_participant, PlanId on_plan, RouteId on_route) const

Get any dependencies that this route has on the given route of another participant.

Parameters:
  • on_participant[in] The ID of the other participant of interest

  • on_plan[in] The ID of the other participant’s current plan

  • on_route[in] The ID of the other participant’s route that is being considered

Returns:

A pointer to the relevant dependencies, if any exist. If there is no dependency relevant to the specified route of the participant, then this will be a nullptr.