".handleImpossibleTasks - failing " + impossibleTasks.size () + " tasks.");
".handleImpossibleTasks - failing " + impossibleTasks.size () + " tasks."); }
  protected void handleImpossibleTasks (Collection impossibleTasks) {    if (!foundMaxAssetValues) {      findMaxAssetValues ();      foundMaxAssetValues = true;    }    if (!impossibleTasks.isEmpty ())      info (getName () + 			  ".handleImpossibleTasks - failing " + 			  impossibleTasks.size () + 			  " tasks.");    for (Iterator iter = impossibleTasks.iterator (); iter.hasNext ();) {      Task task = (Task) iter.next ();      publishAdd (allocHelper.makeFailedDisposition (this, ldmf, task));      error (getName() + ".handleImpossibleTasks - impossible task : " + task.getUID() +			  "\nreadyAt " + prefHelper.getReadyAt (task) + 			  "\nearly   " + prefHelper.getEarlyDate (task) + 			  "\nbest    " + prefHelper.getBestDate (task) + 			  "\nlate    " + prefHelper.getLateDate (task));            GeolocLocation from = glmPrepHelper.getFromLocation (task);      GeolocLocation to   = glmPrepHelper.getToLocation (task);      float great = (float) measureHelper.distanceBetween (from, to).getNauticalMiles();      float timeDiff = 	(float) (prefHelper.getBestDate(task).getTime() - prefHelper.getReadyAt(task).getTime());      float time = timeDiff/3600000.0f;      float speed = great/time;      if (speed > maxSpeed) {	error (getName () + ".handleImpossibleTasks - impossible task : " + task.getUID() + 	       "\ndistance from " + from +	       " to " + to +	       " is great-circle " + format.format(great) +	       " nm, (" + format.format(great*NM_TO_MILE) + 	       " miles) \narrival-departure is " + format.format(time) + " hrs so" +	       " speed would have to be at least " + format.format(speed) + 	       " knots (" + format.format(speed*NM_TO_MILE) + " mph).\n" +	       "This is greater than the speed of the fastest asset : " + format.format(maxSpeed) + 	       " knots (" + format.format(maxSpeed*NM_TO_MILE) + " mph).\n");      }      else {	warn (getName () + ".handleImpossibleTasks - impossible task : " + task.getUID() + 	       "\ndistance from " + from +	       " to " + to +	       " is great-circle " + format.format(great) +	       " nm, (" + format.format(great*NM_TO_MILE) + 	       " miles) \narrival-departure is " + format.format(time) + " hrs so" +	       " speed would have to be at least " + format.format(speed) + 	       " knots (" + format.format(speed*NM_TO_MILE) + " mph).\n" +	       "But this is not greater than the speed of the fastest asset : " + format.format(maxSpeed) + 	       " knots (" + format.format(maxSpeed*NM_TO_MILE) + " mph).  So should be OK.\n");      }      Asset directObject = task.getDirectObject();      GLMAsset baseAsset = null;      if (directObject instanceof AggregateAsset) {	baseAsset = (GLMAsset) ((AggregateAsset)directObject).getAsset ();      }       else if (directObject instanceof AssetGroup) {	error (getName () + ".handleImpossibleTasks - something is really wrong - " + 	       " input task had a d.o. that was an asset group, task was " + task.getUID());	return;      }       else {	baseAsset = (GLMAsset)directObject;      }      if (dataXMLizer.getArea (baseAsset) > maxAreaCap) {	error (getName () + ".handleImpossibleTasks - impossible task : " + task.getUID() + 	       "\narea of " + format.format(dataXMLizer.getArea (baseAsset)) + " sq ft is > max carrier area " + 	       format.format(maxAreaCap));      }      if (dataXMLizer.getWeight (baseAsset) > maxWeightCap) {	error (getName () + ".handleImpossibleTasks - impossible task : " + task.getUID() + 	       "\nweight of " + format.format(dataXMLizer.getWeight (baseAsset)) + " tons is > max carrier weight " + 	       format.format(maxWeightCap));      }    }    if (stopOnFailure && !impossibleTasks.isEmpty()) {      info (getName() + ".handleImpossibleTasks - stopping on failure!");      System.exit (-1);    }  }