Pc hlp
PC_HLP(n_hubs, alpha, data)
¶
Bases: BaseModel
Fast Lagrange Model — recursive client-aggregated formulation.
Unlike PS_HLP, this model uses aggregated client keys \((i,j,z)\) where \(z\) indexes a group of original clients. Clients are grouped by route \((i,j)\), ranked, and Lagrange multipliers \(\lambda_{ij}^z\) are computed recursively over segments. Price is not a Gurobi variable — it is inferred post-solve from the budget/weight ratio of the marginal client.
Variables:
| Symbol | Reproduces | Variable | Domain |
|---|---|---|---|
| \(x_{ik}\) | — | [AllocationVariable][bilevelpy.models.vars.hlp_vars.AllocationVariable] |
\(\{0,1\}\) |
| \(y_{ij}^z\) | — | RecursiveClientDecisionVariable |
\(\{0,1\}\) |
| \(X_{ijkm}^z\) | \(y_{ij}^z \cdot x_{ik} \cdot x_{jm}\) | RecursiveLinearXYVariable |
\(\{0,1\}\) |
Constraints:
| Constraint | Reference |
|---|---|
| HLP base | [NumberOfHubs][bilevelpy.models.constraints.hlp_constraints.NumberOfHubsConstraint], [SingleAllocation][bilevelpy.models.constraints.hlp_constraints.SingleAllocationConstraint], [AssignmentRestriction][bilevelpy.models.constraints.hlp_constraints.AssignmentRestrictionConstraint] |
| \(y = \sum X\), \(X \leq x\) | RecursiveLinearizationConstraint |
Objective (maximizes Lagrange-adjusted profit):
where \(K\) is the set of aggregated client keys and \(\lambda_{ij}^z\) are the recursive Lagrange multipliers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_hubs
|
int
|
Number of hubs to open (\(p\)). |
required |
alpha
|
float
|
Cost scaling factor (\(\alpha\)). |
required |
data
|
MultiEntityDataset
|
Dataset with recursive Lagrange multipliers and grouped client keys. |
required |