function

assignment.auction_assignment

def auction_assignment(cost_matrix: torch.Tensor, bid_size: float) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]

Solve a linear assignment problem using Bertsekas' auction algorithm.

Converts the cost matrix to a profit matrix, then runs synchronous bidding until every row (or every column, for rectangular problems) is assigned. Non-finite entries mark forbidden pairs and are penalised internally so the solver never selects them.

Parameters

NameTypeDescription
cost_matrixtorch.Tensor``(N, M)`` cost matrix. ``inf`` entries mark forbidden pairs.
bid_sizefloatAuction bid step size. The internal ``epsilon`` is derived as ``min(bid_size / min(N, M), 1e-3)``.

Returns

torch.Tensor — ``(K, 2)`` long tensor of matched ``(row, col)`` indices.

Source: unitrack/assignment/_auction.py:57