Constraints
Constraint definitions for the four PS-BHLP solution approaches.
BigMConstraint— couples the leader's price with the follower's decisionLinearizationConstraint— linearizes the cubic term \(y \cdot x \cdot x\)- [
PrecedenceConstraint][oracle_paper.constraints.precedence_constraint.PrecendenceConstraint] — enforces ordered client acceptance RecursiveLinearizationConstraint— aggregated-client version for PC-HLP
BigMConstraint
¶
Bases: Constraint
Implements the following Big M constraints defined in PS-HLP:
Requires:
-
PriceVariable: \(p_{ij} \geq 0\) -
ClientDecisionVariable: \(y_{ij}^z \in \{0,1\}\)
build(model, **kwargs)
¶
Adds the following constraints to the model:
Source code in src/oracle_paper/constraints/big_m_constraint.py
LinearizationConstraint
¶
Bases: Constraint
Implements the linearization from Section 5.1 of the paper, which replaces the cubic term with binary variables:
Used in both PS-HLP and PPC-HLP .
Requires:
- [AllocationVariable][bilevelpy.models.vars.hlp_vars.AllocationVariable]
- ClientDecisionVariable
- LinearXYVariable
build(model, **kwargs)
¶
Adds the following constraints to the model:
Source code in src/oracle_paper/constraints/linearization_constraint.py
PrecedenceConstraint
¶
Bases: Constraint
Precedence constraint defined in PPC-HLP
Only used in the PPC-HLP model. The PC-HLP model avoids these
constraints by merging customers.
Requires:
build(model, **kwargs)
¶
Adds the following constraint to the model:
Source code in src/oracle_paper/constraints/precedence_constraint.py
RecursiveLinearizationConstraint
¶
Bases: Constraint
Recursive (merged-client) linearization for the PC-HLP model.
Reproduces the cubic term:
Same structure as LinearizationConstraint
but operates on aggregated client keys from
BilevelDataCol.CLIENT_KEY.
Requires:
- [AllocationVariable][bilevelpy.models.vars.hlp_vars.AllocationVariable]
- RecursiveClientDecisionVariable
- RecursiveLinearXYVariable
build(model, **kwargs)
¶
Adds the following constraint to the model: