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

조회 수: 22(최근 30일)
Yingao Zhang
Yingao Zhang 2021년 2월 23일
댓글: Yingao Zhang 2021년 3월 1일
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 ( 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.

채택된 답변

Puru Kathuria
Puru Kathuria 2021년 2월 26일
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.

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by