logger.debug("Start day: "+TimeUtils.dateString(startTime)+", time zero "+TimeUtils.dateString(timeZero));
if (logger.isDebugEnabled()) { logger.debug("Start day: "+TimeUtils.dateString(startTime)+", time zero "+ TimeUtils.dateString(timeZero)); }
  public void initialize(long startTime, int criticalLevel, int reorderPeriod, int bucketSize, long now, boolean logToCSV, Date startCDay, InventoryPlugin parentPlugin) {    this.startTime = startTime;    // Set initial level of inventory from time zero to today.  This assumes that the inventory    // is created because the existence of demand and the RefillGenerator will be run    // on this inventory before time has advanced, thus the RefillGenerator will set     // the inventory level for today and in general we always assume that levels prior    // to today have been set before the RefillGenerator is run    // Contract: the inventory for yesterday is always valid because initially it is    // set by the behavior group of the inventory.    timeZero = (int)((startTime/MSEC_PER_BUCKET) - 1);    int now_bucket = convertTimeToBucket(now);        //Initialize with initial level since the refill generator won't start setting inv levels    //until the first day it processes which is today + OST - so depending on OST it could be a while.    inventoryLevelsArray[0] = myPG.getInitialLevel();    logger = parentPlugin.getLoggingService(this);    if(logToCSV) {	csvLogger = LogisticsInventoryLogger.createInventoryLogger(myPG.getResource(),myPG.getOrg(),false,parentPlugin);	csvWriter = new LogisticsInventoryFormatter(csvLogger, startCDay, parentPlugin);    }    taskUtils = parentPlugin.getTaskUtils();    logger.debug("Start day: "+TimeUtils.dateString(startTime)+", time zero "+TimeUtils.dateString(timeZero));    this.criticalLevel = criticalLevel;    this.reorderPeriod = reorderPeriod;    this.bucketSize = bucketSize;    MSEC_PER_BUCKET = bucketSize * TimeUtils.MSEC_PER_DAY;    bufferedCriticalLevels =       ScheduleUtils.buildSimpleQuantitySchedule(0, startTime, startTime+(TimeUtils.MSEC_PER_DAY*10));    bufferedTargetLevels =       ScheduleUtils.buildSimpleQuantitySchedule(0, startTime, startTime+(TimeUtils.MSEC_PER_DAY*10));    bufferedInventoryLevels =      ScheduleUtils.buildSimpleQuantitySchedule(myPG.getInitialLevel(), 						startTime, startTime+(TimeUtils.MSEC_PER_DAY*10));  }