Code generation for Mixed-integer linear programming (MILP) algorithms

16 views (last 30 days)
I'd like to deploy mixed-integer linear programming (MILP) algorithm to embedded targets, however, the built-in MATLAB function intlinprog (Mixed-integer linear programming (MILP) - MATLAB intlinprog (mathworks.com)) doesn't support C code generation by MATLAB coder. Does anybody know any open-source MATLAB implementation of MILP algorithms that may enable me to successfully generate code with minor adaptions? Less advanced algorithms with naive approaches are preferred. Even basic Linear programming code, e.g., only with the simplex method and without support for integer constraints, are acceptable.

Accepted Answer

Puru Kathuria
Puru Kathuria on 26 Feb 2021
A general procedure would be to implement the algorithm in MATLAB, and make sure each of the function used in implementing the algorithm are code generatable. To check if the function is eligible for code generation, you can refer to the bottom of the documentation page of that particular function.
Further, try deploying the code on the preferred build type.
You can refer to this open source file exchange package, I hope it helps and saves your time.
This MATLAB package generates a stand alone MEX (With no dependencies) file for the GNU Linear Programming Kit (GLPK).
The MEX can solve large scales Linear Programming (LP) problems and Mixed Integer Linear Programming (MILP) problems.

More Answers (0)

Categories

Find more on Linear Programming and Mixed-Integer Linear Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!