Client ranker
LinearClientRanker
¶
Bases: EntityProcessor
Sort and index clients by budget-to-weight ratio on each route.
For each route \((i,j)\), clients are sorted in descending order of
\(b_{ij}^z / a_{ij}^z\) and assigned zero-based indices \(z = 0, 1, 2,
\dots\). This ranking is essential for the
[PrecendenceConstraint][oracle_paper.constraints.precedence_constraint.PrecendenceConstraint]
and all Lagrange multiplier calculations.
Replaces the raw client entities (keyed by original client ID) with re-indexed entities keyed by \((i,j,z)\) tuples.
process(dataset)
¶
Rank clients and re-index entities by \((i,j,z)\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset
|
MultiEntityDataset
|
Dataset with client routes, budgets, and weights (modified in-place). |
required |