Expand description
Distributed formation consensus via ADMM.
A pure-Rust reproduction slice for the coordination layer of distributed MPC
(in the spirit of ACLM-style consensus control): a team of agents agrees on a
common formation center z while each agent settles at z + offset_i, trades
off staying near its own preferred position, and respects a per-agent box
constraint. The agreement is reached by the classic consensus ADMM
iteration — each agent solves a tiny local problem, the team averages to a
consensus, and scaled dual variables drive the per-agent residuals to zero.
Minimize sum_i (w_i/2) ||x_i - a_i||^2 subject to x_i - offset_i = z and
lower_i <= x_i <= upper_i. With equal weights and no box constraints the
consensus center has the closed form z* = mean(a_i - offset_i), which the
solver recovers; box constraints make it iterative and is where ADMM earns its
keep.
AgentSpecis one agent’s preferred position, formation offset, weight, and box bounds.AdmmConfigholds the penaltyrho, the iteration cap, and the residual tolerance.solve_formation_consensusruns (centralized) consensus ADMM and returns the agent positions, the consensus center, and the primal/dual residuals.solve_graph_consensusruns the decentralized edge-based variant where agents agree only with communication-graph neighbors (no global average); the convergence rate is set by the graph connectivity.solve_horizon_consensusis the receding-horizon variant: agents agree on a shared center trajectory over a short horizon (rather than a single static center), with a temporal smoothness penalty that couples the center across time and turns the consensus z-update into a banded linear solve.
Structs§
- Admm
Config - Consensus-ADMM solver settings.
- Admm
Report - Result of a consensus-ADMM solve.
- Agent
Spec - One agent in the formation-consensus problem.
- Agent
Trajectory - One agent’s planning slice in the receding-horizon (trajectory) consensus problem: a per-step reference trajectory, a constant formation offset, a cost weight, and an optional box constraint applied at every step.
- Graph
Consensus Report - Result of a decentralized (graph) consensus-ADMM solve.
- Horizon
Consensus Report - Result of a receding-horizon (trajectory) consensus-ADMM solve.
Functions§
- solve_
formation_ consensus - Solve the formation-consensus problem with consensus ADMM.
- solve_
graph_ consensus - Solve formation consensus decentralized over a communication graph, where each agent exchanges only with its graph neighbors (no global average).
- solve_
horizon_ consensus - Solve the receding-horizon formation-consensus problem: agents agree on a
shared center trajectory
z[0..H]rather than a single static center.