Class Table::Viewer¶
Defined in File Negotiation.hpp
Nested Relationships¶
This class is a nested type of Class Negotiation::Table.
Nested Types¶
Class Documentation¶
-
class
rmf_traffic::schedule::Negotiation::Table
::
Viewer
Public Types
-
using
AlternativeMap
= std::unordered_map<ParticipantId, std::shared_ptr<Alternatives>>
Public Functions
-
View
query
(const Query::Spacetime ¶meters, const VersionedKeySequence &alternatives) const View this table with the given parameters.
- Parameters
[in] parameters
: The spacetime parameters to filter irrelevant routes out of the view[in] rollouts
: The selection of which rollout alternatives should be viewed for the participants who have rejected this proposal in the past.
-
std::unordered_map<ParticipantId, Endpoint>
initial_endpoints
(const VersionedKeySequence &alternatives) const Get the set of initial waypoints for the negotiation participants.
-
std::unordered_map<ParticipantId, Endpoint>
final_endpoints
(const VersionedKeySequence &alterantives) const Get the set of final waypoints for the negotiation participants.
-
const AlternativeMap &
alternatives
() const When a Negotiation::Table is rejected by one of the participants who is supposed to respond, they can offer a set of rollout alternatives. If the proposer can accommodate one of the alternatives for each responding participant, then the negotiation might be able to proceed. This map gives the alternatives for each participant that has provided them.
-
const Proposal &
base_proposals
() const The proposals submitted to the predecessor tables.
-
std::shared_ptr<const ParticipantDescription>
get_description
(ParticipantId participant_id) const Get the description of a participant in this Viewer.
-
ParticipantId
participant_id
() const Get the Participant ID of the participant who should submit to this table.
-
rmf_utils::optional<ParticipantId>
parent_id
() const If the Table has a parent, get its Participant ID.
-
const VersionedKeySequence &
sequence
() const The sequence of the table that is being viewed.
-
bool
defunct
() const Returns true if the table of this viewer is no longer relevant. Unlike the other fields of the Viewer, this is not a snapshot of the table’s state when the Viewer was created; instead this defunct status will remain in sync with the state of the source Table.
-
bool
rejected
() const Returns true if the proposal put on this Table has been rejected.
-
bool
forfeited
() const Returns true if the proposer for this Table has forfeited.
-
const Itinerary *
submission
() const Return the submission on this Negotiation Table if it has one.
-
std::optional<rmf_traffic::Time>
earliest_base_proposal_time
() const The earliest start time of any of the proposals in the table.
-
std::optional<rmf_traffic::Time>
latest_base_proposal_time
() const The latest finish time of any of the proposals in the table.
-
class
Endpoint
View the first or last (depending on context) waypoint in a negotiation participant’s itinerary or alternative.
Public Functions
-
ParticipantId
participant
() const The ID of the participant.
-
PlanId
plan_id
() const The ID of the plan for this endpoint.
-
RouteId
route_id
() const The ID of the route for this endpoint.
-
const rmf_traffic::Trajectory::Waypoint &
waypoint
() const The first or last (depending on context) waypoint.
-
const std::string &
map
() const The map that the endpoint is on.
-
const ParticipantDescription &
description
() const The description of the participant.
-
ParticipantId
-
using