Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-1479

Avoid before/after calls in PFC's: scoreDirector.changeProblemProperty(T object, Consumer<T>)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • optaplanner-core
    • NEW
    • NEW

      before:

                  OptaConfiguration optaConfiguration = solution.getConfiguration();
                  scoreDirector.beforeProblemPropertyChanged(optaConfiguration);
                  optaConfiguration.setLastDispatchOfAnyMechanicTimeMillis(timeMillis);
                  scoreDirector.afterProblemPropertyChanged(optaConfiguration);
      

      after:

      scoreDirector.changeProblemProperty(solution.getConfiguration(), configuration -> {
            optaConfiguration.setLastDispatchOfAnyMechanicTimeMillis(timeMillis)
      });
      

              Unassigned Unassigned
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: