csvWriter = new LogisticsInventoryFormatter(csvLogger, startCDay, parentPlugin);
csvWriter = new LogisticsInventoryFormatter(csvLogger, new Date(startCDay), parentPlugin);
    public void initialize(long startTime, int criticalLevel, int reorderPeriod, int ost, long bucketSize, long now, boolean logToCSV, long arrivalTime, Date startCDay, InventoryPlugin parentPlugin) {        this.startTime = startTime;        this.arrivalTime = arrivalTime;        // 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.	// FSC - HOURLY:	this.bucketSize = bucketSize;	MSEC_PER_BUCKET = this.bucketSize;        timeZero = (int) ((startTime / MSEC_PER_BUCKET) - 1);        //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();        if (logger.isDebugEnabled()) {            logger.debug("Start day: " + TimeUtils.dateString(startTime) + ", time zero " +                         TimeUtils.dateString(timeZero));        }        this.criticalLevel = criticalLevel;        this.reorderPeriod = reorderPeriod;        this.ost = ost;        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));    }