Vector points = new Vector(earliest, best, first_late, latest);
points.addElement(earliest); points.addElement(best); points.addElement(first_late); points.addElement(latest);
  private Preference createRefillTimePreference(long bestDay, long start,                                                 int aspectType) {    //TODO - really need end of deployment from an OrgActivity -    // As a hack for now just add 180 days from today - note that this    // will push the possible end date out too far...    // long end = inventoryPlugin.getEndOfDeplyment());     long end = getTimeUtils().addNDays(today, 180);    double daysBetween = ((end - bestDay)  / getTimeUtils().MSEC_PER_DAY) - 1;    //Use .0033 as a slope for now    double late_score = .0033 * daysBetween;    // define alpha .25    double alpha = .25;    AspectScorePoint earliest = new AspectScorePoint(start, alpha);    AspectScorePoint best = new AspectScorePoint(bestDay, 0.0);    AspectScorePoint first_late = new AspectScorePoint(getTimeUtils().addNDays(bestDay, 1),                                                        alpha);    AspectScorePoint latest = new AspectScorePoint(end, (alpha + late_score));    Vector points = new Vector(earliest, best, first_late, latest);    ScoringFunction timeSF = ScoringFunction.      createPiecewiseLinearScoringFunction(points.elements());    return inventoryPlugin.getRootFactory().      newPreference(aspectType, timeSF);  }