(AspectValue.newAspectValue(aspectType, bestTime + dgPlugin.getFrequency()), alpha);
(AspectValue.newAspectValue(aspectType, bestTime + dgPlugin.getPeriod()), alpha);
  protected Preference createTimeScoringFunctionPref      (long bestTime, int aspectType) {    long bucketStart = dgPlugin.getStartOfPeriod();    long bucketEnd = bucketStart + dgPlugin.getFrequency();    long earliestTime = dgPlugin.getLogOPlanStartTime();// Get the later of now and org report time    if (bucketStart > dgPlugin.getLogOPlanStartTime()) {      earliestTime = bucketStart;    }    long theBadPast = bucketStart - 1;    long latestTime = dgPlugin.getLogOPlanEndTime();    double bucketsBetween = ((latestTime - bestTime) / dgPlugin.getFrequency()) - 1;//Use .0033 as a slope for now    double lateScore = .0033 * bucketsBetween;// use some baseline score for earlier or 1 day late    double alpha = .25;    Vector points = new Vector();    AspectScorePoint badest = new AspectScorePoint        (AspectValue.newAspectValue(aspectType, theBadPast), 1.0);    AspectScorePoint earliest = new AspectScorePoint        (AspectValue.newAspectValue(aspectType, earliestTime), alpha);    AspectScorePoint best = new AspectScorePoint        (AspectValue.newAspectValue(aspectType, bestTime), 0.0);    AspectScorePoint first_late = new AspectScorePoint        (AspectValue.newAspectValue(aspectType, bestTime + dgPlugin.getFrequency()), alpha);    AspectScorePoint latest = new AspectScorePoint        (AspectValue.newAspectValue(aspectType, latestTime), alpha + lateScore);    points.addElement(badest);    points.addElement(earliest);    points.addElement(best);    points.addElement(first_late);    points.addElement(latest);    ScoringFunction score = ScoringFunction.createPiecewiseLinearScoringFunction(points.elements());    //ScoringFunction score = ScoringFunction.createStrictlyAtValue(AspectValue.newAspectValue(aspectType, bestTime));    return getPlanningFactory().newPreference(aspectType, score);  }