1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Bid warping: CBBA for valuations whose marginal gains do not diminish.
//!
//! CBBA's consensus assumes that an agent's bids never grow along its bundle. A valuation
//! that rewards tasks for fitting together breaks that: a courier that already drives to
//! one site may value a nearby site more than it valued the first one. Two agents can then
//! outbid each other's first tasks with their second bids, both release everything, and the
//! team repeats the same round forever (Example 2 of the paper below).
//!
//! With warping, an agent still ranks its candidate tasks by their true marginal gain, but
//! bids at most what it bid on the task it added last:
//!
//! ```text
//! bid = min(gain, last bid in the bundle)
//! ```
//!
//! Shared bids then never grow along a bundle, so consensus behaves as if gains diminished.
//! An agent can win a task only when its warped bid beats the best known bid, and its
//! bundle records the warped bids: [`Bundle::value`](crate::Bundle::value) sums the bids,
//! not the true value of the path.
//!
//! The method is bid-warped CBBA (BW-CBBA) from Johnson, Choi, Ponda and How,
//! "Decentralized Task Allocation Using Local Information Consistency Assumptions", Journal
//! of Aerospace Information Systems 14(2), 2017 (<https://doi.org/10.2514/1.I010461>),
//! Sec. IV.B, Eqs. 11–12 and Algorithm 3. The paper proves convergence for its own task
//! consensus ([`bwtc`](crate::bwtc)) in synchronous, reliable rounds. Here, warping sits on
//! top of CBBA's conflict table and full-state messages; that it settles over delayed, lost
//! and reordered messages is shown by property tests, not proven. CBBA's guarantee of half
//! the optimal value assumes diminishing gains, and does not carry over.
use Agent;
use crateBundle;
use crateTaskId;
use crateValuation;
/// The most an agent may bid on its next task: with `warping`, the bid on the task it
/// added last to `bundle`; otherwise, or for an empty bundle, no limit.
pub
/// Unit tests for bid warping.