It is preferable
that the units should add up to the desired total length of 654 inches,
but working just this out is a difficult hit-and-miss task as there are
millions of combinations to try out.
The economically minded would like to make sure that the solution is
the cheapest possible, but the cheapest solution in this case consist
of 14 pieces of unit No. 6 and one piece of unit No. 3, totaling £789.25.
But inevitably this solution leaves a surplus length of 1".25 that
would need to be shaved off and this may spoil the finish.
The solution
We could also go through all the combinations that fit exactly, not
a bad idea, but there are 9283 combinations that fit the length exactly,
some up to £100 more expensive. The best solution can be found using
Multi Objective Optimization. SizeFitter does this and finds the answer
in no time at all. SizeFitter has a choice of Primary and Secondary Objectives.
Here is a screen shot of what's going on.
To see the result here, just click on
the Multi Objective tab in the picture.
The Multi-Objective solution
is Pareto optimal for the two criteria, but this just means that you can't
improve on both criteria at the same time. The above mentioned minimum cost
solution is unique for the objective. However when going for the 'best fit',
there are multiple solutions with the same optimal fit, but with different
costs, hence there is an opportunity to move onto the Pareto efficient frontier,
that's what has happened here.
Now you can also play with the bounds: Suppose there were only 12 of unit No. 6 in stock.
Would the cheapest solution then result in an exact fit? The answer is still "no".
That would have resulted in a cost of £794.10, but with 1" excess misfit. You can play
with the bounds interactively. If the bound on unit No. 6 is lowered still further,
the optimal quantities of the other units begins to go up. Then you can tighten
those as well and see the result directly.
Here is also an investment example.
The algorithm uses highly efficient searches and gives
exact solutions; at this point I must emphasize that SizeFitter is not a heuristic.
You will be genuinely surprised by the speed of this
optimizer. It is often the small scale combinatorial problems that puts
you in a tight corner as the discrete nature becomes more apparent, hence
the importance of their quick and handy solutions.
There may be many knapsack solvers on the internet, but this program has
a unique combination of optimization from above/below target, optional bounds,
multi-objective option, report generation, exactness and speed, but is very
user friendly. The three available panes runs in independent threads,
hence the Store/Recall buttons for transfer of context. SizeFitter is compiled
for Windows XP, Pentium or higher. However, it also runs on
Windows 98,ME,NT,2000.
"A smart little program that can optimise the use of materials. Briefly, you type in a desired
target (e.g. weight or length). Then you type the lengths/weights and optionally the
prices of the materials and how many there are available. The program then calculates
the best use of the materials. Smart and easy to use."
|
User information
To run the above problem: Select the Multi Objective pane, click on 'Casefile'
from the top menu and open the file:
C:\program files\JHAndersen\SizeFitter 4.0\problem1.txt
Project Assistance
Available for Operational Research, Optimisation, Simulation Modelling, Numerical & Statistical Analysis. Consultancy or project work.
Covering a range of technologies; FORTRAN, C++Builder, C#, XML. Very reasonable
daily rates.
contact me or tel. 07501308405 (UK)
to discuss your requirements.
Johannes H Andersen