Minimization Problem With Solver
Minimization Problem With Solver
those numbers is a floating point number with a max decimal places of two (Ex: 23.04). the total cells
count is (277 cells).i want to automatically group cells that add up to (1000) or as close as possible to
that number (1000). the sum of all the cells is (5739.49) so, there should be (4) groups of cells, each
adds up to (1000) and the last one (5th group) doesn't matter how much it adds up to. now :
I know that this can be solved using "THE SOLVER" in excel for each group But i'm not sure
what constraints i should use and which solving method (i.e, the simplex, GRG nonlinear or the
evolutionary) methods because i'm not familiar with it
---------------------------------------------------------------------------------------------------------------------------------As I mentioned in the comment, the standard solver in Excel has a maximum limit for decision
variables of 200.
This example is limited to 200 variables - if you have the premium solver, you can expand the solution.
This was done using Excel 2016.
Worksheet setup
1.
Column A contains the size data.
2.
Column B contains the "Group" that each member in Column A will belong to. It is initially
populated using the formula =RANDBETWEEN(1,5). It was then overridden using Copy / Paste
Special - Values.
3.
Column D contains the aggregated groups, labelled 1 through 5.
4.
Column G contains the squared error from the target value for each group. It is calculated
with =(E2-F2)^2
7.
Cell G7 will be the "Set Objective" cell and is the sum of error squared. It is calculated
with =SUM(G2:G5)
Below is a screen shot of the setup worksheet, before using solver.
Solver Setup
Solver is setup with the following criteria ...
1.
2.
3.
4.
Solution
Your optimal region may be "flat" so there are multiple possible solutions.
Below is a screen shot of a solution I generated ...