`BilevelOptimization.BilevelLP`

— TypeA bilevel linear optimization problem of the form:

```
min cx^T * x + cy^T * y
s.t. G x + H y <= q
x_j ∈ [xl_j,xu_j]
x_j ∈ ℤ ∀ j ∈ Jx
y ∈ arg min {
d^T * y + x^T * F * y
s.t. A x + B y <= b
y_j ∈ [yl_j,yu_j]
}
```

Note that integer variables are allowed at the upper level.

`BilevelOptimization.BoundComplementarity`

— Type`BoundComplementarity{MD,MP}`

Represent complementarity constraints implemented using big-M bounds on primal and dual variables.

`BilevelOptimization.SOS1Complementarity`

— TypeHandle complementarity constraints with Special Ordered Sets of type 1

`BilevelOptimization.VariableType`

— TypeVariableType enum distinguishing upper- and lower-level variables for setting upper and lower bounds

`BilevelOptimization.build_blp_model`

— Method``build_blp_model(bp::BilevelLP, solver; [comp_method])``

Build a JuMP model (constraints and objective) based on the data from bp and with a solver.

Returns a tuple `(m, x, y, λ, s)`

.

An optional keyword `comp_method`

can be passed for handling complementarity constraints, default is `SOS1Complementarity`

.

`BilevelOptimization.build_blp_model`

— Method``build_blp_model(m::JuMP.Model, bp::BilevelLP, x, y; [comp_method])``

Adds the lower-level constraints and optimality conditions to an existing JuMP model. This assumes the upper-level feasibility constraints and objective have already been set.

Returns a tuple `(m, x, y, λ, s)`

.

An optional keyword `comp_method`

can be passed for handling complementarity constraints, default is `SOS1Complementarity`

.

`BilevelOptimization.build_blp_model`

— Method``build_blp_model(m, B, d, x, y, s, F; [comp_method])``

Build the bilevel JuMP model from the data without grouping everything into a `BilevelLP`

. An optional keyword `comp_method`

can be passed for handling complementarity constraints, default is `SOS1Complementarity`

.

`BilevelOptimization.ComplementarityMethod`

— TypeMethod used for handling complementarity constraints `s[i] ⋅ λ[i] = 0`

Must implement:

`add_complementarity_constraint(m, cm::ComplementarityMethod, s, λ)`

`BilevelOptimization.MT`

— TypeConvenience alias for a matrix of a sub-type of `Real`

`BilevelOptimization.VT`

— TypeConvenience alias for a vector of a sub-type of `Real`

`BilevelOptimization.add_bigm_dualbounds`

— MethodAdd dual bounds with one bound for each element

`BilevelOptimization.add_bigm_dualbounds`

— MethodAdd dual bounds with one same bound for all elements

`BilevelOptimization.add_bigm_primalbounds`

— MethodAdd primal bounds with one bound for each element

`BilevelOptimization.add_bigm_primalbounds`

— MethodAdd primal bounds with the same bound for all elements

`BilevelOptimization.add_complementarity_constraint`

— FunctionAdd complementarity constraints to the JuMP model `m`

for each pair `(s[i],λ[i])`

with the corresponding complementarity method.

`add_complementarity_constraint(m, cm::ComplementarityMethod, s, λ, y, σ)`

`BilevelOptimization.add_complementarity_constraint`

— Method`add_complementarity_constraint(m, bc::BoundComplementarity, s, λ, y, σ)`

Implement complementarity constraints using big-M type constraints. This formulation introduces binary variables:

```
active_constraint[i] == 0 <=> λ[i] == 0
active_constraint[i] == 1 <=> s[i] == 0
variable_bound[j] == 0 <=> σ[j] == 0
variable_bound[j] == 1 <=> y[j] == 0
```

`BilevelOptimization.add_complementarity_constraint`

— Method`add_complementarity_constraint(m, ::SOS1Complementarity, s, λ, y, σ)`

Implements complementarity constraints using special ordered sets 1 (SOS1).

`JuMP.set_lower_bound`

— MethodSet a lower bound on a lower or higher variable of `bp`

depending on `vartype`

`JuMP.setupperbound`

— MethodSet an upper bound on a lower or higher variable of `bp`

depending on `vartype`

Since we need the dual for lower-level upper bounds, this case is registered as a constraint.