Skip to main content
QUICK REVIEW

[Paper Review] BilevelJuMP.jl: Modeling and Solving Bilevel Optimization in Julia

Joaquim Dias Garcia, Guilherme Bodin|arXiv (Cornell University)|May 4, 2022
Advanced Optimization Algorithms ResearchMathematics6 citations
TL;DR

BilevelJuMP.jl is a Julia package that enables modeling and solving bilevel optimization problems using JuMP's algebraic syntax, supporting conic, quadratic, nonlinear, and integer constraints in both upper and lower levels. It leverages MPEC reformulations—such as strong duality, big-M, and product methods—and integrates with solvers like Ipopt, SCIP, and Xpress, allowing users to rapidly prototype and solve complex bilevel models via off-the-shelf MIP and NLP solvers.

ABSTRACT

In this paper we present BilevelJuMP, a new Julia package to support bilevel optimization within the JuMP framework. The package is a Julia library that enables the user to describe both upper and lower-level optimization problems using the JuMP algebraic syntax. Due to the generality and flexibility our library inherits from JuMP's syntax, our package allows users to model bilevel optimization problems with conic constraints in the lower level and all JuMP supported constraints in the upper level (Conic, Quadratic, Non-Linear, Integer, etc.). Moreover, the user-defined problem can be subsequently solved by various techniques relying on mathematical program with equilibrium constraints (MPEC) reformulations. Manipulations on the original problem data are possible due to MathOptInterface.jl's structures and Dualization.jl features. Hence, the proposed package allows quickly model, deploy, and thereby experiment bilevel models based on off-the-shelf mixed integer linear programming and nonlinear solvers.

Motivation & Objective

  • To address the lack of flexible, high-level modeling support for bilevel optimization in existing algebraic modeling languages.
  • To enable users to express bilevel problems with conic constraints in the lower level and diverse constraint types in the upper level using intuitive JuMP syntax.
  • To provide a unified interface that supports multiple reformulation techniques (e.g., strong duality, big-M, product, and mixed modes) for transforming bilevel problems into single-level forms.
  • To facilitate rapid prototyping and experimentation by integrating with established solvers such as Ipopt, SCIP, and Xpress through MathOptInterface and Dualization.jl.
  • To support mixed-integer and nonlinear bilevel problems with bounded variable handling and automatic reformulation via packages like QuadraticToBinary.

Proposed method

  • Uses JuMP's algebraic syntax to define upper and lower-level optimization problems with explicit separation via Upper() and Lower() scopes.
  • Employs MathOptInterface.jl to abstractly represent and manipulate problem structures, enabling transparent reformulation and solver interfacing.
  • Applies MPEC reformulations—such as strong duality, Fortuny-Amat-McCarl big-M, and product-based methods—to convert bilevel problems into single-level equivalents.
  • Supports conic constraints in the lower level via SecondOrderCone() and bridges like SOCtoNonConvexQuad to map them to quadratic forms for NLP solvers.
  • Enables mixed-mode reformulation by allowing different reformulation strategies (e.g., indicator constraints, product reformulation) per constraint using MixedMode.
  • Integrates with external solvers through meta-solvers (e.g., QuadraticToBinary.Optimizer) that handle variable bounds and binary expansions automatically.

Experimental results

Research questions

  • RQ1How can bilevel optimization problems with conic constraints in the lower level be effectively modeled and solved using a high-level algebraic modeling language in Julia?
  • RQ2What are the most effective reformulation strategies (e.g., strong duality, big-M, product-based) for transforming bilevel problems into single-level forms that are amenable to off-the-shelf solvers?
  • RQ3To what extent can automatic variable bounding and binary expansion techniques improve the tractability of bilinear terms in bilevel objectives?
  • RQ4How can mixed-mode reformulation strategies be implemented to combine different reformulation techniques (e.g., indicator constraints and product reformulation) for heterogeneous constraints?
  • RQ5Can the integration of advanced modeling and reformulation tools in Julia enable faster prototyping and deployment of bilevel models across diverse application domains?

Key findings

  • BilevelJuMP.jl successfully supports modeling bilevel problems with conic constraints in the lower level and a broad range of constraint types (conic, quadratic, nonlinear, integer) in the upper level using JuMP syntax.
  • The package enables the use of multiple MPEC reformulation techniques—such as strong duality, big-M, and product-based methods—through a modular interface, allowing users to select the most appropriate strategy per problem.
  • Integration with solvers like Ipopt and SCIP via MOI bridges (e.g., SOCtoNonConvexQuad) allows NLP-based solution of problems with second-order cone constraints after reformulation.
  • The MixedMode reformulation strategy successfully combines different reformulation techniques (e.g., indicator constraints for linear constraints and product reformulation for conic ones), enabling mixed-integer and nonlinear bilevel problems to be solved via MISOCP solvers.
  • Automatic variable bounding and binary expansion via QuadraticToBinary.Optimizer enable robust handling of bilinear terms in the upper-level objective, even when variables lack explicit bounds.
  • The package demonstrates practical usability through working examples, including a conic bilevel problem from Chi et al. (2014), solved via both NLP and MIP-based reformulations with accurate convergence and solution quality.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.