if (objectFormatDoc == null) objectFormatDoc = prepareStoredObjectFormat (tasks); if (!sentFormatAlready) { comm.serializeAndPostProblem (objectFormatDoc); mode.initializeWithFormat (); }
initializeWithStoredFormat ();
   public void processTasks (List tasks) {	 total += tasks.size();	 System.out.println (getName () + ".processTasks - received " + 						 tasks.size () + " tasks, " + total + " total so far.");	 Date start = new Date();	 mode.setupScheduler ();	 if (useStoredFormat) {	   // only generate format the document once	   if (objectFormatDoc == null)		 objectFormatDoc = prepareStoredObjectFormat (tasks);	   if (!sentFormatAlready) {		 comm.serializeAndPostProblem (objectFormatDoc);		 mode.initializeWithFormat ();	   }	 } else {	   if (!sentFormatAlready)		 prepareObjectFormat (tasks);	 }		 // send again if in batch mode	 sentFormatAlready = incrementalScheduling;	 // remember these tasks come assignment-time	 setUIDToObjectMap (tasks, myTaskUIDtoObject);	 if (myExtraOutput)	   System.out.println (getName () + ".processTasks - sending " + 						   myTaskUIDtoObject.values ().size () + " tasks.");	 int numTasks = getNumTasks ();	 Date dataStart = new Date();	 // translate	 prepareData (tasks, objectFormatDoc);	 if (showTiming) {	   domUtil.reportTime (" - Vishnu completed data XML processing in ", dataStart);	   domUtil.reportTime (" - Vishnu completed XML processing in ", start);	 }	 // run, get answer, make plan elements	 waitForAnswer ();	 if (showTiming)	   domUtil.reportTime (" - Vishnu did " + numTasks + " tasks in ", start);   }