A numba njit heuristic for a variant of the integer programming problem.
We we want to find the values for 2D binary
matrix M such that the element-wise multiplication of M with the weight matrix W of the same shape
is maximized.
This is done under the constraints that
- the sum of the rows of M cannot exceed the values given in the vector R
- the sum of the columns of M cannot exceed the values given in the vector Cmax
- the sum of the columns of M cannot be below the values given in the vector Cmin
Also, we assume that the number of rows in the matrix is far larger than the number of columns.
Basicaly:
- Maximize