Inputs:
1) A set of $M \times N$ matrices, $\text{{$A,B,C...N$}}$ containing only integers.
2) A single $1 \times N$ matrix of floats, $W$ (weights).
I need to pull one row from each input matrix and sum values for each column, then take the dot product of the resulting $1 \times N$ matrix with $W$, yielding a score $K$.
Ex:
$A =$ [1 3 5 6], $B = $[3 4 5 6], $W =$ [0.5 0.1 2.0 3.0]
In this case there is only one row in each input matrix so we pick the only rows from $A$ and $B$, sum their columns to get [4 7 10 12] and dot that with $W$ to yield $58.7$, our value for $K$.
EDIT: In addition there is a constraint on one of the columns such that the corresponding weight from $W$ drops by some amount when the sum for that column is greater than some fixed value, for example we might specify that $3$ is the cap for the first column in the previous example, with the weight dropping to $0.2$ after that has been exceeded. This would make the score for [4 7 10 12] $= (3 \times 0.5) + (1 \times 0.2) + (7 \times 0.1) + (10 \times 2.0) + (12 \times 3.0) = 58.4$
The goal is to find the global maximum $K$ for all combinations of rows from the input matrices (where we take one row from each matrix).
If the set of input matrices is large and the number of rows is more than a couple, the number of row combinations blows up.