Skip to contents

Deleting mass is the discrete face of Caffarelli and McCann's obstacle problem: the surviving support is an unknown free boundary, so the shifted problem is not the original plan with rows thinned out – the optimum reorganises. delta is taken as a total to remove, spread over the bins in proportion to a, or as a per-bin vector when a vector is supplied.

Usage

Otmarsh(a, b, C, delta)

Arguments

a, b

Source and target weights.

C

Ground cost, n by m.

delta

Mass removed from the source, in total or per bin.

Value

List with T, cost, a_shift, removed, mass, n, m.

Details

Formula: solve min_T <T,C> with \(a' = a - delta\) and total transported mass \(sum(a')\), the partial-transport problem of Caffarelli and McCann (2010).

References

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

Examples

Otmarsh(a = c(1, 2, 3, 4, 5, 6, 7, 8), b = 5L, C = c(1, 2, 3, 4, 5, 6, 7, 8),
  delta = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $T
#>      [,1]
#> [1,]    0
#> [2,]    0
#> [3,]    0
#> [4,]    0
#> [5,]    0
#> [6,]    0
#> [7,]    0
#> [8,]    0
#> 
#> $cost
#> [1] 0
#> 
#> $a_shift
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $removed
#> [1] 36
#> 
#> $mass
#> [1] 0
#> 
#> $n
#> [1] 8
#> 
#> $m
#> [1] 1
#> 
#> $method
#> [1] "Optimal transport under a marginal shift"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"