Multi-Agent Path Finding with Capacity Constraints
Pavel Surynek, T. K. Satish Kumar, Sven Koenig

TL;DR
This paper extends multi-agent path finding (MAPF) to allow multiple agents per vertex by modeling capacity constraints in SAT-based formulations, evaluating their performance and proposing new models.
Contribution
It introduces SAT-based models for MAPF with capacity constraints, extending existing formulations to handle multiple agents per vertex.
Findings
Extended SAT models for MAPF with capacity constraints.
Performance evaluation of new SAT-based formulations.
Comparison of eager and lazy modeling approaches.
Abstract
In multi-agent path finding (MAPF) the task is to navigate agents from their starting positions to given individual goals. The problem takes place in an undirected graph whose vertices represent positions and edges define the topology. Agents can move to neighbor vertices across edges. In the standard MAPF, space occupation by agents is modeled by a capacity constraint that permits at most one agent per vertex. We suggest an extension of MAPF in this paper that permits more than one agent per vertex. Propositional satisfiability (SAT) models for these extensions of MAPF are studied. We focus on modeling capacity constraints in SAT-based formulations of MAPF and evaluation of performance of these models. We extend two existing SAT-based formulations with vertex capacity constraints: MDD-SAT and SMT-CBS where the former is an approach that builds the model in an eager way while the latter…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
11institutetext: Faculty of Information Technology, Czech Technical University in Prague
Thákurova 9, 160 00 Praha 6, Czechia
11email: [email protected]
http://users.fit.cvut.cz/surynek 22institutetext: University of Southern California, Henry Salvatori Computer Science Center
941 Bloom Walk, Los Angeles, USA
22email: [email protected] 33institutetext: University of Southern California, Information Sciences Institute
4676 Admiralty Way, Marina del Rey, USA
33email: [email protected]
Multi-Agent Path Finding with Capacity Constraints
Pavel Surynek 11 0000-0001-7200-0542
T. K. Satish Kumar 22
Sven Koenig 33
Abstract
In multi-agent path finding (MAPF) the task is to navigate agents from their starting positions to given individual goals. The problem takes place in an undirected graph whose vertices represent positions and edges define the topology. Agents can move to neighbor vertices across edges. In the standard MAPF, space occupation by agents is modeled by a capacity constraint that permits at most one agent per vertex. We suggest an extension of MAPF in this paper that permits more than one agent per vertex. Propositional satisfiability (SAT) models for these extensions of MAPF are studied. We focus on modeling capacity constraints in SAT-based formulations of MAPF and evaluation of performance of these models. We extend two existing SAT-based formulations with vertex capacity constraints: MDD-SAT and SMT-CBS where the former is an approach that builds the model in an eager way while the latter relies on lazy construction of the model.
Keywords:
multi agent path finding, propositional satisfiability (SAT), capacity constraints, cardinality constraints
1 Introduction
In multi-agent path finding (MAPF) [9, 18, 19, 21, 24, 28, 33] the task is to navigate agents from given starting positions to given individual goals. The standard version of the problem takes place in undirected graph where agents from set are placed in vertices with at most one agent per vertex. The initial configuration of agents in vertices of the graph can be written as and similarly the goal configuration as . The task of navigating agents can be expressed as a task of transforming the initial configuration of agents into the goal configuration .
Movements of agents are instantaneous and are possible across edges into neighbor vertices assuming no other agent is entering the same target vertex. This formulation permits agents to enter vertices being simultaneously vacated by other agents. Trivial case when a pair of agents swaps their positions across an edge is forbidden in the standard formulation. We note that different versions of MAPF exist where for example agents always move into vacant vertices [29]. We usually denote the configuration of agents at discrete time step as . Non-conflicting movements transform configuration instantaneously into next configuration . We do not consider what happens between and in this discrete abstraction. Multiple agents can move at a time hence the MAPF problem is inherently parallel.
In order to reflect various aspects of real-life applications variants of MAPF have been introduced such as those considering kinematic constraints [8], large agents [11], or deadlines [14] - see [13] for more variants.
Particularly in this work we are dealing with an extension of MAPF that generalizes the constraint of having at most one agent per vertex. There are many situations where we need to model nodes that could hold more than agent at a time. Such situations include various graph-based evacuation models where for example nodes correspond to rooms in evacuated buildings [10] which naturally can hold more than one agent. Various spatial projections could also lead to having multiple agents per vertex such as upper projection of agents representing aerial drones where a single node corresponds to ,-coordinate that could hold multiple agents at different -coordinates [12]. Generally the need to consider nodes capable of containing multiple agents appears in modeling of multi-agent motion planning task at higher levels of granularity.
1.1 Contributions
The contribution of this paper consists in showing how to generalize existing propositional satisfiability (SAT) [4] models of MAPF for finding optimal plans with general capacity constraints that bound the number of agents in vertices. Two existing SAT-based models are generalized: MDD-SAT [32] that builds the propositional model in an eager way and SMT-CBS [30, 31] that builds the model in a lazy way inspired by satisfiability modulo theories (SMT) [16].
The eager style of building the propositional model means that all constraints are posted into the model in advance. Such model is complete that is, it is solvable (satisfiable) if and only if the instance being modeled is solvable. In contrast to this, the lazy style does not add all constraints at once and works with incomplete models. The incomplete model preserve only one-sided implication w.r.t. solvability: if the instance being modeled is solvable then the incomplete model is solvable (satisfiable).
The SMT-CBS algorithm iteratively refines the incomplete model towards the complete one by eliminating conflicts. That is, a candidate solution is extracted from the satisfied incomplete model. The candidate is checked for conflicts - whether any of the MAPF rules is violated - for example if a collision between agents occurred. If there are no conflicts, we are finished as the candidate is a valid solution of the input MAPF instance. If a conflict is detected, then a constraint that eliminates this particular conflict is added to the incomplete model resulting in a new model and the process is repeated. That is, a new candidate solution is extracted from the new model etc. Eventually the process may end up with a complete model after eliminating all possible conflicts. However, we hope that the process finishes before constructing a complete model and we solve the instance with less effort.
In the presented generalization with capacity constraints we need to distinguish between the eager and lazy variant. The capacity constraint concerning given vertex bounding the number of agents that can simultaneously occupy by some integer constant say can be literally translated into the requirement that no distinct agents can occupy at the same time. Such a constraint can be directly posted in the eager variant: we either forbid all possible triples of agents in or post the corresponding cardinality constraint [3, 23].
The situation is different in the lazy variant. To preserve the nature of the lazy approach we cannot post the capacity bound entirely as conceptually at the low level as we are informed only about a particular MAPF rule violation, say for example agents , and occurred simultaneously in which is forbidden in given MAPF. The information that there is a capacity constraint on bounding the number of agents in by may even not be accessible at the low level. Hence we can forbid simultaneous occurrence of only the given triple of agents, , and in this case.
The paper is organized as follows. We first introduce the standard multi-agent path finding problem formally including commonly used objectives. Then we introduce two major existing SAT-based encodings. On top of this, we show how to extend these encodings with vertex capacities. Finally we evaluate extended models on standard benchmarks including open grids and large game maps.
2 Formal Definition of MAPF and Vertex Capacities
The Multi-agent path finding (MAPF) problem [24, 18] consists of an undirected graph and a set of agents such that . Each agent is placed in a vertex so that at most one agent resides in each vertex. The placement of agents is denoted . Next we are given initial configuration of agents and goal configuration .
At each time step an agent can either move to an adjacent vertex or wait in its current vertex. The task is to find a sequence of move/wait actions for each agent , moving it from to such that agents do not conflict, i.e., do not occupy the same location at the same time nor cross the same edge in opposite directions simultaneously. The following definition formalizes the commonly used movement rule in MAPF.
Definition 1
Valid movement in MAPF. Configuration results from if and only if the following conditions hold:
- (i)
or for all (agents wait or move along edges); 2. (ii)
for all it holds (no two agents crosses an edge in opposite directions); 3. (iii)
and for all it holds that (no two agents share a vertex in the next configuration).
Solving the MAPF instance is to find a sequence of configurations such that results using valid movements from for , and .
A version of MAPF with vertex capacities generalizes the above definition by adding capacity function that assigns each vertex a positive integer capacity. The interpretation is that a vertex can hold up to the specified number of agents at any time-step.
The definition of the valid movement will change only in point (iii) where instead of permitting at most one agent per vertex we allow any number of agents not exceeding the capacity of the vertex:
Definition 2
Vertex capacities in MAPF.
- (iii’)
for all it holds that (the number of agents in each vertex does not exceed the capacity in the next configuration).
Using generalized vertex capacities relaxes the problem in fact as illustrated in Figure 1. Intuitively, capacities greater than one induce additional parking place in the environment which we hypothetise to make the problem easier to solve.
2.1 Common Objectives in MAPF
We address here optimal MAPF solving hence we need to introduce objective functions more formally. In case of makespan [29] we just need to minimize in the aforementioned solution sequence. For introducing the sum-of-costs objective [7, 26, 21, 19] we need the following notation:
Definition 3
Sum-of-costs objective is the summation, over all agents, of the number of time steps required to reach the goal vertex. Denoted , where , where is an individual path cost of agent connecting calculated as the number of edge traversals and wait actions. 111The notation refers to path in the form of a sequence of vertices and edges connecting and while assigns the cost to a given path.
Observe that in the sum-of-costs we accumulate the cost of wait actions for agents not yet reaching their goal vertices. For the sake of brevity we focus here on the sum-of-costs, but we note that all new concepts can be introduced for different cumulative objectives like the makespan.222Dealing with objectives is out of scope of this paper. We refer the reader to [32] for more detailed discussion.
We note that finding a solution that is optimal (minimal) with respect to the sum-of-costs objective is NP-hard [17]. The same result holds for the variant with capacities as it is a straight generalization of the standard MAPF version.
3 Related Work
Let us now recall existing SAT-based optimal MAPF solvers. We here focus on aspects important for introducing capacities. We recall MDD-SAT the sum-of-costs optimal solver based on eager SAT encoding [32] and SMT-CBS [31], the most recent SAT-based, or more precisely SMT-based, algorithm using lazy encoding.
3.1 SAT-based Approach
The idea behind the SAT-based approach is to construct a propositional formula such that it is satisfiable if and only if a solution of a given MAPF of sum-of-costs exists [29]. Moreover, the approach is constructive; that is, exactly reflects the MAPF instance and if satisfiable, solution of MAPF can be reconstructed from satisfying assignment of the formula. We say to be a complete propositional model of MAPF.
Definition 4
(complete propositional model). Propositional formula is a complete propositional model of MAPF if the following condition holds:
is satisfiable has a solution of sum-of-costs .
Being able to construct such formula one can obtain optimal MAPF solution by checking satisfiability of , , ,… until the first satisfiable is met. This is possible due to monotonicity of MAPF solvability with respect to increasing values of common cumulative objectives like the sum-of-costs. In practice it is however impractical to start at 0; lower bound estimation is used instead - sum of lengths of shortest paths can be used in the case of sum-of-costs. The framework of SAT-based solving is shown in pseudo-code in Algorithm 1.
3.2 Details of the MDD-SAT Encoding
Construction of as used in the MDD-SAT solver relies on time expansion of underlying graph . Having , the basic variant of time expansion determines the maximum number of time steps (makespan) such that every possible solution of the given MAPF with the sum-of-costs less than or equal to fits within timesteps. Given we can calculate as where is the length of the shortest path connecting and ; . The detailed justification of this equation is given in [32].
Time expansion itself makes copies of vertices for each timestep . That is, we have vertices for each and time step . Edges from are converted to directed edges interconnecting timesteps in the time expansion. Directed edges are introduced for whenever there is . Wait actions are modeled by introducing edges . A directed path in the time expansion corresponds to trajectory of an agent in time. Hence the modeling task now consists in construction of a formula in which satisfying assignments correspond to directed paths from to in the time expansion.
Assume that we have time expansion for agent . Propositional variable is introduced for every vertex in . The semantics of is that it is if and only if agent resides in at time step . Similarly we introduce for every directed edge in . Analogously the meaning of is that is if and only if agent traverses edge between time steps and .
Constraints are added so that truth assignment are restricted to those that correspond to valid solutions of a given MAPF. Added constraints together ensure that is a complete propositional model for given MAPF.
We here illustrate the model by showing few representative constraints. We omit here constraints that concern objective function. For the detailed list of constraints we again refer the reader to [32].
Collisions among agents are eliminated by the following constraint for every and timestep expressed on top of variables:
[TABLE]
There are various ways how to translate the constraint using propositional clauses. One efficient way is to introduce for all possible pairs of and .
Next, there is a constraint stating that if agent appears in vertex at time step then it has to leave through exactly one edge . This can be established by following constraints:
[TABLE]
[TABLE]
Similarly, the target vertex of any movement except wait action must be empty. This is ensured by the following constraint for every :
[TABLE]
Other constraints ensure that truth assignments to variables per individual agents form paths. That is if agent enters an edge it must leave the edge at the next time step.
[TABLE]
A common measure how to reduce the number of decision variables derived from the time expansion is the use of multi-value decision diagrams (MDDs) [21]. The basic observation that holds for MAPF is that an agent can reach vertices in the distance (distance of a vertex is measured as the length of the shortest path) from the current position of the agent no earlier than in the -th time step. Analogical observation can be made with respect to the distance from the goal position.
Above observations can be utilized when making the time expansion of . For a given agent, we do not need to consider all vertices at time step but only those that are reachable in timesteps from the initial position and that ensure that the goal can be reached in the remaining timesteps.
3.3 Resolving Conflicts Lazily in SMT-CBS
SMT-CBS is inspired by search-based algorithm CBS [22, 20] that uses the idea of resolving conflicts lazily; that is, a solution of MAPF instance is not searched against the complete set of movement constraints that forbids collisions between agents but with respect to initially empty set of collision forbidding constraints that gradually grows as new conflicts appear. SMT-CBS follows the high-level framework of CBS but rephrases the process into propositional satisfiability in a similar way as done in formula satisfiability testing in satisfiability modulo theory paradigm [16, 15, 5].
The high-level of CBS searches a constraint tree (CT) using a priority queue in breadth first manner. CT is a binary tree where each node contains a set of collision avoidance constraints - a set of triples forbidding occurrence of agent in vertex at time step , a solution - a set of paths for individual agents, and the total cost of the current solution.
The low-level process in CBS associated with node searches paths for individual agents with respect to set of constraints . For a given agent , this is a standard single source shortest path search from to that avoids a set of vertices whenever working at time step . For details see [19].
CBS stores nodes of CT into priority queue Open sorted according to the ascending costs of solutions. At each step CBS takes node with the lowest cost from Open and checks if represent paths that are valid with respect to MAPF movements rules - that is, are checked for collisions. If there is no collision, the algorithms returns valid MAPF solution . Otherwise the search branches by creating a new pair of nodes in CT - successors of . Assume that a collision occurred between agents and in vertex at time step . This collision can be avoided if either agent or agent does not reside in at timestep . These two options correspond to new successor nodes of - and that inherit the set of conflicts from as follows: and . and inherit paths from except those for agents and respectively. Paths for and are recalculated with respect to extended sets of conflicts and respectively and new costs for both agents and are determined. After this, and are inserted into the priority queue Open.
SMT-CBS compresses CT into a single branch in which the propositional model taken from MDD-SAT is iteratively refined. The high-level branching from CBS is deferred to the low level of SAT solving. In the MDD-SAT encoding collision avoidance constraints are omitted initially, only constraints ensuring that assignments form valid paths interconnecting starting positions with goals are be preserved. This will result in an incomplete propositional model denoted . The important component of SMT-CBS is a paths validation procedure that reports back the set of conflicts found in the current solution that are used for making model refinements. SMT-CBS is shown in pseudo-code as Algorithm 2.
The algorithm is divided into two procedures: SMT-CBS representing the main loop and SMT-CBS-Fixed solving the input MAPF for fixed cost . The major difference from the standard CBS is that there is no branching at the high-level. The high-level SMT-CBS roughly correspond to the main loop of MDD-SAT. The set of conflicts is iteratively collected during the entire execution of the algorithm. Procedure encode from MDD-SAT is replaced with encode-Basic that produces encoding that ignores specific movement rules (collisions between agents) but in contrast to encode it encodes collected conflicts into .
The conflict resolution in the standard CBS implemented as high-level branching is here represented by refinement of with disjunction (line 20). The presented SMT-CBS can eventually build the same formula as MDD-SAT but this is done lazily in SMT-CBS.
4 Handling Capacity Constraints in MAPF
To adapt the SAT-based approach for MAPF with capacities we need minor modifications only in both MDD-SAT and SMT-CBS. However in each algorithm the integration of capacity constraints in profoundly different. While in MDD-SAT we integrate capacity constraints eagerly in the line with the original design of the algorithm (that is, the constraint in introduced as a whole), in SMT-CBS we integrate capacity constraint lazily which means part by part as new conflicts appear.
4.1 Details of the Encoding with Capacities
We need only a small modification of the MDD-SAT encoding to handle vertex capacities. We need to replace constraint 1 with the following constraint that is again posted for every vertex and time step :
[TABLE]
Unlike in the standard MAPF we need here a more sophisticated translation of the constraint to propositional clauses. Using the approach of forbidding individual -tuples can be highly inefficient especially in cases when is large. Therefore we use cardinality constraints encodings commonly used in SAT [3, 25, 23]. Generally the cardinality constraint over set of propositional variables permits at most a specified number of variables from the set to be , denoted means that at most k variables from the set can be .
In our case of MAPF with capacities we need to introduce following cardinality constraints for every vertex and time step . The practical implementation of cardinaliy constraints is done through encoding adder circuits inside the formula [23].
[TABLE]
4.2 Capacities in SMT-CBS
Capacities in SMT-CBS are resolved lazily as well. That is, the capacity constraint is not posted entirely as a cardinality constraint but instead individual sets of agents that violate the capacity are forbidden one by one as they appear. That is for example if a generalized conflict occurs with agents , , …, in vertex (in other words if ) we post a conflict elimination clause concerning the colliding set of agents: .
Hence in the SMT-CBS algorithm we modify only lines 20 and 21 that handle generalized vertex conflicts. Also we need to modify the validate procedure called at line 15 to reflect generalized vertex capacities.
5 Experimental Evaluation
To evaluate the performance of capacity handling in context of SAT-based algorithms we performed an extensive evaluation on both standard synthetic benchmarks [6, 21] and large maps from games [27].
5.1 Setup of Experiments and Benchmarks
We took the existing implementations of MDD-SAT and SMT-CBS written in C++. Both implementations are built on top of the Glucose 4 SAT solver [1, 2]. In the implementations we modified the capacity constraint from the original at-most-one to generalized variants as mentioned above. All experiments were run on a Ryzen 7 CPU 3.0 Ghz under Kubuntu linux 16 with 16GB RAM. The timeout in all experiments was set to 500 seconds. Presented are only results finished within this time limit.
The second part of experimental evaluation took place on large 4-connected maps taken from Dragon Age [19, 27]. We took three structurally different maps focusing on various aspects such as narrow corridors, large almost isolated rooms, or topologically complex open space. In contrast to small instances, these were only sparsely populated with agents. Initial and goal configuration were generated at random again. Up to 80 agents were used in these instances and uniform capacities of 1, 2, and 3. On large maps we measured the runtime.
5.2 Results on Small Grids
Results obtained for small open grids are presented in Figures 2 and 3. We can see that in comparison with the standard MAPF capacities bring significant reduction of difficulty of instances. This difference can be seen in both MDD-SAT and SMT-CBS. The starkest performance difference is between and . The least performance difference is between and . The similar picture can be seen in for the number of clauses.
5.3 Results on Large Maps
Results for large game maps are shown in Figures 4 and 5. A different picture can be seen here. Adding capacities does not cause any significant simplification except the brc202d map which consists of narrow corridors. The interpretation is that adding extra parking place through capacities may lead to simplification only when it is not available normally. Otherwise generalized capacity constraints lead to harder instances.
6 Discussion and Conclusion
We introduced multi-agent path finding problem with vertex capacity constraints. We modified two existing state-of-the-art SAT-based optimal MAPF solvers to reflect vertex capacities, the MDD-SAT solver using the eager encoding and the SMT-CBS solver using the lazy encoding.
In both solvers we observed that adding an extra room by increasing the capacity of vertices dramatically reduces the difficulty of instances. However adding further capacity does has less significant effect. In large maps using higher capacities even lead to performance degradation which we attribute to more complex constraints.
In the future work we would like to apply the MAPF formulation with capacities in the real-life multi-robot problem.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Audemard, G., Lagniez, J., Simon, L.: Improving glucose for incremental SAT solving with assumptions: Application to MUS extraction. In: SAT. pp. 309–317 (2013)
- 2[2] Audemard, G., Simon, L.: Predicting learnt clauses quality in modern SAT solvers. In: IJCAI. pp. 399–404 (2009)
- 3[3] Bailleux, O., Boufkhad, Y.: Efficient CNF encoding of boolean cardinality constraints. In: CP. pp. 108–122 (2003)
- 4[4] Biere, A., Biere, A., Heule, M., van Maaren, H., Walsh, T.: Handbook of Satisfiability: Volume 185 Frontiers in Artificial Intelligence and Applications. IOS Press (2009)
- 5[5] Bofill, M., Palahí, M., Suy, J., Villaret, M.: Solving constraint satisfaction problems with SAT modulo theories. Constraints 17 (3), 273–303 (2012)
- 6[6] Boyarski, E., Felner, A., Stern, R., Sharon, G., Tolpin, D., Betzalel, O., Shimony, S.: ICBS: improved conflict-based search algorithm for multi-agent pathfinding. In: IJCAI. pp. 740–746 (2015)
- 7[7] Dresner, K., Stone, P.: A multiagent approach to autonomous intersection management. JAIR 31 , 591–656 (2008)
- 8[8] Hönig, W., Kumar, T.K.S., Cohen, L., Ma, H., Xu, H., Ayanian, N., Koenig, S.: Summary: Multi-agent path finding with kinematic constraints. In: Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI 2017. pp. 4869–4873 (2017)
