pub struct MoCbsConfig {
pub tree_by_tree: bool,
pub low_level: LowLevel,
pub feasibility_check: bool,
pub prioritize_conflicts: bool,
pub bypass: bool,
pub splitting: Splitting,
}Expand description
How mo_cbs_with orders the high-level search, which low level it uses and which
improvements it applies.
Every configuration returns the same front; they differ in effort. The default is
MoCbsConfig::improved, what mo_cbs uses.
use mapf_search::{Agent, Grid, Instance, Limits, MoCbsConfig, ParetoOutcome, mo_cbs_with};
// Two agents swap the ends of a corridor: no plan exists.
let grid = Grid::new(3, 1);
let agents = vec![Agent { start: 0, goal: 2 }, Agent { start: 2, goal: 0 }];
let instance = Instance::new(grid, agents)?;
let costs = |_: usize, _: usize| [1, 1];
// The paper's MO-CBS only stops at its budget; the feasibility check proves it.
let plain = mo_cbs_with(&instance, &costs, MoCbsConfig::plain(), Limits::expansions(100));
let improved = mo_cbs_with(&instance, &costs, MoCbsConfig::improved(), Limits::NONE);
assert_eq!(plain.outcome, ParetoOutcome::LimitReached);
assert_eq!(improved.outcome, ParetoOutcome::Unsolvable);Fields§
§tree_by_tree: boolTree-by-tree expansion (MO-CBS-t): generate one root at a time and exhaust its tree before the next. Plain MO-CBS generates every root up front, which is the product of the agents’ Pareto set sizes, and expands across all trees.
low_level: LowLevelThe single-agent multi-objective planner.
feasibility_check: boolBefore the search, prove infeasible instances ParetoOutcome::Unsolvable (paper,
Sec. VII-B): feasibility does not depend on the costs, so recursive M* with unit
costs decides it, under the same budget with M*’s counters. If that budget runs out,
the search goes on without the proof.
prioritize_conflicts: boolSplit cardinal conflicts first, then semi-cardinal ones, then the rest (earliest first within a class). A conflict is cardinal for an agent if every path of the agent’s current Pareto set takes part in it.
bypass: boolBypass: when a child’s replanned agents each have a path of the parent’s cost that leaves fewer conflicts, take those paths over instead of splitting.
splitting: SplittingHow a conflict is split into children. Splitting::Disjoint constrains the agent
for which the conflict is cardinal if only one is, else the conflict’s first agent.
Implementations§
Source§impl MoCbsConfig
impl MoCbsConfig
Sourcepub const fn plain() -> Self
pub const fn plain() -> Self
Plain MO-CBS, Alg. 1 of the paper: all roots up front, BOA* for two objectives, no improvements.
Sourcepub const fn tree_by_tree() -> Self
pub const fn tree_by_tree() -> Self
MO-CBS-t, as in the paper: one tree at a time, BOA* for two objectives, no improvements.