Class Negotiator::Responder
Defined in File Negotiator.hpp
Nested Relationships
This class is a nested type of Class Negotiator.
Inheritance Relationships
Derived Type
public rmf_traffic::schedule::SimpleResponder
(Class SimpleResponder)
Class Documentation
-
class Responder
A pure abstract interface class that allows the Negotiator to respond to other Negotiators.
Subclassed by rmf_traffic::schedule::SimpleResponder
Public Types
-
using ParticipantId = rmf_traffic::schedule::ParticipantId
-
using ItineraryVersion = rmf_traffic::schedule::ItineraryVersion
-
using UpdateVersion = rmf_utils::optional<ItineraryVersion>
-
using ApprovalCallback = std::function<UpdateVersion()>
-
using Alternatives = Negotiation::Alternatives
Public Functions
-
virtual void submit(PlanId plan_id, std::vector<Route> itinerary, ApprovalCallback approval_callback = nullptr) const = 0
The negotiator will call this function when it has an itinerary to submit in response to a negotiation.
- Parameters:
plan_id – [in] A unique ID that refers to the plan that is being submitted.
itinerary – [in] The itinerary that is being proposed
approval_callback – [in] This callback will get triggered if this submission gets approved. The return value of the callback should be the itinerary version of the participant update that will follow the resolution of this negotiation (or a nullopt if no update will be performed). Pass in a nullptr if an approval callback is not necessary.
-
virtual void reject(const Alternatives &alternatives) const = 0
The negotiator will call this function if it has decided to reject an attempt to negotiate. It must supply a set of alternatives for the parent negotiator to consider for its next proposal.
-
virtual void forfeit(const std::vector<ParticipantId> &blockers) const = 0
The negotiator will call this function if it cannot find any feasible proposal or alternative that can be accommodated by the parent.
- Parameters:
blockers – [in] Give the set of schedule participants that are blocking a solution from being found.
-
virtual ~Responder() = default
-
using ParticipantId = rmf_traffic::schedule::ParticipantId