optaplanner-core/src/main/java/org/optaplanner/core/api/score/buildin/hardmediumsoft/HardMediumSoftScoreHolder.java
@Override
    public void configureConstraintWeight(Rule rule, HardMediumSoftScore constraintWeight) {
        super.configureConstraintWeight(rule, constraintWeight);
        BiConsumer<RuleContext, Integer> matchExecutor;
        if (constraintWeight.equals(HardMediumSoftScore.ZERO)) {
            matchExecutor = (RuleContext kcontext, Integer weightMultiplier) -> {};
        } else if (constraintWeight.getMediumScore() == 0 && constraintWeight.getSoftScore() == 0) {
            matchExecutor = (RuleContext kcontext, Integer weightMultiplier)
                    -> addHardConstraintMatch(kcontext, constraintWeight.getHardScore() * weightMultiplier);
        } else if (constraintWeight.getHardScore() == 0 && constraintWeight.getSoftScore() == 0) {
            matchExecutor = (RuleContext kcontext, Integer weightMultiplier)
                    -> addMediumConstraintMatch(kcontext, constraintWeight.getMediumScore() * weightMultiplier);
        } else if (constraintWeight.getHardScore() == 0 && constraintWeight.getMediumScore() == 0) {
            matchExecutor = (RuleContext kcontext, Integer weightMultiplier)
                    -> addSoftConstraintMatch(kcontext, constraintWeight.getSoftScore() * weightMultiplier);
        } else {
            matchExecutor = (RuleContext kcontext, Integer weightMultiplier)
                    -> addMultiConstraintMatch(kcontext,
                    constraintWeight.getHardScore() * weightMultiplier,
                    constraintWeight.getMediumScore() * weightMultiplier,
                    constraintWeight.getSoftScore() * weightMultiplier);
        }
        matchExecutorByNumberMap.put(rule, matchExecutor);
        matchExecutorByScoreMap.put(rule, (RuleContext kcontext,
                HardMediumSoftScore weightMultiplier) -> addMultiConstraintMatch(kcontext,
                constraintWeight.getHardScore() * weightMultiplier.getHardScore(),
                constraintWeight.getMediumScore() * weightMultiplier.getMediumScore(),
                constraintWeight.getSoftScore() * weightMultiplier.getSoftScore()));
    }
@Override
    public void configureConstraintWeight(Rule rule, HardMediumSoftScore constraintWeight) {
        super.configureConstraintWeight(rule, constraintWeight);
        BiConsumer<RuleContext, Integer> matchExecutor;
        if (constraintWeight.equals(HardMediumSoftScore.ZERO)) {
            matchExecutor = (RuleContext kcontext, Integer weightMultiplier) -> {};
        } else if (constraintWeight.getMediumScore() == 0 && constraintWeight.getSoftScore() == 0) {
            matchExecutor = (RuleContext kcontext, Integer weightMultiplier)
                    -> addHardConstraintMatch(kcontext, constraintWeight.getHardScore() * weightMultiplier);
        } else if (constraintWeight.getHardScore() == 0 && constraintWeight.getSoftScore() == 0) {
            matchExecutor = (RuleContext kcontext, Integer weightMultiplier)
                    -> addMediumConstraintMatch(kcontext, constraintWeight.getMediumScore() * weightMultiplier);
        } else if (constraintWeight.getHardScore() == 0 && constraintWeight.getMediumScore() == 0) {
            matchExecutor = (RuleContext kcontext, Integer weightMultiplier)
                    -> addSoftConstraintMatch(kcontext, constraintWeight.getSoftScore() * weightMultiplier);
        } else {
            matchExecutor = (RuleContext kcontext, Integer weightMultiplier)
                    -> addMultiConstraintMatch(kcontext,
                    constraintWeight.getHardScore() * weightMultiplier,
                    constraintWeight.getMediumScore() * weightMultiplier,
                    constraintWeight.getSoftScore() * weightMultiplier);
        }
        matchExecutorByNumberMap.put(rule, matchExecutor);
        matchExecutorByScoreMap.put(rule, (RuleContext kcontext,
                HardMediumSoftScore weightMultiplier) -> addMultiConstraintMatch(kcontext,
                constraintWeight.getHardScore() * weightMultiplier.getHardScore(),
                constraintWeight.getMediumScore() * weightMultiplier.getMediumScore(),
                constraintWeight.getSoftScore() * weightMultiplier.getSoftScore()));
    }
************************************************************************