bnelearn.mechanism.data module

This module contains static data about all possible solutions in the LLG and LLLLGG combinatorial auctions, which may constitute efficient allocations.

class bnelearn.mechanism.data.CombinatorialAuctionData[source]

Bases: ABC

Wraper class to represent static data of a large combinatorial auction.

classmethod efficient_allocations_dense(device='cpu') Tensor[source]

Returns the possible efficient allocations as a dense tensor

classmethod legal_allocations_dense(device='cpu') Tensor[source]

returns a dense torch tensor of all possible legal allocations on the desired device. Output shape: n_legal_allocations x n_bundles

classmethod legal_allocations_sparse(device='cpu') Tensor[source]

returns the sparse index representation of legal allocations as a torch.Tensor.

abstract class property n_bundles: int
classmethod player_bundles(device='cpu') Tensor[source]

returns the player bundle matching as a torch.Tensor

class bnelearn.mechanism.data.LLGData[source]

Bases: object

Contains static data about legal allocations in the LLG setting.

bundles = [[0], [1], [0, 1]]
legal_allocations_dense = [[0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0]]
legal_allocations_sparse = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 0], [9, 4], [10, 1], [10, 3], [11, 0], [11, 1], [12, 0], [12, 7], [13, 1], [13, 6], [14, 3], [14, 4], [15, 3], [15, 7], [16, 4], [16, 6], [17, 6], [17, 7]]
class bnelearn.mechanism.data.LLLLGGData[source]

Bases: CombinatorialAuctionData

Static data about legal and possibly efficient allocations in the LLLLGG setting. For details about the representation, see Bosshard et al. (2019), https://arxiv.org/abs/1812.01955.

efficient_allocations_semisparse: List[List[int]] = [[0, 2, 4, 6], [1, 3, 5, 7], [4, 6, 8], [0, 2, 9], [0, 6, 10], [2, 4, 11], [5, 8], [1, 9], [7, 10], [3, 11], [0, 2, 5], [2, 4, 7], [1, 4, 6], [0, 3, 6], [0, 3, 5], [2, 5, 7], [1, 3, 6], [1, 4, 7]]
n_bundles = 12
class bnelearn.mechanism.data.LLLLRRGData[source]

Bases: CombinatorialAuctionData

Static data about legal and possibly efficient allocations in the LLLLRRG setting. This extends the LLLLGG setting by adding a 7th, “superglobal” player, who is interested in the bundle of all 8 items.

In this setting, we’ll call the new player ‘global’, and the players interested in 4-item-bundles (R in LLLLRRG, G in LLLLGG) ‘regional’.

efficient_allocations_semisparse = [[0, 2, 4, 6], [1, 3, 5, 7], [4, 6, 8], [0, 2, 9], [0, 6, 10], [2, 4, 11], [5, 8], [1, 9], [7, 10], [3, 11], [0, 2, 5], [2, 4, 7], [1, 4, 6], [0, 3, 6], [0, 3, 5], [2, 5, 7], [1, 3, 6], [1, 4, 7], 12]
n_bundles = 14