Convex duality contracts for production-grade mathematical optimization

Abstract

Software engineering practices like unit testing are critical for deploying optimization based software in production. In the context of domain specific languages (DSL) for mathematical optimization, such practices are dependent on having precise contracts. Such contracts are usually straightforward for primal solutions: e.g. a primal solution is feasible if it satisfies the constraints defined through the DSL. However, the contracts can be more complicated for dual solutions and certificates of primal or dual infeasibility (i.e. dual or primal rays). In this paper we present an abstract dual optimization problem that is used to define the precise contracts for the MathOpt DSL in Google's OR-Tools. The main characteristic of this dual is combining standard conic and Lagrangian dual frameworks in a way that enables a unified and mechanical extension of familiar linear programming (LP) duality properties to all constraints supported by MathOpt.
×