Build Status | Social |
---|---|
LinQuadOptInterface.jl (LQOI) is designed to simplify MathOptInterface.jl's (MOI) implementation for some solvers. The target use cases are low-level wrappers designed to bridge low-level Integer Linear and Quadratic solvers, for instance GLPK.jl, Gurobi.jl, Xpress.jl and CPLEX.jl.
The use of LQOI for MOI implementations is entirely optional. Using LQOI introduces an extra abstraction layer between a solver and MOI. Its recommended to carefully analyse if the solver's low-level API is close to what LQOI expects, otherwise a direct implementation of MOI might be a better option.
LQOI provides access to many MOI functionalities mainly related to problem modifications:
- add constraints/variables 1-by-1 and in batches
- remove constraints/variables
- change constraint coefficients
- change constraint type
- change constraint rhs
- change variable bounds and type
In LinQuadOptInterface.jl the MOI AbstractOptimizer
is specialized to LinQuadOptimizer
. In this implementation all the above mentioned modifications are carried out by the low-level solver's own functionalities and hence the LinQuadOptimizer
can be used without a CachingOptimizer
. The latter will keep all problem data in the Julia level and typically push to a low-level solver the complete problem at once.
In contrast, since LinQuadOptimizer
incrementally pushes data to the low-level solver, it stores a small subset of the problem data at the Julia level; typically only references to constraints and variables.
This package is currently used to implement MathOptInterfaceXpress.jl, MathOptInterfaceCPLEX.jl, MathOptInterfaceGurobi.jl and MathOptInterfaceGLPK.jl. The last one being only a mixed integer linear solver.
All these solvers have low-level APIs which support most of the above mentioned modifications. Hence, data storage is simplified and duplications are avoided.
This package is only recommended if a solver low-level API which supports most of the above mentioned modifications.
If a solver low-level API does not support most of the above mentioned modifications, then following the example of MathOptInterfaceSCS.jl and MathOptInterfaceECOS.jl might be a better idea.