org.optaplanner.constraint.streams.bavet.BavetConstraint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of optaplanner-constraint-streams-bavet Show documentation
Show all versions of optaplanner-constraint-streams-bavet Show documentation
OptaPlanner solves planning problems.
This lightweight, embeddable planning engine implements powerful and scalable algorithms
to optimize business resource scheduling and planning.
This module contains implementation of Constraint streams (Bavet).
package org.optaplanner.constraint.streams.bavet;
import java.util.Set;
import java.util.function.Function;
import org.optaplanner.constraint.streams.bavet.common.BavetAbstractConstraintStream;
import org.optaplanner.constraint.streams.bavet.common.BavetScoringConstraintStream;
import org.optaplanner.constraint.streams.common.AbstractConstraint;
import org.optaplanner.constraint.streams.common.ScoreImpactType;
import org.optaplanner.core.api.score.Score;
public final class BavetConstraint
extends AbstractConstraint, BavetConstraintFactory> {
private final BavetScoringConstraintStream scoringConstraintStream;
public BavetConstraint(BavetConstraintFactory constraintFactory, String constraintPackage,
String constraintName, Function> constraintWeightExtractor,
ScoreImpactType scoreImpactType, boolean isConstraintWeightConfigurable,
BavetScoringConstraintStream scoringConstraintStream) {
super(constraintFactory, constraintPackage, constraintName, constraintWeightExtractor, scoreImpactType,
isConstraintWeightConfigurable);
this.scoringConstraintStream = scoringConstraintStream;
}
// ************************************************************************
// Node creation
// ************************************************************************
@Override
public String toString() {
return "BavetConstraint(" + getConstraintId() + ")";
}
public void collectActiveConstraintStreams(Set> constraintStreamSet) {
scoringConstraintStream.collectActiveConstraintStreams(constraintStreamSet);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy