org.optaplanner.core.impl.exhaustivesearch.node.bounder

## Class TrendBasedScoreBounder

- java.lang.Object
- - org.optaplanner.core.impl.exhaustivesearch.node.bounder.TrendBasedScoreBounder

- All Implemented Interfaces:
    ScoreBounder

      public class TrendBasedScoreBounder
      extends Object
      implements ScoreBounder

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected InitializingScoreTrend` | `initializingScoreTrend`
    `protected ScoreDefinition` | `scoreDefinition`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TrendBasedScoreBounder(InnerScoreDirectorFactory scoreDirectorFactory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Score` | `calculateOptimisticBound(ScoreDirector scoreDirector, Score score)` In OR terms, this is called the lower bound if they minimize, and upper bound if they maximize.
    `Score` | `calculatePessimisticBound(ScoreDirector scoreDirector, Score score)` In OR terms, this is called the upper bound if they minimize, and lower bound if they maximize.

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

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

- - ### Field Detail

    - #### scoreDefinition

          protected final ScoreDefinition scoreDefinition

    - #### initializingScoreTrend

          protected final InitializingScoreTrend initializingScoreTrend

  - ### Constructor Detail

    - #### TrendBasedScoreBounder

          public TrendBasedScoreBounder(InnerScoreDirectorFactory scoreDirectorFactory)

  - ### Method Detail

    - #### calculateOptimisticBound

          public Score calculateOptimisticBound(ScoreDirector scoreDirector,
                                                Score score)

      Description copied from interface: `ScoreBounder`
      In OR terms, this is called the lower bound if they minimize, and upper bound if they maximize. Because we always maximize the `Score`, calling it lower bound would be a contradiction.
      Specified by:
        `calculateOptimisticBound` in interface `ScoreBounder`
      Parameters:
        `scoreDirector` - never null, use `ScoreDirector.getWorkingSolution()` to get the working `PlanningSolution`
        `score` - never null, the `Score` of the working `PlanningSolution`
      Returns:
        never null, never worse than the best possible `Score` we can get by initializing the uninitialized variables of the working `PlanningSolution`.
      See Also:
        `ScoreDefinition.buildOptimisticBound(InitializingScoreTrend, Score)`

    - #### calculatePessimisticBound

          public Score calculatePessimisticBound(ScoreDirector scoreDirector,
                                                 Score score)

      Description copied from interface: `ScoreBounder`
      In OR terms, this is called the upper bound if they minimize, and lower bound if they maximize. Because we always maximize the `Score`, calling it upper bound would be a contradiction.
      Specified by:
        `calculatePessimisticBound` in interface `ScoreBounder`
      Parameters:
        `scoreDirector` - never null, use `ScoreDirector.getWorkingSolution()` to get the working `PlanningSolution`
        `score` - never null, the `Score` of the working `PlanningSolution`
      Returns:
        never null, never better than the worst possible `Score` we can get by initializing the uninitialized variables of the working `PlanningSolution`.
      See Also:
        `ScoreDefinition.buildPessimisticBound(InitializingScoreTrend, Score)`

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