N-SEA Documentation: First FitIn this algorithm each element of data is selected and attempts made to place it in the first bin. If this fails then the second bin is tried. If this fails the next bin is tried and so on until eventually the element is placed into a bin. The result is not necessarily optimal.To produce a First Fit solution then choose FirstFit from the Decision menu of the N-SEA menu. A dialogue box appears:
Click on the 'Data to be packed' box and select on the worksheet the data items to be packed. In the 'Bin Size' box type in the value representing the size of each bin. Click in the 'Locate top left hand cell of answer box' and select on the worksheet a single cell. A modest number of cells to the left and below this should be empty, since the answer will be displayed in these cells. If you have labels associated with the data then click on the 'Include Data Labels' box. When you select the cells in the worksheet containing the labels the dialogue box will look like the diagram below.
You may display the Windows help file or cancel the algorithm by pressing the appropriate button. When the 'OK' button is pressed a message box appears:
This gives you the option of accepting the information you have provided or of changing it. When you press the 'Yes' button a chart and a dialogue box appear:
The chart indicates the Bin Size. The dialogue box gives you the opportunity to re-position the chart prior to continuing to operate the First Fit algorithm. Once you have done this, press the 'OK' button on the dialogue box. You will see
This gives you the opportunity to review the Help file, step through the algorithm one item at a time or to compute the solution directly. When you have placed all items in a bin the following items appear on the worksheet.
In this table items in a given column are all placed together in a bin. If you move these, or change them then the chart will change. The chart produced will look like that below:
|
© Numerical Algorithms Group
Visit NAG on the web at:
www.nag.co.uk (Europe and ROW)
www.nag.com (North America)
www.nag-j.co.jp (Japan)
http://www.nag.com/n-sea/docs/firstfit.asp