Class Rollout
Defined in File Rollout.hpp
Class Documentation
-
class Rollout
The Rollout class complements the Planner class. The Planner class may sometimes fail to find a feasible plan because of other traffic participants blocking the way. The rollout class can take a Planner::Result and expand sets of alternative routes that would be feasible in the absence of a blocker. Given these sets of alternatives,
Public Functions
-
Rollout(Planner::Result result)
Constructor
- Parameters:
result – [in] The Planning Result that should be rolled out.
-
std::vector<schedule::Itinerary> expand(schedule::ParticipantId blocker, rmf_traffic::Duration span, const Planner::Options &options, rmf_utils::optional<std::size_t> max_rollouts = rmf_utils::nullopt) const
Expand the Planning Result through the specified blocker.
- Parameters:
blocker – [in] The blocking participant that should be expanded through. If this participant wasn’t actually blocking, then the returned vector will be empty.
span – [in] How far into the future the rollout should continue. Once a rollout extends this far, it will stop wherever it is.
options – [in] The options to use while expanding. NOTE: It is important to provide a RouteValidator that will ignore the blocker, otherwise the expansion might not give back any useful results.
max_rollouts – [in] The maximum number of rollouts to produce.
- Returns:
a collection of itineraries from the original Planning Result’s starts past the blockages that were caused by the specified blocker.
-
std::vector<schedule::Itinerary> expand(schedule::ParticipantId blocker, rmf_traffic::Duration span, rmf_utils::optional<std::size_t> max_rollouts = rmf_utils::nullopt) const
Expand the Planning Result through the specified behavior. Use the Options that are already tied to the Planning Result.
Warning
It is critical to change the validator in the Planner Result Options before giving it to the Rollout if you want to use this method. Otherwise there will not be any expansion through the blocker.
- Parameters:
blocker – [in] The blocking participant that should be expanded through. If this participant wasn’t actually blocking, then the returned vector will be empty.
span – [in] How far into the future the rollout should continue. Once a rollout extends this far, it will stop wherever it is.
max_rollouts – [in] The maximum number of rollouts to produce.
- Returns:
a collection of itineraries from the original Planning Result’s starts past the blockages that were caused by the specified blocker.
-
Rollout(Planner::Result result)