mapf_search/lib.rs
1//! # Multi-agent pathfinding
2//!
3//! Multi-agent pathfinding: CBS, ECBS, CBS-TA, ICTS, PBS, M* and MAPF-LNS2.
4//!
5//! ## Planned scope
6//!
7//! - Conflict-based: CBS, ECBS, CBS-TA
8//! - Cost-vector search: ICTS
9//! - Priority-based: PBS
10//! - Subdimensional: M*
11//! - Local repair: MAPF-LNS2
12//! - Partial expansion: EPEA*
13//!
14//! ## Status
15//!
16//! Pre-release. Version 0.0.0 reserves the name; the API is not started yet and will change.
17//!
18//! Repository: <https://github.com/sunsided/mapf-search>
19
20#![no_std]
21
22/// A conflict between the paths of two agents.
23#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
24pub enum Conflict<V> {
25 /// Both agents occupy `vertex` at `time`.
26 Vertex {
27 /// The two agents.
28 agents: (usize, usize),
29 /// The shared vertex.
30 vertex: V,
31 /// The time step.
32 time: u32,
33 },
34 /// The agents swap `from` and `to` between `time` and `time + 1`.
35 Edge {
36 /// The two agents.
37 agents: (usize, usize),
38 /// The vertex the first agent leaves.
39 from: V,
40 /// The vertex the first agent enters.
41 to: V,
42 /// The time step at which the swap starts.
43 time: u32,
44 },
45}