Forum Discussion
Telles65
Feb 26, 2020Copper Contributor
Optimization Problem with Fixed Discreet Variables
Hello! My problem is relatively simple, but I can't find a way to make it. I have 14 parts of type A and 14 parts of type B and their weights. I need to group they in 7 sets containing 2 of each (e...
Telles65
Feb 26, 2020Copper Contributor
Thank you for the attempt!
On the file you've sent the sets have the biggest possible StdDev of the totals.
I would like to be able to combine to find the smallest possible StdDev.
I've also tried to use the Solver, did not work because I need it to iterate using fixed specific values of the table.
The file is attached this time!
Regards,
JKPieterse
Feb 26, 2020Silver Contributor
Is set A always smaller than set B? If so your second table is likely to be the best solution.
- Telles65Mar 01, 2020Copper Contributor
JKPieterse No, not always.
I'm still stuck with this...
- JKPieterseMar 02, 2020Silver ContributorI think it is like this:
Either you write VBA code that tries all possible combinations and picks the best (complicated to do and due to the many possibilities probably very slow), or you accept the second best solution which is where you try to create sets where you try to create pairs of both columns which are both as close to the column average as you can get. This is done by combining the largest with the smallest of A, then the one-but largest and one-but smallest, and etcetera. Depending on the precise numbers another strategy may potentially give a better result, but this strategy will likely work in more cases.