Skip to contents

The Kantorovich problem insists that everything move. Partial transport relaxes that to an inequality and asks only that a fixed budget of mass be matched, which is the right formulation when the two measures overlap on a sub-region – Caffarelli and McCann's free boundary is precisely the edge of the matched part. Solved exactly by padding the cost with a zero-price dummy row and column.

Usage

Otpr(a, b, C, m)

Arguments

a, b

Source and target weights.

C

Ground cost, n by k.

m

Mass to transport; must not exceed either total.

Value

List with T, cost, mass, a_left, b_left, n, m_bins.

Details

Formula: min_T <T,C> subject to T 1 <= a, \(T' 1 <= b\), sum T = m.

References

Caffarelli, L. A. and McCann, R. J. (2010). Annals of Mathematics 171(2):673-730. doi:10.4007/annals.2010.171.673 .

Examples

Otpr(a = c(1, 2, 3, 4, 5, 6, 7, 8), b = 5L, C = c(1, 2, 3, 4, 5, 6, 7, 8), m = 5L)
#> $T
#>      [,1]
#> [1,]    1
#> [2,]    2
#> [3,]    2
#> [4,]    0
#> [5,]    0
#> [6,]    0
#> [7,]    0
#> [8,]    0
#> 
#> $cost
#> [1] 11
#> 
#> $mass
#> [1] 5
#> 
#> $a_left
#> [1] 0 0 1 4 5 6 7 8
#> 
#> $b_left
#> [1] 0
#> 
#> $n
#> [1] 8
#> 
#> $m_bins
#> [1] 1
#> 
#> $method
#> [1] "Partial optimal transport"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"