示例#1
0
 private SizeDimension calcSizeAt(boolean start) {
   SizeDimension size = SizeDimension.EMPTY;
   for (JobActivity act : activityList.getAll()) {
     size = size.add(act.getLoadChange());
   }
   if (start) return size.getNegativeDimensions().abs();
   else return size.getPositiveDimensions();
 }
示例#2
0
 protected void prepareCaches() {
   allLocations = new ArrayList<>();
   allTimeWindows = new LinkedHashSet<>();
   activityList
       .getAll()
       .stream()
       .forEach(
           ja -> {
             addLocation(ja.getLocation());
             addTimeWindows(ja.getTimeWindows());
           });
   sizeAtStart = calcSizeAt(true);
   sizeAtEnd = calcSizeAt(false);
 }