Skip to main content

task_allocation/
centralized.rs

1//! Centralized reference allocations, computed with full knowledge of every agent's
2//! valuation.
3//!
4//! These are not decentralized: one process sees every valuation. They serve as references
5//! for the decentralized algorithms, and as fallbacks when a central planner is available.
6//!
7//! - [`sequential_greedy`] repeatedly gives the single most valuable remaining task to the
8//!   agent that values it most. When the valuations are submodular set functions (the order
9//!   of tasks does not matter and gains diminish), the property tests check that it scores
10//!   at least half the optimum without capacity limits, and at least a third with them, the
11//!   bounds known for greedy over one and two matroids.
12//! - [`optimal`] finds the best assignment by exhaustive search, for small instances.
13//!
14//! Both maximize the same objective, [`Assignment::value`]: the sum, over agents, of the
15//! marginal gains recorded while each bundle was built.
16//!
17//! [`Assignment::value`]: crate::Assignment::value
18
19mod exact;
20mod greedy;
21
22pub use exact::{MAX_OPTIMAL_TASKS, optimal};
23pub use greedy::sequential_greedy;