MathOptInterface: a data structure for mathematical optimization problems Benoˆıt Legat ICTEAM, UCLouvain, Louvain-la-Neuve, Belgium,
[email protected] Oscar Dowson Department of Industrial Engineering and Management Sciences at Northwestern University, Evanston, IL,
[email protected] Joaquim Dias Garcia PSR & PUC-Rio, Rio de Janeiro, Brazil,
[email protected] Miles Lubin Google Research, New York, NY,
[email protected] We introduce MathOptInterface, an abstract data structure for representing mathematical optimization problems based on combining pre-defined functions and sets. MathOptInterface is significantly more general than existing data structures in the literature, encompassing, for example, a spectrum of problems classes from integer programming with indicator constraints to bilinear semidefinite programming. We also outline an automated rewriting system between equivalent formulations of a constraint. MathOptInterface has been implemented in practice, forming the foundation of a recent rewrite of JuMP, an open-source algebraic mod- eling language in the Julia language. The regularity of the MathOptInterface representation leads naturally to a general file format for mathematical optimization we call MathOptFormat. In addition, the automated rewriting system provides modeling power to users while making it easy to connect new solvers to JuMP. Key words : algebraic modeling language; Julia; JuMP; problem formats 1. Introduction arXiv:2002.03447v2 [math.OC] 16 Sep 2020 JuMP (Lubin and Dunning 2015, Dunning et al. 2017) is an algebraic modeling lan- guage for mathematical optimization written in the Julia language (Bezanson et al. 2017). JuMP, like other algebraic modeling languages (e.g., AMPL (Fourer et al. 1990), Convex.jl (Udell et al. 2014), CVX (Grant and Boyd 2014), CVXPY (Diamond and Boyd 2016), GAMS (Brook et al.