Search code examples
matlabmathematical-optimizationsolverinteger-programmingmixed-integer-programming

Matlab optimproblem: Possible to use 3rd party ILP solver?


I've been browsing the Matlab's [mixed] integer linear program ([M]ILP) commands/classes documentation to see if there is a way to define an "optimization problem" (optimproblem) and call out to an external [M]ILP solver using an API rather than using the native intlinprog. I haven't yet found any indication that this is possible, short of converting the problem to matrix/solver-based format (prob2struct) and creating my own intermediate ILP data file. That would be beyond what I am willing to do.

Is there in fact no way to directly invoke a 3rd party solver?

If there is a way, can someone please direct me to the proper documentation page?

If there is in fact no way, can someone please confirm this?

Thanks.

Clarification: Question emphasizes use of optimproblem

I appreciate the answers and comments to date, but I realize from them that I need to emphasize a key point in the question. My aim is to exploit the high level problem specification of optimproblem, which uses Matlab's array syntax to compactly represent a large number of constraints, lengthy inner products for them, and for the objective function. This is the so-called problem-based approach, which is akin in high level to AMPL.

In contrast, my impression from initial browsings of the cited documents on 3rd party solvers is that their inputs are at a lower level of abstraction. This is the so-called solver-based approach, which colleagues have also called the "matrix level", for the following reason: The archetypal arrays x, Aeq, beq, Aineq, bineq, etc., are assumed to have been composed, and it is up to the analyst to keep track of which elements in x correspond to which (more) real-world parameters, i.e., those in the problem-based approach.

I was hoping that there was a way to use optimproblem and have it use a 3rd party solver so that I don't have to deal with the matrix level. An example of the latter would be using prob2struct to generate arrays to explicitly pass to external solvers via Matlab APIs (if they have them). I want to avoid this because I don't want to keep track of which problem-based variables map to which solver-based variables, especially since the former is often of high dimensionality. Granted, varindex simplifies the bookkeeping, but not having to code for such bookkeeping is much preferable.


Solution

  • According to TMW, the answer is "no" at present (May 30, 2019).