Displaying 1 result from an estimated 1 matches for "fixedsumcombinations".
2011 Jun 18
1
can this sequence be generated easier?
I have 'x' variables that I need to find the optimum combination of, with the
constraint that the sum of all x variables needs to be exactly 100. I need
to test all combinations to get the optimal mix.
This is easy if I know how many variables I have - I can hard code as below.
But what if I don't know the number of variables and want this to be a
flexible parameter. Is there a sexy