outputStr = outputStr + TaskUtils.getQuantity(aTask,ar);
outputStr = outputStr + taskUtils.getQuantity(aTask,ar);
    protected void logAllocationResult(Task aTask, boolean expandTimestamp, boolean isCountedAR) {	if(aTask == null) {return;}	PlanElement pe = aTask.getPlanElement();	if(pe == null) { return; }	String resultType=AR_REPORTED_STR;	AllocationResult ar = pe.getReportedResult();	if(ar == null) {	    resultType = AR_ESTIMATED_STR;	    ar = pe.getEstimatedResult();	}	if(ar != null) {	    String taskStr = buildTaskPrefixString(aTask);	    taskStr = taskStr + resultType + ",";	    if(ar.isSuccess()) {		taskStr = taskStr + AR_SUCCESS_STR + ",";	    }	    else {		taskStr = taskStr + AR_FAILURE_STR + ",";	    }	    if(!ar.isPhased()) {		long startTime = (long) TaskUtils.getStartTime(ar);		long endTime = (long) TaskUtils.getEndTime(ar);		if(isCountedAR &&		   (TaskUtils.isProjection(aTask))) {		    startTime = logInvPG.getEffectiveProjectionStart(aTask,startTime);		    if(startTime >= endTime) {			return;		    }		}		String outputStr = taskStr + getDateString(startTime,expandTimestamp) + ",";		outputStr = outputStr + getDateString(endTime,expandTimestamp) + ",";		outputStr = outputStr + TaskUtils.getQuantity(aTask,ar);		writeln(outputStr);	    }	    else {		int[] ats = ar.getAspectTypes();		int qtyInd = -1;		if(taskUtils.isProjection(aTask)) {		    qtyInd = getIndexForType(ats,AlpineAspectType.DEMANDRATE);		}		else {		    qtyInd = getIndexForType(ats,AspectType.QUANTITY);		}		int startInd = getIndexForType(ats,AspectType.START_TIME);		int endInd = getIndexForType(ats,AspectType.END_TIME);		Enumeration phasedResults = ar.getPhasedResults();		while(phasedResults.hasMoreElements()) {		    double[] results = (double[])phasedResults.nextElement();		    String outputStr = taskStr;		    long startTime=0;		    long endTime;		    if(startInd == -1) {			outputStr += ",";		    } 		    else {			startTime = (long) results[startInd];			if(isCountedAR &&			   (TaskUtils.isProjection(aTask))) {			    startTime = logInvPG.getEffectiveProjectionStart(aTask,startTime);			}			outputStr += getDateString(startTime,expandTimestamp) + ",";		    }		    if(endInd == -1) {			/** MWD The following line of code which replaces the			 *  allocation result end time with the task end time			 *  is only due to a current error in the 			 *  UniversalAllocator.   The UA is only setting			 *  the start time in the allocation result. There			 *  is a bug in and when the UA is fixed this line			 *  of code should be removed. If there is no end time			 *  in the allocation result, none should be appended.			 *  GUI needs the end			 *  times for the rates.			 */			endTime = TaskUtils.getEndTime(aTask);			outputStr += getDateString(endTime,expandTimestamp);			outputStr += ",";		    }		    else {			endTime = (long) results[endInd];			outputStr += getDateString(endTime,expandTimestamp) + ",";		    }		    if((qtyInd >= results.length) ||		       (qtyInd < 0)){			logger.error("qtyInd is " + qtyInd + " - No Qty in this phase of allocation results: " + outputStr);		    }		    else {			outputStr += taskUtils.convertResultsToDailyRate(aTask,results[qtyInd]);			if(startTime<=endTime){			    writeln(outputStr);			}			else if(!isCountedAR) {			    logger.warn("logAllocationResult: not going to log an allocation result where endTime is less than start time.  CSV line is is:" + outputStr);			}		    }		}	    }	}    }    