Skip to content

Price variable

PriceVariable

Bases: Variable

Price variable for the PS-HLP (Big M) model.

Continuous non-negative variable representing the price the leader (hub operator) charges for transport on route \((i,j)\):

\[p_{ij} \geq 0 \quad \forall i,j \in V\]

Works together with: - ClientDecisionVariable - BigMConstraint

build(model)

Create \(|V| imes |V|\) continuous non-negative Gurobi variables.

Source code in src/oracle_paper/variables/price_variable.py
def build(self, model: "BaseModel") -> tupledict:
    """Create $|V| \times |V|$ continuous non-negative Gurobi variables."""
    nodes = get_nodes(model)
    return model.model.addVars(
        nodes, nodes,
        vtype=GRB.CONTINUOUS,
        lb=0,
        name=str(self.var_metadata),
    )