refill_qty = java.lang.Math.ceil(refill_qty);
refill_qty = Math.ceil(refill_qty);
  private boolean orderRefillWithPrevious(Inventory inventory,					    int day,					    InventoryPG invpg,					    double refill_qty)  {    Task refill_task = invpg.getRefillOnDay(day);    double prev_qty = TaskUtils.getQuantity(refill_task);    boolean failed = false;    Allocation alloc = (Allocation) refill_task.getPlanElement();    if (alloc != null) {      AllocationResult report = alloc.getReportedResult();      if (report != null) {	failed = !report.isSuccess();      }    }    if (failed) {      if (prev_qty <= refill_qty) {	System.out.println("Known failed refill: "+TaskUtils.taskDesc(refill_task));	//  		printLog("Known failed refill: "+TaskUtils.taskDesc(refill_task));	return false;      } // If quantity reduced make the change    }    // Send orders for whole items, i.e. do not order 0.5 O-rings    if (invpg.getCapacity() instanceof Count) {      refill_qty = java.lang.Math.ceil(refill_qty);    }    if (isPrintConcise()) {      printConcise("orderRefillWithPrevious() "		   + refill_task.getUID()		   + " "		   + prev_qty		   + "-->"		   + refill_qty		   + " on "		   + TimeUtils.dateString(invpg.convertDayToTime(day))		   );    }    invpg.removeDueIn(refill_task);    switch (REFILL_CHANGE_METHOD) {    case REFILL_ALTER_TASK:      /* Change the quantity preference on the existing task.	 refill_qty is the additional amount needed, prev_qty is	 the effective quantity of the current task. */      if (!failed) refill_qty += prev_qty;      Preference qpref = createRefillQuantityPreference(refill_qty);      ((NewTask) refill_task).setPreference(qpref);      PlanElement pe = refill_task.getPlanElement();      if (pe != null) {	pe.setEstimatedResult(createEstimatedAllocationResult(refill_task));      }      delegate_.publishChange(refill_task);      invpg.addDueIn(refill_task);      return true;    case REFILL_REPLACE_TASK:      if (!failed)  {        refill_qty += prev_qty;      }      plugin_.publishRemoveFromExpansion(refill_task);      return orderNewRefill(inventory, day, invpg, refill_qty);    case REFILL_ADD_TASK:      invpg.addDueIn(refill_task);      return orderNewRefill(inventory, day, invpg, refill_qty);    }    return false;  }