Solver Question: Equally Divide List Into 5 Groups

John Luther

New Member
Joined
May 5, 2014
Messages
28
I am trying to setup up a larger solver model that, in addition to another of other things, solves for this problem:

I have a list of, in this case, 15 finishes in column A that I would like to divide into 5 equally sized groups (days) of 3 finishes by changing the values (1-5) in column B.

I have tried to setup a solver model with only the constraints that the range in column B be an integer <=1 and >=5, solving for a minimization of the max + average of the total for all 5 groups. The totals for each day are calculated on the worksheet as the variable cells change. The optimal solution would be 3 finishes per day, and the objective would be 6 (the max + the average). That may be a loopy way to try to evenly distribute the list, but it seems to me that it should work. But I can't get solver to give me a good solution. If I use the GRG Nonlinear option, it wants to use decimals even though I have an integer constraint. If I use the evolutionary option, it solves but not optimally - even if I use a high mutation rate and let it run for a long time. The solution below is the best I could get. I am a novice at this sort of thing, but I'm trying to learn. I just can't figure out why solver wouldn't be able to do this. Any help would be appreciated.


<colgroup><col style="mso-width-source:userset;mso-width-alt:3291;width:68pt" width="90"> <col style="mso-width-source:userset;mso-width-alt:5046;width:104pt" width="138"> <col style="width:48pt" width="64"> <col style="mso-width-source:userset;mso-width-alt:3474; width:71pt" span="5" width="95"> </colgroup><tbody>
[TD="class: xl65, width: 90"] FINISHES
[/TD]
[TD="class: xl66, width: 138"] GROUP (1-5) [/TD]
[TD="width: 64, align: right"] GROUP:
[/TD]
[TD="class: xl65, width: 95, align: center"] 1
[/TD]
[TD="class: xl67, width: 95, align: center"] 2
[/TD]
[TD="class: xl67, width: 95, align: center"] 3
[/TD]
[TD="class: xl67, width: 95, align: center"] 4
[/TD]
[TD="class: xl66, width: 95, align: center"] 5
[/TD]

[TD="class: xl63"]EM
[/TD]
[TD="class: xl63"]3
[/TD]
[TD="align: right"] TOTAL:
[/TD]
[TD="class: xl64, align: center"]3
[/TD]
[TD="class: xl64, align: center"]4[/TD]
[TD="class: xl64, align: center"]4[/TD]
[TD="class: xl64, align: center"]4
[/TD]
[TD="class: xl64, align: center"]3
[/TD]

[TD="class: xl63"]TCM
[/TD]
[TD="class: xl63"]3[/TD]

[TD="class: xl63, align: center"]Black Tea
[/TD]
[TD="class: xl63, align: center"]DM
[/TD]
[TD="class: xl63, align: center"]EM
[/TD]
[TD="class: xl63, align: center"]OM[/TD]
[TD="class: xl63, align: center"]TMM
[/TD]

[TD="class: xl63"]TMM[/TD]
[TD="class: xl63"]5[/TD]

[TD="class: xl63, align: center"]HM[/TD]
[TD="class: xl63, align: center"]EM[/TD]
[TD="class: xl63, align: center"]TCM[/TD]
[TD="class: xl63, align: center"]Distressed AW[/TD]
[TD="class: xl63, align: center"]CSMM
[/TD]

[TD="class: xl63"]CSMM[/TD]
[TD="class: xl63"]5
[/TD]

[TD="class: xl63, align: center"]Tobacco
[/TD]
[TD="class: xl63, align: center"]DGK[/TD]
[TD="class: xl63, align: center"]AWM[/TD]
[TD="class: xl63, align: center"]CC[/TD]
[TD="class: xl63, align: center"]OEM
[/TD]

[TD="class: xl63"]TCM[/TD]
[TD="class: xl63"]3[/TD]

[TD="class: xl63, align: center"][/TD]
[TD="class: xl63, align: center"]AWM[/TD]
[TD="class: xl63, align: center"]DM[/TD]
[TD="class: xl63, align: center"]Old World AW[/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]OM[/TD]
[TD="class: xl63"]4[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]Distressed AW[/TD]
[TD="class: xl63"]4[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]CC[/TD]
[TD="class: xl63"]4[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]OEM[/TD]
[TD="class: xl63"]5[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]OEM[/TD]
[TD="class: xl63"]5[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]EM[/TD]
[TD="class: xl63"]3[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]AWM[/TD]
[TD="class: xl63"]3[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]Black Tea[/TD]
[TD="class: xl63"]1[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]EM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]HM[/TD]
[TD="class: xl63"]1[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]AWM[/TD]
[TD="class: xl63"]3[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]OM[/TD]
[TD="class: xl63"]4[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DGK[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DGK[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]AWM[/TD]
[TD="class: xl63"]2
[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]AWM[/TD]
[TD="class: xl63"]3[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]AWM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]AWM[/TD]
[TD="class: xl63"]3[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]HM[/TD]
[TD="class: xl63"]1[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]3[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]Tobacco[/TD]
[TD="class: xl63"]1[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]3[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]AWM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]EM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]EM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]AWM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]EM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]HM[/TD]
[TD="class: xl63"]1[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]3[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]3[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DM[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]Distressed AW[/TD]
[TD="class: xl63"]4[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]HM[/TD]
[TD="class: xl63"]1[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]HM[/TD]
[TD="class: xl63"]1[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]Tobacco[/TD]
[TD="class: xl63"]1[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]Tobacco[/TD]
[TD="class: xl63"]1[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]DGK[/TD]
[TD="class: xl63"]2[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]Old World AW
[/TD]
[TD="class: xl63"]4[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]Tobacco[/TD]
[TD="class: xl63"]1[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]Tobacco[/TD]
[TD="class: xl63"]1[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]EM[/TD]
[TD="class: xl63"]3
[/TD]

[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

</tbody>
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,021
Latest member
pingpong7117

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top