long baseTime = InventoryChartBaseCalendar.getBaseTime();
    public void computeCriticalNValues() {		minDay = -1;	maxDay = 0;	bucketDays = 1;	nValues=0;		if(inventory==null) return;		InventoryScheduleHeader schedHeader = (InventoryScheduleHeader)	    inventory.getSchedules().get(LogisticsInventoryFormatter.INVENTORY_LEVELS_TAG);	ArrayList levels = schedHeader.getSchedule();	long baseTime = InventoryChartBaseCalendar.getBaseTime();		bucketDays = -1;		for (int i=0; i < levels.size(); i++) {	    InventoryScheduleElement level = (InventoryScheduleElement) levels.get(i);	    long startTime = level.getStartTime();	    long endTime = level.getEndTime();	    int startDay = (int)((startTime - baseTime) / MILLIS_IN_DAY);	    int endDay = (int)((endTime - baseTime) / MILLIS_IN_DAY);	    if(bucketDays == -1) {		long bucketSize = endTime - startTime;		bucketDays = (int) (bucketSize / MILLIS_IN_DAY);	    }	    if (minDay == -1) {		minDay = startDay;	    }	    else if (startDay < minDay) {		minDay = startDay;	    }	    maxDay = Math.max(endDay, maxDay);	}	nValues = (maxDay - minDay + 1) / bucketDays;    }