makeAssignment2 (task, bestResource, bestBlock, true, false);
if (bestResource != null) makeAssignment2 (task, bestResource, bestBlock, true, false);
  private void assignAtTime (Task task, int time,                             SchedulingData data, SchedulingSpecs specs) {    Resource[] resources = specs.capableResources (task, data);    Task[] prereqs = new Task[0];    Resource bestResource = null;    float bestDelta = 0.0f;    Resource.Block bestBlock = null;    for (int i = 0; i < resources.length; i++) {      Resource resource = resources[i];      int dur = specs.taskDuration (task, resource, i == 0);      TimeBlock[] unavail = specs.taskUnavailableTimes        (task, prereqs, data.getStartTime(), data.getEndTime(),         resource, i == 0);      Resource.Block block = resource.earliestAvailableBlock        (task, dur, unavail, specs, multitask, grouped,         time, data.getStartTime());      if (block.start == time) {        makeAssignment2 (task, resource, block, false, false);        float delta = specs.evaluateSingleAssignment (task, resource);        if ((bestResource == null) ||            (specs.isMinimizing() && (delta < bestDelta)) ||            ((! specs.isMinimizing()) && (delta > bestDelta))) {          bestResource = resource;          bestDelta = delta;          bestBlock = block;        }        removeAssignment (task, resource);      }    }    makeAssignment2 (task, bestResource, bestBlock, true, false);  }