Class SimpleNegotiator::Options¶
Defined in File SimpleNegotiator.hpp
Nested Relationships¶
This class is a nested type of Class SimpleNegotiator.
Class Documentation¶
-
class
rmf_traffic::agv::SimpleNegotiator
::
Options
A class to specify user-defined options for the Negotiator.
Public Types
-
using
ApprovalCallback
= std::function<Responder::UpdateVersion(rmf_traffic::agv::Plan)>
Public Functions
Constructor
- Parameters
[in] approval_cb
: The callback that will be triggered if the proposal is approved.[in] maximum_cost_leeway
: The initial cost estimate for each planning attempt will be multiplied by this factor to determine the maximum cost estimate that will be allowed for a plan before giving up.[in] maximum_alts
: The maximum number of alternatives to produce when rejecting a proposal from another negotiator.[in] min_hold_time
: The minimum amount of time that the planner should spend waiting at holding points. See Planner::Options for more information.
-
Options &
approval_callback
(ApprovalCallback cb) Set the approval callback.
Set the interrupt flag.
-
const std::shared_ptr<const bool> &
interrupt_flag
() const Get the interrupt flag.
-
Options &
maximum_cost_leeway
(std::optional<double> leeway) Set the maximum cost leeway.
-
std::optional<double>
maximum_cost_leeway
() const Get the maximum cost leeway.
-
Options &
minimum_cost_threshold
(std::optional<double> cost) Set the minimum cost threshold. When this and maximum_cost_leeway are both set, the maximum cost estimate will be chosen by std::max( minimum_cost_threshold, initial_cost_estimate * maximum_cost_leeway )
By default, this is DefaultMinCostThreshold.
-
std::optional<double>
minimum_cost_threshold
() const Get the minimum cost threshold.
-
Options &
maximum_cost_threshold
(std::optional<double> cost) Set the maximum cost threshold. When this is set, the cost will not be allowed to exceed it, even if the maximum cost leeway would allow it. By default, this is nullopt.
-
std::optional<double>
maximum_cost_threshold
() const Get the maximum cost threshold.
-
Options &
maximum_alternatives
(rmf_utils::optional<std::size_t> num)
-
std::optional<std::size_t>
maximum_alternatives
() const
-
Options &
minimum_holding_time
(Duration holding_time) Set the minimum amount of time to spend waiting at holding points.
-
Duration
minimum_holding_time
() const Get the minimum amount of time to spend waiting at holding points.
Public Static Attributes
-
static constexpr double
DefaultMaxCostLeeway
= 1.5
-
static constexpr double
DefaultMinCostThreshold
= 30.0
-
using