Enum Class ConstraintMatchPolicy
java.lang.Object
java.lang.Enum<ConstraintMatchPolicy>
ai.timefold.solver.core.impl.score.constraint.ConstraintMatchPolicy
- All Implemented Interfaces:
Serializable,Comparable<ConstraintMatchPolicy>,Constable
Determines whether constraint match is enabled and whether constraint match justification is enabled.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanstatic ConstraintMatchPolicymatch(ScoreAnalysisFetchPolicy scoreAnalysisFetchPolicy) To achieve the most performance out of the underlying solver, the policy should match whatever policy was used for score analysis.static ConstraintMatchPolicyReturns the enum constant of this class with the specified name.static ConstraintMatchPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DISABLED
-
ENABLED_WITHOUT_JUSTIFICATIONS
-
ENABLED
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
match
To achieve the most performance out of the underlying solver, the policy should match whatever policy was used for score analysis. For example, if the fetch policy specifies that only match counts are necessary and not matches themselves (ScoreAnalysisFetchPolicy.FETCH_MATCH_COUNT), we can configure the solver to not produce justifications (ENABLED_WITHOUT_JUSTIFICATIONS).- Parameters:
scoreAnalysisFetchPolicy-- Returns:
- Match policy best suited for the given fetch policy.
-
isEnabled
public boolean isEnabled() -
isJustificationEnabled
public boolean isJustificationEnabled()
-