Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.drools.planner.core.score.buildin.hardandsoftlong
Interface HardAndSoftLongScore

All Superinterfaces:
  Comparable<HardAndSoftLongScore>, Score<HardAndSoftLongScore>

All Known Implementing Classes:
  DefaultHardAndSoftLongScore

    public interface HardAndSoftLongScore

extends Score<HardAndSoftLongScore>

A HardAndSoftScore is a Score based on hard and soft long constraints. Hard constraints have priority over soft constraints.

Implementations must be immutable.

See Also:
  `Score`, `DefaultHardAndSoftLongScore`

Method Summary
`long` | `getHardScore()` The total of the broken negative hard constraints and fulfilled positive hard constraints.
`long` | `getSoftScore()` The total of the broken negative soft constraints and fulfilled positive soft constraints.
`boolean` | `isFeasible()`

Methods inherited from interface org.drools.planner.core.score.Score
`add, divide, multiply, subtract, toDoubleArray`

Methods inherited from interface java.lang.Comparable
`compareTo`

Method Detail

### getHardScore

    long getHardScore()

  The total of the broken negative hard constraints and fulfilled positive hard constraints. Their weight is included in the total. The hard score is usually a negative number because most use cases only have negative constraints.

  Returns:
    higher is better, usually negative, 0 if no hard constraints are broken/fulfilled

### getSoftScore

    long getSoftScore()

  The total of the broken negative soft constraints and fulfilled positive soft constraints. Their weight is included in the total. The soft score is usually a negative number because most use cases only have negative constraints.

  In a normal score comparison, the soft score is irrelevant if the 2 scores don't have the same hard score.

  Returns:
    higher is better, usually negative, 0 if no soft constraints are broken/fulfilled

### isFeasible

    boolean isFeasible()

  Returns:
    true if the `getHardScore()` is 0L or higher

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.