tripletToTask.put (taskKey, subtask);
rememberTripletToTask (taskKey, subtask);
  public void makePlanElement (Vector tasklist, Asset anAsset, Date start, Date end, Date setupStart, Date wrapupEnd,			       boolean assetWasUsedBefore) {    if (assetWasUsedBefore) {      if (addToPrevious (tasklist, anAsset, start, end, setupStart, wrapupEnd))	return;      else {	warn ("Though we believe " + anAsset + " was used before at " + start + 	      " we could not find the previous task, so making a new one.");      }    }    List aggResults = aggregateHelper.makeAggregation(this,						      ldmf,						realityPlan,						tasklist,						getVerbForAgg(tasklist),						getPrepPhrasesForAgg(anAsset, tasklist),						getDirectObjectsForAgg(tasklist),						getPreferencesForAgg(anAsset, tasklist, start, end),						getAgentIdentifier(),						getAspectValuesMap(tasklist, start, end),						allocHelper.MEDIUM_CONFIDENCE);    publishList(aggResults);          cleanupAggregation(anAsset, tasklist, aggResults);    Task mpTask = findMPTask (aggResults);    // store each distinct assignment so we can get it later in addToPrevious    //    // Bug #11866:    //    // The problem (https://bugs.ultralog.net/show_bug.cgi?id=11866) is that    // addToPrevious initially looks on the role schedule for mptasks assigned to an asset.      // BUT the allocator plugin has to get a chance to run to update the role schedule.  So    // it may seem like no previous task has been assigned, if you just look at the role schedule,    // even though the assignment has been made (an MPTask created) but not yet reflected in    // the role schedule via an allocation.  This results in multiple MPTasks being made for the same    // mission - the same conveyance and for the same period of time.      //    // We need to remember the assignment locally through a map to avoid this problem.    if (assetWasUsedBefore) {      warn ("asset was used before, but made a new mptask : " + mpTask.getUID());    }    Collection subtasks = makeSetupWrapupExpansion (mpTask, anAsset, start, end, setupStart, wrapupEnd);    for (Iterator iter = subtasks.iterator(); iter.hasNext(); ) {      Task subtask = (Task) iter.next();      String taskKey = anAsset.getUID().toString() + "-" + prefHelper.getReadyAt(subtask).getTime() + "-" + 	prefHelper.getBestDate(subtask).getTime();      if (tripletToTask.get (taskKey) == null) {	tripletToTask.put (taskKey, subtask);	if (isInfoEnabled ()) {	  info (getName ()+ " mapping " + taskKey + " to " + subtask.getUID());	}	taskToMPTask.put  (subtask, mpTask);      }      else {	warn (getName () + " - unexpected : there already is a task in table with key " +taskKey);      }    }  }