Class HardSoftDoubleScoreHolder

    • Field Detail

      • matchExecutorByNumberMap

        protected final Map<org.kie.api.definition.rule.Rule,​BiConsumer<org.kie.api.runtime.rule.RuleContext,​Double>> matchExecutorByNumberMap
        Deprecated.
      • hardScore

        protected double hardScore
        Deprecated.
      • softScore

        protected double softScore
        Deprecated.
    • Constructor Detail

      • HardSoftDoubleScoreHolder

        public HardSoftDoubleScoreHolder​(boolean constraintMatchEnabled)
        Deprecated.
    • Method Detail

      • getHardScore

        public double getHardScore()
        Deprecated.
      • getSoftScore

        public double getSoftScore()
        Deprecated.
      • penalize

        public void penalize​(org.kie.api.runtime.rule.RuleContext kcontext)
        Deprecated.
        Penalize a match by the ConstraintWeight negated.
        Parameters:
        kcontext - never null, the magic variable in DRL
      • penalize

        public void penalize​(org.kie.api.runtime.rule.RuleContext kcontext,
                             double weightMultiplier)
        Deprecated.
        Penalize a match by the ConstraintWeight negated and multiplied with the weightMultiplier for all score levels.
        Parameters:
        kcontext - never null, the magic variable in DRL
        weightMultiplier - at least 0
      • penalize

        public void penalize​(org.kie.api.runtime.rule.RuleContext kcontext,
                             double hardWeightMultiplier,
                             double softWeightMultiplier)
        Deprecated.
        Penalize a match by the ConstraintWeight negated and multiplied with the specific weightMultiplier per score level. Slower than penalize(RuleContext, double).
        Parameters:
        kcontext - never null, the magic variable in DRL
        hardWeightMultiplier - at least 0
        softWeightMultiplier - at least 0
      • reward

        public void reward​(org.kie.api.runtime.rule.RuleContext kcontext)
        Deprecated.
        Reward a match by the ConstraintWeight.
        Parameters:
        kcontext - never null, the magic variable in DRL
      • reward

        public void reward​(org.kie.api.runtime.rule.RuleContext kcontext,
                           double weightMultiplier)
        Deprecated.
        Reward a match by the ConstraintWeight multiplied with the weightMultiplier for all score levels.
        Parameters:
        kcontext - never null, the magic variable in DRL
        weightMultiplier - at least 0
      • reward

        public void reward​(org.kie.api.runtime.rule.RuleContext kcontext,
                           double hardWeightMultiplier,
                           double softWeightMultiplier)
        Deprecated.
        Reward a match by the ConstraintWeight multiplied with the specific weightMultiplier per score level. Slower than reward(RuleContext, double).
        Parameters:
        kcontext - never null, the magic variable in DRL
        hardWeightMultiplier - at least 0
        softWeightMultiplier - at least 0
      • addHardConstraintMatch

        public void addHardConstraintMatch​(org.kie.api.runtime.rule.RuleContext kcontext,
                                           double hardWeight)
        Deprecated.
        Parameters:
        kcontext - never null, the magic variable in DRL
        hardWeight - higher is better, negative for a penalty, positive for a reward
      • addSoftConstraintMatch

        public void addSoftConstraintMatch​(org.kie.api.runtime.rule.RuleContext kcontext,
                                           double softWeight)
        Deprecated.
        Parameters:
        kcontext - never null, the magic variable in DRL
        softWeight - higher is better, negative for a penalty, positive for a reward
      • addMultiConstraintMatch

        public void addMultiConstraintMatch​(org.kie.api.runtime.rule.RuleContext kcontext,
                                            double hardWeight,
                                            double softWeight)
        Deprecated.
        Parameters:
        kcontext - never null, the magic variable in DRL
        hardWeight - higher is better, negative for a penalty, positive for a reward
        softWeight - higher is better, negative for a penalty, positive for a reward