2 views (last 30 days)

Show older comments

Dear All,

I do not know if a code exists in Matlab optimization for the following integer linear programming.

Min ||A*x - b||_1

S.T. x is an integer variable, x>= 0 and x <= 1. A is a 1 x n row vector, and b is a scalar.

Thanks a lot.

Benson

John D'Errico
on 30 Oct 2019

Edited: John D'Errico
on 30 Oct 2019

No. There is no direct code to do so, at least not that I know of. Should I write it? sigh.

But if you spend some time reading, you will find this is just a binary integer linear programming problem. That is...

A 1-norm minimization of that form can be converted into a standard LP problem using slack variables. (Its been many years since I wrote code for that, but I recall doing so.) At that point, it becomes a simple call to intlinprog.

A quick search shows the way...

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

Start Hunting!