Implementing a specific LP/MIP solver interface
The Mosel Native Interface (NI) defines a set of conventions that make it possible to extend the Mosel language with constants, subroutines, types, I/O drivers, and control parameters. The Mosel NI also publishes a special set of functionality that provides access to the matrix-based representation of optimization problems formulated using the Mosel types mpvar, linctr, mpproblem, that is, LP and MIP problems. These NI functions can be used for implementing interfaces to optimization solvers that are available in the form of a C/C++ library.
A minimal implementation of a solver module needs to do the following:
- Modeling functionality:
- define subroutines to start an optimization run and retrieve solution values
- provide access to solver parameters
- if supported by the solver, provide support for handling multiple problems
- NI functionality:
- implement a reset and an unload service
- initialize the module and the required interface structures