a.getResource().removeAssignment (a.getTask().getKey(), true);
a.getResource().removeAssignment (a.getTask().getKey(), false);
  public void clearAssignments() {    Task[] tasks = getTasks();    for (int i = 0; i < tasks.length; i++) {      Assignment a = tasks[i].getAssignment();      if (a != null) {        if (! a.getFrozen())          tasks[i].setAssignment (null);        a.getResource().removeAssignment (a.getTask().getKey(), true);      }    }    Resource[] resources = getResources();    for (int i = 0; i < resources.length; i++) {      resources[i].clearSchedule();      resources[i].resetCapacitiesUsed();      resources[i].resetMultitaskContrib();    }  }