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

<customPhase> should support parameters in the solver configuration (so it can be tweaked using the benchmarker)

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 6.4.0.Beta1
    • 6.3.0.Final
    • optaplanner-core
    • None
    • NEW
    • NEW

      With customPhase, users can plug in their own algorithms easily. But any parameters for such an algorithm would be hardcoded. Yet, they might still want to tweak their parameters and reuse the benchmarker to do that.

      I propose adding a new method to the CustomPhaseCommand interface (which isn't part of the public api yet, so we can still break backwards compatibility by documenting it in the upgrade recipe) called setParameters():

      public interface CustomPhaseCommand {
      
         void setParameters(Map<String, String> parameters);   
      
          void changeWorkingSolution(ScoreDirector scoreDirector);
      
      }
      

      Note: There parameters are always strings, parsing to ints etc is the setParameters's responsibility. That method is free to fail fast when needed, as it's called during bootstrap.

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

                Created:
                Updated:
                Resolved: