Class NegotiatingRouteValidator¶
Defined in File RouteValidator.hpp
Nested Relationships¶
Nested Types¶
Inheritance Relationships¶
Base Type¶
public rmf_traffic::agv::RouteValidator(Class RouteValidator)
Class Documentation¶
-
class
rmf_traffic::agv::NegotiatingRouteValidator: public rmf_traffic::agv::RouteValidator¶ Public Functions
-
NegotiatingRouteValidator &
mask(schedule::ParticipantId id)¶ Mask the given Participant so that conflicts with it will be ignored. In the current implementation, only one participant can be masked at a time.
- Parameters
[in] id: The ID of a participant whose conflicts should be ignored when checking for collisions.
-
NegotiatingRouteValidator &
remove_mask()¶ Remove any mask that has been applied using the mask() function.
-
NegotiatingRouteValidator
next(schedule::ParticipantId id) const¶ Get a NegotiatingRouteValidator for the next rollout alternative offered by the given participant.
-
const schedule::Negotiation::VersionedKeySequence &
alternatives() const¶ Get the set of child Table alternatives used by this NegotiatingRouteValidator.
-
operator bool() const¶ Implicitly cast this validator instance to true if it can be used as a validator. If it cannot be used as a validator, return false. This will have the opposite value of end().
-
bool
end() const¶ Return true if this validator object has gone past the end of its limits. Return false if it can still be used as a validator.
-
virtual rmf_utils::optional<Conflict>
find_conflict(const Route &route) const final¶ If the specified route has a conflict with another participant, this will return the participant ID for the first conflict that gets identified. Otherwise it will return a nullopt.
- Parameters
[in] route: The route that is being checked.
-
virtual std::unique_ptr<RouteValidator>
clone() const final¶ Create a clone of the underlying RouteValidator object.
-
class
Generator¶ The Generator class begins the creation of NegotiatingRouteValidator instances. NegotiatingRouteValidator may be able to brach in multiple dimensions because of the rollout alternatives that are provided during a rejection.
Public Functions
-
Generator(schedule::Negotiation::Table::ViewerPtr viewer, rmf_traffic::Profile profile)¶ Constructor
This version is safe to use even if the participant being negotiated for is not in the schedule yet.
- Parameters
[in] viewer: A viewer for the Negotiation Table that the generated validators are concerned with[in] profile: The profile of the participant whose routes are being validated.
-
Generator(schedule::Negotiation::Table::ViewerPtr viewer)¶ Constructor
This version looks for the participant in the schedule to find its profile.
- Parameters
[in] table: A viewer for the Negotiation Table that the generated validators are concerned with
-
Generator &
ignore_unresponsive(bool val = true)¶ Toggle whether to ignore “unresponsive” (also called “read-only”) schedule participants when determining conflicts. By default, conflicts with unresponsive participants will be caught.
-
Generator &
ignore_bystanders(bool val = true)¶ Toggle whether to ignore “bystanders” which means schedule participants that are not being involved in the negotiation. By default, conflicts with bystanders will be caught.
-
NegotiatingRouteValidator
begin() const¶ Start with a NegotiatingRouteValidator that will use all the most preferred alternatives from every participant.
-
std::vector<rmf_utils::clone_ptr<NegotiatingRouteValidator>>
all() const¶ Get all the Negotiating Route Validators that can be generated.
-
const std::vector<schedule::ParticipantId> &
alternative_sets() const¶ Get the set of participants who have specified what their available rollouts are.
-
std::size_t
alternative_count(schedule::ParticipantId participant) const¶ Get the number of alternative rollouts for the specified participant. This function will throw an excpetion if participant does not offer an alternative set.
-
-
NegotiatingRouteValidator &