Hello all
I am struggling with some code that I want to write. Can somebody help me?
In the table below in column C I have some numbers, in column D is how many times I have that number in C.
the rows can be more than 1000 rows.
column C values I store in C(x) and column D values I stored in D(x) memory
I need all combinations of sums of the values in C but the sum to be equal or less to value 20. To use all the values of C and to do not exceed D number of times value of C is used.
exp. 2+2+2+2+2+3.3+3.3+3.3=19.9
those 2*5 and 3,3*3 because we used to do not repeat
The point is to get the best combination
c d
length m` pieces
1.60 3
2.10 4
5.65 12
3.30 4
5.55 3
3.83 22
4.45 6
2.63 2
0.60 34
1.02 21
. .
. .
Bookmarks