Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-284

Ability to report multiple scores from a single rule

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 6.3.0.CR2
    • None
    • None
    • None

      The ability to report multiple scores from a single rule would improve performance when a single rule could be used to retrieve data for multiple scores. This would be very helpful to report scores that should not be folded. Currently, OptaPlanner just reports the last score in the list.

      An example would be.

      when
       ...
      then 
         scoreHolder.addHardConstraintMatch(kcontext, 3, ($accessoryA == true ? -1 : 0));
         scoreHolder.addHardConstraintMatch(kcontext, 4, ($accessoryB == true ? -1 : 0));
         scoreHolder.addHardConstraintMatch(kcontext, 5,  ($combinedUse == true ? 1 : 0));
      

      See also
      http://stackoverflow.com/questions/31676541/use-hard-soft-constraint-score-at-same-time-in-drool-optaplanner

            oskopek Ondrej Skopek (Inactive)
            ctoczycki Christopher Toczycki (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: