needed = true; break;
return day;
    protected int refillNeeded(Inventory inventory, int startDay) {	// 	printInventory(inventory,null);	boolean needed = false;	InventoryPG invpg = (InventoryPG)inventory.searchForPropertyGroup(InventoryPG.class);	int days = invpg.getPlanningDays();// 	printDebug(1, "InventoryManager, refillNeeded(), current day: "+startDay+", planning days :"+ days);	int day = startDay;	for (; day<days-1; day++) {//  	    double qty = java.lang.Math.ceil(convertScalarToDouble(invpg.getLevel(day)));	    // WHY DO WE TAKE A CEIL??	    double qty = convertScalarToDouble(invpg.getLevel(day));	    // reorder level depends on day, now, since it is often N days of supply	    double reorder_level = getReorderLevel(inventory,day);	    if (qty < reorder_level) {//   		printDebug(1,inventoryDesc(inventory)+" needs refill on day: "+day+//   			   " level= "+qty+" reorder_level="+reorder_level);		needed = true;		break; // order refill on this day	    } else {// 		printDebug(1,inventoryDesc(inventory)+" doesn't need refill on day"+i+// 			   ", level= "+qty+" reorder_level="+reorder_level);	    }	}	if (needed) {// 	    printDebug(1, "InventoryManager, refillNeeded(), next day is "+day);//  	    ProjectionWeight pw = invpg.getProjectionWeight();	    return day;	}	else {	    return DONE;	}    }