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

ScoreHolder support allows empty values

XMLWordPrintable

    • Hide
      1. Create PlanningSolution with HardMediumSoft score holder
      2. In the same package create guided rule
      3. Click on the green plus button in the Then section
      4. Select Modify Sof Score
      5. Leave the appropriate input field empty
      6. Check the source code
        • There will be: scoreHolder.addHardConstraintMatch(kcontext, null);
      7. Validate the guided rule
        • The validation is successful
        • The validation should not be successful
      Show
      Create PlanningSolution with HardMediumSoft score holder In the same package create guided rule Click on the green plus button in the Then section Select Modify Sof Score Leave the appropriate input field empty Check the source code There will be: scoreHolder.addHardConstraintMatch(kcontext, null); Validate the guided rule The validation is successful The validation should not be successful
    • NEW
    • NEW

      Empty values in ScoreHolder support are translated as null in source code. If you have a look on some score holder (e.g. holder) null values are not acceptable for

      public void addSoftConstraintMatch(RuleContext kcontext, int softWeight);

      .

            mcimbora_jira Matej Čimbora (Inactive)
            rh-ee-jomarko Jozef Marko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: