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

Add with() methods on *MoveSelectorConfig, EntitySelectorConfig, ValueSelectorConfig, etc

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 8.34.0.Final
    • None
    • optaplanner-core
    • None
    • NEW
    • NEW

      Motivation:

                  ChangeMoveSelectorConfig changeMoveSelector = new ChangeMoveSelectorConfig();
                  EntitySelectorConfig entitySelector1 = new EntitySelectorConfig();
                  entitySelector1.setId("entitySelector1");
                  changeMoveSelector.setEntitySelectorConfig(entitySelector1);
                  ValueSelectorConfig valueSelector1 = new ValueSelectorConfig();
                  NearbySelectionConfig nearbySelection1 = new NearbySelectionConfig();
                  EntitySelectorConfig entitySelector1Ref = new EntitySelectorConfig();
                  entitySelector1.setMimicSelectorRef("entitySelector1");
                  nearbySelection1.setOriginEntitySelectorConfig(entitySelector1Ref);
                  nearbySelection1.setNearbyDistanceMeterClass(CustomerNearbyDistanceMeter.class);
                  nearbySelection1.setParabolicDistributionSizeMaximum(40);
                  valueSelector1.setNearbySelectionConfig(nearbySelection1);
                  changeMoveSelector.setValueSelectorConfig(valueSelector1);
                  
                  SwapMoveSelectorConfig swapMoveSelectorConfig = new SwapMoveSelectorConfig();
                  // TODO
                  TailChainSwapMoveSelectorConfig tailChainSwapMoveSelectorConfig = new TailChainSwapMoveSelectorConfig();
                  // TODO
                  
                  solverConfig.withPhases(
                          new ConstructionHeuristicPhaseConfig(),
                          new LocalSearchPhaseConfig()
                                  .withMoveSelectorConfig(new UnionMoveSelectorConfig().withMoveSelectors(
                                          changeMoveSelector,
                                          swapMoveSelectorConfig,
                                          tailChainSwapMoveSelectorConfig
                                  ))
                  );
      

      See also MoveSelectorConfig, SolverConfig, etc.

              lpetrovi@redhat.com Lukáš Petrovický (Inactive)
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: