Solution_
- the solution type, the class with the PlanningSolution
annotationpublic class BendableLongScoreVerifier<Solution_> extends AbstractScoreVerifier<Solution_>
SolverFactory
that uses a BendableLongScore
.Modifier and Type | Field and Description |
---|---|
protected int |
hardLevelsSize |
scoreDirectorFactory
Constructor and Description |
---|
BendableLongScoreVerifier(SolverFactory<Solution_> solverFactory) |
Modifier and Type | Method and Description |
---|---|
void |
assertHardWeight(String constraintName,
int hardLevel,
long expectedWeight,
Solution_ solution)
Assert that the constraint (which is usually a score rule) of
PlanningSolution
has the expected weight for that score level. |
void |
assertHardWeight(String constraintPackage,
String constraintName,
int hardLevel,
long expectedWeight,
Solution_ solution)
Assert that the constraint (which is usually a score rule) of
PlanningSolution
has the expected weight for that score level. |
void |
assertSoftWeight(String constraintName,
int softLevel,
long expectedWeight,
Solution_ solution)
Assert that the constraint (which is usually a score rule) of
PlanningSolution
has the expected weight for that score level. |
void |
assertSoftWeight(String constraintPackage,
String constraintName,
int softLevel,
long expectedWeight,
Solution_ solution)
Assert that the constraint (which is usually a score rule) of
PlanningSolution
has the expected weight for that score level. |
assertWeight
public BendableLongScoreVerifier(SolverFactory<Solution_> solverFactory)
solverFactory
- never null, the SolverFactory
of which you want to test the constraints.public void assertHardWeight(String constraintName, int hardLevel, long expectedWeight, Solution_ solution)
PlanningSolution
has the expected weight for that score level.constraintName
- never null, the name of the constraint, which is usually the name of the score rulehardLevel
- 0 <= hardLevel <
hardLevelSize
.
The scoreLevel
is hardLevel
for hard levels and softLevel + hardLevelSize
for soft levels.expectedWeight
- the total weight for all matches of that 1 constraintsolution
- never null, the actual PlanningSolution
public void assertHardWeight(String constraintPackage, String constraintName, int hardLevel, long expectedWeight, Solution_ solution)
PlanningSolution
has the expected weight for that score level.constraintPackage
- sometimes null.
When null, constraintName
for the scoreLevel
must be unique.constraintName
- never null, the name of the constraint, which is usually the name of the score rulehardLevel
- 0 <= hardLevel <
hardLevelSize
.
The scoreLevel
is hardLevel
for hard levels and softLevel + hardLevelSize
for soft levels.expectedWeight
- the total weight for all matches of that 1 constraintsolution
- never null, the actual PlanningSolution
public void assertSoftWeight(String constraintName, int softLevel, long expectedWeight, Solution_ solution)
PlanningSolution
has the expected weight for that score level.constraintName
- never null, the name of the constraint, which is usually the name of the score rulesoftLevel
- 0 <= softLevel <
softLevelSize
.
The scoreLevel
is hardLevel
for hard levels and softLevel + hardLevelSize
for soft levels.expectedWeight
- the total weight for all matches of that 1 constraintsolution
- never null, the actual PlanningSolution
public void assertSoftWeight(String constraintPackage, String constraintName, int softLevel, long expectedWeight, Solution_ solution)
PlanningSolution
has the expected weight for that score level.constraintPackage
- sometimes null.
When null, constraintName
for the scoreLevel
must be unique.constraintName
- never null, the name of the constraint, which is usually the name of the score rulesoftLevel
- 0 <= softLevel <
softLevelSize
.
The scoreLevel
is hardLevel
for hard levels and softLevel + hardLevelSize
for soft levels.expectedWeight
- the total weight for all matches of that 1 constraintsolution
- never null, the actual PlanningSolution
Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.