The Distributed Constraint Satisfaction Problem: Formalization and Algorithms