Skip to content

Core

Core identifiers and registries for the Oracle Paper package.

Provides column enums, model metadata, and variable metadata used across the benchmark runner, models, and UI.

BilevelDataCol

Bases: StrEnum

Extra column names used in bilevel hub location datasets.

These columns sit alongside the standard [DataCol][bilevelpy.core.columns.DataCol] columns and carry the additional data that the bilevel models need: per-client budgets, transport weights, Lagrange multipliers, and aggregated keys for the recursive (PC-HLP) formulation.

Attributes:

Name Type Description
CLIENT_KEY

Unique integer key assigned to each client.

CLIENT_ID_ROUTE

Zero-based index \(z\) of a client on route \((i,j)\).

CLIENT_ROUTE

The \((i,j)\) route tuple the client belongs to.

CLIENT_RATIO

Budget-to-weight ratio \(b_{ij}^z / a_{ij}^z\).

BUDGET

Client budget \(b_{ij}^z\) (willingness to pay).

TRANSPORT_WEIGHT_CLIENT

Client demand weight \(a_{ij}^z\).

LAGRANGE

Lagrange multiplier \(\lambda_{ij}^z\) for the PPC-HLP model.

RECURSIVE_LAGRANGE

Lagrange multiplier after recursive merging (PC-HLP).

CLIENT_KEYS

Mapping \((i,j,z) \to\) list of original client keys that were merged into this aggregated client.

SUMMED_LINEAR_WEIGHTS

Sum of \(a_{ij}^z\) over all clients merged into an aggregated recursive client.

SUMMED_BUDGETS

Sum of \(b_{ij}^z\) over all clients merged into an aggregated recursive client.

BilevelVars

Registry of [VariableMetaData][bilevelpy.models.meta.VariableMetaData] instances for the benchmark UI.

Each attribute exposes the var_metadata of a variable class so the UI can render it (via display_name) and filter it out of solution comparisons (via equality checks against extracted variables).

Attributes:

Name Type Description
LINEAR_X_Y

Standard linearization variable \(X_{ijkm}^z\).

LINEAR_BILEVEL_X

Recursive (aggregated) linearization variable.

PRICE

Price variable \(p_{ij}\) (PS_HLP only).

CLIENT_DECISION

Client decision variable \(y_{ij}^z\).

RECURSIVE_CLIENT_DECISION

Aggregated client decision for PC-HLP.

OraclePaperModelNames

Registry of [ModelMetaData][bilevelpy.models.meta.ModelMetaData] instances for all four models studied in the paper.

Each attribute is a [ModelMetaData][bilevelpy.models.meta.ModelMetaData] carrying a short value (used for equality checks) and a display_name (shown in UIs and reports).

Attributes:

Name Type Description
PS_HLP

Big-M price-setting model (price is a Gurobi variable).

PC_HLP

Fast Lagrange model with recursive client aggregation.

PPC_HLP

Standard Lagrange decomposition with precedence constraints.

PS_BHLP

Bilevel formulation solved via Julia + BilevelJuMP.