org.optaplanner.core.api.score

## Interface FeasibilityScore<S extends FeasibilityScore>

- All Superinterfaces:
    Comparable<S>, Score<S>
  All Known Implementing Classes:
    BendableBigDecimalScore, BendableLongScore, BendableScore, HardMediumSoftBigDecimalScore, HardMediumSoftLongScore, HardMediumSoftScore, HardSoftBigDecimalScore, HardSoftDoubleScore, HardSoftLongScore, HardSoftScore

      public interface FeasibilityScore<S extends FeasibilityScore>
      extends Score<S>

  A `Score` that supports `isFeasible()`. Most `Score` implementations implement this interface (including `HardSoftScore`), except for `SimpleScore` variants.
  See Also:
    `Score`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isFeasible()` A `PlanningSolution` is feasible if it has no broken hard constraints and `Score.isSolutionInitialized()` is true.

    - ### Methods inherited from interface org.optaplanner.core.api.score.Score

      `add, divide, getInitScore, isCompatibleArithmeticArgument, isSolutionInitialized, multiply, negate, power, subtract, toInitializedScore, toLevelNumbers, toShortString, withInitScore`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Method Detail

    - #### isFeasible

          boolean isFeasible()

      A `PlanningSolution` is feasible if it has no broken hard constraints and `Score.isSolutionInitialized()` is true.
      Returns:
        true if the hard score is 0 or higher and the `Score.getInitScore()` is 0.

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