• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Combination of numbers to return minimum value

Amd

New Member
Hi
I need a help for a problem of number combinations:
I have data in the following format
CategoryNumber
AAA32
BBB52
CCC55
DDD113
EEE70
FFF80
GGG125
HHH100
III111
JJJ32
KKK117
LLL27
MMM53

I need to combine/add the categories in maximum 9 sets so as to give minimum addition but must include all the categories.
To do this, there are following constraints:
  • A Category cannot be split up.
  • In the above example, the combinations of various categories should be close to 125 (since 125 is the max of all the numbers)
  • A set can have 1 or more categories.
  • Number of sets can be 1 to 9.
Example:
Set 1
Category GGG: 125= 125

Set 2
Category HHH & LLL: 100+27= 127

Set 3
Category FFF & BBB: 80+52= 132

Set 4
Category AAA, CCC & JJJ: 32+55+32= 119

Set5……

These are just examples and not actual solution.
I hope I have made my problem clear.

Regards,
Amd
 
See if this suits you with this suggestion in my attachment.
Option: If you enter a manual combination of categories.
I used helper columns.
 

Attachments

  • amd-navic-42157.xlsx
    11.1 KB · Views: 6
I believe the problem can be solved with the objective reaching 125.

61487

The solution was obtained by minimising the maximum value, calculated in the right-hand table, using Solver's Evolutionary method. The optimisation variables were the set membership numbers in the left table which were required to be integers between 1 and 9.
 

Attachments

  • amd-navic-42157 (PB).xlsx
    19 KB · Views: 15
Back
Top