trailingPointersHash.remove(task);
remove_list.add(task);
  private double processLateWithdraws(int currentBucket, double level,                                       Inventory inv, LogisticsInventoryPG thePG) {    double filled = 0;    double qty, checkQty;    // need to go through and calculate scores for the late withdraws and     //allocate the high scores first.    // should be based on scoring functions or TimeLate * Quantity.    // for now just do first come, first serve    Iterator tpIter = trailingPointersHash.keySet().iterator();    while (tpIter.hasNext()) {      Task task = (Task) tpIter.next();      if (task.getVerb().equals(Constants.Verb.WITHDRAW)) {	qty = getTaskUtils().getPreference(task, AspectType.QUANTITY);      } else {	long start = (long)PluginHelper.getPreferenceBestValue(task, AspectType.START_TIME);	long end = (long)PluginHelper.getPreferenceBestValue(task, AspectType.END_TIME);	qty = thePG.getProjectionTaskDemand(task, currentBucket, start, end);	TaskDeficit deficit = (TaskDeficit)trailingPointersHash.get(task);	qty += deficit.getAccumulatedDeficit();      }      checkQty = filled + qty;      if ((level - checkQty) >= 0) {        //The Alloc start time is the start time of the currentBucket        // and the end time is the start time of currentBucket + 1        // If the bucket is more than one day we only want to promise that        // it will be delivered sometime during the bucket!	if (task.getVerb().equals(Constants.Verb.WITHDRAW)) {	  createLateAllocation(task, thePG.convertBucketToTime(currentBucket),                                thePG.convertBucketToTime(currentBucket+1),                                inv, thePG);	  trailingPointersHash.remove(task);	} else {	  // Tasks remain in the trailingPointersHash (just projections for now)	  // in order to create the complete allocation result (will handle split-	  // deliveries for actuals later.)	  TaskDeficit taskdeficit = (TaskDeficit)trailingPointersHash.get(task);	  taskdeficit.addBucket(qty, 0);	}        filled = filled + qty;      } else {	// For now, only handle projections	TaskDeficit taskdeficit = (TaskDeficit)trailingPointersHash.get(task);	taskdeficit.addBucket(0, qty);	      }    }    return filled;  }