Author: Stan Eisenstat
Subject: Re: [Cs223] Query regarding Heuristics D and E
Date: Tuesday, 11 Feb 2020, 18:20:43
> To confirm my not so good understanding of Heuristics D and E, I would > like to use the following examples to see if I have gotten this > understanding correct: > > For Heuristic D, if I have an item (3rd item in the item array) of size 5 > that has already been placed in Bin 3 and the current item (let's say > item 6) I am looking at is also size 5, does using the heuristic then > mean that I can ignore placing the next item in Bins 0, 1 and 2 and > instead only consider placing the item in Bin 3 and beyond? Yes, but if you have implemented Heuristic A and sorted the items in decreasing order, then you only need to look at the previous item. ===== > It also seems that for Heuristic D I need to have a method of keeping > track of the specific items that I have placed in each bin apart from the > size of the bin remaining after each item is placed? As noted above, you only need to keep track of where the previous item (if any) was placed. ===== > For Heuristic E, if my 1st and 4th bins have the same amount of room > remaining, does that mean that I skip trying to place the current item I > am looking at in Bin 4 and only try to place it in Bin 1? Correct. ===== > And if I have more than 2 bins that have the same amount of room > remaining, do I skip placing the item inside the highest numbered bin or > all the bins barring the first bin ? All the bins except the first. --Stan-PREV INDEX NEXT