NewTask subtask = createWithdrawTask(parent_task); Preference pref = parent_task.getPreference(AlpineAspectType.DEMANDRATE); if (pref.getScoringFunction().getBest().getAspectValue() instanceof AspectRate) { } else { printError("SupplyExpander DEMANDRATE preference not AspectRate:" + pref); } subtask.addPreference(pref);
NewTask subtask = createWithdrawTask(parent_task); Preference pref = parent_task.getPreference(AlpineAspectType.DEMANDRATE); if (pref.getScoringFunction().getBest().getAspectValue() instanceof AspectRate) { } else { if (logger.isErrorEnabled()) { logger.error("SupplyExpander DEMANDRATE preference not AspectRate:" + pref); } } subtask.addPreference(pref);
     protected NewTask createProjectSupplyWithdrawTask(Task parent_task) {	 NewTask subtask = createWithdrawTask(parent_task);         Preference pref = parent_task.getPreference(AlpineAspectType.DEMANDRATE);         if (pref.getScoringFunction().getBest().getAspectValue() instanceof AspectRate) {         } else {             printError("SupplyExpander DEMANDRATE preference not AspectRate:" + pref);         }	 subtask.addPreference(pref);//    	 printDebug(1, "CreateProjectSupplyWithdrawTask() with start date:"+//    		    TimeUtils.dateString(TaskUtils.getStartTime(subtask))+", with end dat:"+//  		    TimeUtils.dateString(TaskUtils.getEndTime(subtask))+", quantity is "+quantity);	 return subtask;     }