org.optaplanner.core.config.solver

## Class SolverConfig

- java.lang.Object
- - org.optaplanner.core.config.AbstractConfig<SolverConfig>
  - - org.optaplanner.core.config.solver.SolverConfig

-     public class SolverConfig
      extends AbstractConfig<SolverConfig>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Boolean` | `daemon`
    `protected static long` | `DEFAULT_RANDOM_SEED`
    `protected List<Class<?>>` | `entityClassList`
    `protected EnvironmentMode` | `environmentMode`
    `static String` | `MOVE_THREAD_COUNT_AUTO`
    `static String` | `MOVE_THREAD_COUNT_NONE`
    `protected Integer` | `moveThreadBufferSize`
    `protected String` | `moveThreadCount`
    `protected List<PhaseConfig>` | `phaseConfigList`
    `protected Class<? extends RandomFactory>` | `randomFactoryClass`
    `protected Long` | `randomSeed`
    `protected RandomType` | `randomType`
    `protected ScanAnnotatedClassesConfig` | `scanAnnotatedClassesConfig`
    `protected ScoreDirectorFactoryConfig` | `scoreDirectorFactoryConfig`
    `protected Class<?>` | `solutionClass`
    `protected Class<? extends ThreadFactory>` | `threadFactoryClass`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SolverConfig()`
    `SolverConfig(SolverConfig inheritedConfig)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected <Solution_> List<Phase<Solution_>>` | `buildPhaseList(HeuristicConfigPolicy configPolicy, BestSolutionRecaller bestSolutionRecaller, Termination termination)`
    `protected RandomFactory` | `buildRandomFactory(EnvironmentMode environmentMode_)`
    `<Solution_> SolutionDescriptor<Solution_>` | `buildSolutionDescriptor(SolverConfigContext configContext)`
    `<Solution_> Solver<Solution_>` | `buildSolver(SolverConfigContext configContext)`
    `EnvironmentMode` | `determineEnvironmentMode()`
    `protected int` | `getAvailableProcessors()`
    `Boolean` | `getDaemon()`
    `List<Class<?>>` | `getEntityClassList()`
    `EnvironmentMode` | `getEnvironmentMode()`
    `Integer` | `getMoveThreadBufferSize()`
    `String` | `getMoveThreadCount()`
    `List<PhaseConfig>` | `getPhaseConfigList()`
    `Class<? extends RandomFactory>` | `getRandomFactoryClass()`
    `Long` | `getRandomSeed()`
    `RandomType` | `getRandomType()`
    `ScanAnnotatedClassesConfig` | `getScanAnnotatedClassesConfig()`
    `ScoreDirectorFactoryConfig` | `getScoreDirectorFactoryConfig()`
    `Class<?>` | `getSolutionClass()`
    `TerminationConfig` | `getTerminationConfig()`
    `Class<? extends ThreadFactory>` | `getThreadFactoryClass()`
    `void` | `inherit(SolverConfig inheritedConfig)` Inherits each property of the `inheritedConfig` unless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).
    `void` | `offerRandomSeedFromSubSingleIndex(long subSingleIndex)`
    `protected Integer` | `resolveMoveThreadCount()`
    `void` | `setDaemon(Boolean daemon)`
    `void` | `setEntityClassList(List<Class<?>> entityClassList)`
    `void` | `setEnvironmentMode(EnvironmentMode environmentMode)`
    `void` | `setMoveThreadBufferSize(Integer moveThreadBufferSize)`
    `void` | `setMoveThreadCount(String moveThreadCount)`
    `void` | `setPhaseConfigList(List<PhaseConfig> phaseConfigList)`
    `void` | `setRandomFactoryClass(Class<? extends RandomFactory> randomFactoryClass)`
    `void` | `setRandomSeed(Long randomSeed)`
    `void` | `setRandomType(RandomType randomType)`
    `void` | `setScanAnnotatedClassesConfig(ScanAnnotatedClassesConfig scanAnnotatedClassesConfig)`
    `void` | `setScoreDirectorFactoryConfig(ScoreDirectorFactoryConfig scoreDirectorFactoryConfig)`
    `void` | `setSolutionClass(Class<?> solutionClass)`
    `void` | `setTerminationConfig(TerminationConfig terminationConfig)`
    `void` | `setThreadFactoryClass(Class<? extends ThreadFactory> threadFactoryClass)`
    `SolverConfig` | `withDaemon(Boolean daemon)`
    `SolverConfig` | `withEntityClasses(Class<?>... entityClasses)`
    `SolverConfig` | `withEntityClassList(List<Class<?>> entityClassList)`
    `SolverConfig` | `withEnvironmentMode(EnvironmentMode environmentMode)`
    `SolverConfig` | `withMoveThreadBufferSize(Integer moveThreadBufferSize)`
    `SolverConfig` | `withMoveThreadCount(String moveThreadCount)`
    `SolverConfig` | `withPhaseList(List<PhaseConfig> phaseConfigList)`
    `SolverConfig` | `withPhases(PhaseConfig... phaseConfigs)`
    `SolverConfig` | `withRandomFactoryClass(Class<? extends RandomFactory> randomFactoryClass)`
    `SolverConfig` | `withRandomSeed(Long randomSeed)`
    `SolverConfig` | `withRandomType(RandomType randomType)`
    `SolverConfig` | `withScoreDirectorFactory(ScoreDirectorFactoryConfig scoreDirectorFactoryConfig)`
    `SolverConfig` | `withSolutionClass(Class<?> solutionClass)`
    `SolverConfig` | `withTerminationConfig(TerminationConfig terminationConfig)`
    `SolverConfig` | `withThreadFactoryClass(Class<? extends ThreadFactory> threadFactoryClass)`

    - ### Methods inherited from class org.optaplanner.core.config.AbstractConfig

      `copyConfig, deduceEntityDescriptor, deduceVariableDescriptor, deduceVariableDescriptorList, newInstance, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### MOVE_THREAD_COUNT_NONE

          public static final String MOVE_THREAD_COUNT_NONE

      See Also:
        Constant Field Values

    - #### MOVE_THREAD_COUNT_AUTO

          public static final String MOVE_THREAD_COUNT_AUTO

      See Also:
        Constant Field Values

    - #### DEFAULT_RANDOM_SEED

          protected static final long DEFAULT_RANDOM_SEED

      See Also:
        Constant Field Values

    - #### environmentMode

          protected EnvironmentMode environmentMode

    - #### daemon

          protected Boolean daemon

    - #### randomType

          protected RandomType randomType

    - #### randomSeed

          protected Long randomSeed

    - #### randomFactoryClass

          protected Class<? extends RandomFactory> randomFactoryClass

    - #### moveThreadCount

          protected String moveThreadCount

    - #### moveThreadBufferSize

          protected Integer moveThreadBufferSize

    - #### threadFactoryClass

          protected Class<? extends ThreadFactory> threadFactoryClass

    - #### scanAnnotatedClassesConfig

          protected ScanAnnotatedClassesConfig scanAnnotatedClassesConfig

    - #### solutionClass

          protected Class<?> solutionClass

    - #### entityClassList

          protected List<Class<?>> entityClassList

    - #### scoreDirectorFactoryConfig

          protected ScoreDirectorFactoryConfig scoreDirectorFactoryConfig

    - #### phaseConfigList

          protected List<PhaseConfig> phaseConfigList

  - ### Constructor Detail

    - #### SolverConfig

          public SolverConfig()

    - #### SolverConfig

          public SolverConfig(SolverConfig inheritedConfig)

  - ### Method Detail

    - #### getEnvironmentMode

          public EnvironmentMode getEnvironmentMode()

    - #### setEnvironmentMode

          public void setEnvironmentMode(EnvironmentMode environmentMode)

    - #### getDaemon

          public Boolean getDaemon()

    - #### setDaemon

          public void setDaemon(Boolean daemon)

    - #### getRandomType

          public RandomType getRandomType()

    - #### setRandomType

          public void setRandomType(RandomType randomType)

    - #### getRandomSeed

          public Long getRandomSeed()

    - #### setRandomSeed

          public void setRandomSeed(Long randomSeed)

    - #### getRandomFactoryClass

          public Class<? extends RandomFactory> getRandomFactoryClass()

    - #### setRandomFactoryClass

          public void setRandomFactoryClass(Class<? extends RandomFactory> randomFactoryClass)

    - #### getMoveThreadCount

          public String getMoveThreadCount()

    - #### setMoveThreadCount

          public void setMoveThreadCount(String moveThreadCount)

    - #### getMoveThreadBufferSize

          public Integer getMoveThreadBufferSize()

    - #### setMoveThreadBufferSize

          public void setMoveThreadBufferSize(Integer moveThreadBufferSize)

    - #### getThreadFactoryClass

          public Class<? extends ThreadFactory> getThreadFactoryClass()

    - #### setThreadFactoryClass

          public void setThreadFactoryClass(Class<? extends ThreadFactory> threadFactoryClass)

    - #### getScanAnnotatedClassesConfig

          public ScanAnnotatedClassesConfig getScanAnnotatedClassesConfig()

    - #### setScanAnnotatedClassesConfig

          public void setScanAnnotatedClassesConfig(ScanAnnotatedClassesConfig scanAnnotatedClassesConfig)

    - #### getSolutionClass

          public Class<?> getSolutionClass()

    - #### setSolutionClass

          public void setSolutionClass(Class<?> solutionClass)

    - #### getEntityClassList

          public List<Class<?>> getEntityClassList()

    - #### setEntityClassList

          public void setEntityClassList(List<Class<?>> entityClassList)

    - #### getScoreDirectorFactoryConfig

          public ScoreDirectorFactoryConfig getScoreDirectorFactoryConfig()

    - #### setScoreDirectorFactoryConfig

          public void setScoreDirectorFactoryConfig(ScoreDirectorFactoryConfig scoreDirectorFactoryConfig)

    - #### getTerminationConfig

          public TerminationConfig getTerminationConfig()

    - #### setTerminationConfig

          public void setTerminationConfig(TerminationConfig terminationConfig)

    - #### getPhaseConfigList

          public List<PhaseConfig> getPhaseConfigList()

    - #### setPhaseConfigList

          public void setPhaseConfigList(List<PhaseConfig> phaseConfigList)

    - #### withEnvironmentMode

          public SolverConfig withEnvironmentMode(EnvironmentMode environmentMode)

    - #### withDaemon

          public SolverConfig withDaemon(Boolean daemon)

    - #### withRandomType

          public SolverConfig withRandomType(RandomType randomType)

    - #### withRandomSeed

          public SolverConfig withRandomSeed(Long randomSeed)

    - #### withRandomFactoryClass

          public SolverConfig withRandomFactoryClass(Class<? extends RandomFactory> randomFactoryClass)

    - #### withMoveThreadCount

          public SolverConfig withMoveThreadCount(String moveThreadCount)

    - #### withMoveThreadBufferSize

          public SolverConfig withMoveThreadBufferSize(Integer moveThreadBufferSize)

    - #### withThreadFactoryClass

          public SolverConfig withThreadFactoryClass(Class<? extends ThreadFactory> threadFactoryClass)

    - #### withSolutionClass

          public SolverConfig withSolutionClass(Class<?> solutionClass)

    - #### withEntityClassList

          public SolverConfig withEntityClassList(List<Class<?>> entityClassList)

    - #### withEntityClasses

          public SolverConfig withEntityClasses(Class<?>... entityClasses)

    - #### withScoreDirectorFactory

          public SolverConfig withScoreDirectorFactory(ScoreDirectorFactoryConfig scoreDirectorFactoryConfig)

    - #### withTerminationConfig

          public SolverConfig withTerminationConfig(TerminationConfig terminationConfig)

    - #### withPhaseList

          public SolverConfig withPhaseList(List<PhaseConfig> phaseConfigList)

    - #### withPhases

          public SolverConfig withPhases(PhaseConfig... phaseConfigs)

    - #### determineEnvironmentMode

          public EnvironmentMode determineEnvironmentMode()

    - #### offerRandomSeedFromSubSingleIndex

          public void offerRandomSeedFromSubSingleIndex(long subSingleIndex)

    - #### buildSolver

          public <Solution_> Solver<Solution_> buildSolver(SolverConfigContext configContext)

      Parameters:
        `configContext` - never null
      Returns:
        never null

    - #### buildRandomFactory

          protected RandomFactory buildRandomFactory(EnvironmentMode environmentMode_)

    - #### getAvailableProcessors

          protected int getAvailableProcessors()

    - #### resolveMoveThreadCount

          protected Integer resolveMoveThreadCount()

    - #### buildSolutionDescriptor

          public <Solution_> SolutionDescriptor<Solution_> buildSolutionDescriptor(SolverConfigContext configContext)

    - #### buildPhaseList

          protected <Solution_> List<Phase<Solution_>> buildPhaseList(HeuristicConfigPolicy configPolicy,
                                                                      BestSolutionRecaller bestSolutionRecaller,
                                                                      Termination termination)

    - #### inherit

          public void inherit(SolverConfig inheritedConfig)

      Description copied from class: `AbstractConfig`
      Inherits each property of the `inheritedConfig` unless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).

      After the inheritance, if a property on this `AbstractConfig` composition is replaced, it should not affect the inherited composition instance.

      Specified by:
        `inherit` in class `AbstractConfig<SolverConfig>`
      Parameters:
        `inheritedConfig` - never null

Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.