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

Workbench: scoreHolder global variable generation based on the PlanningSolution score type

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 7.0.0.Beta7
    • None
    • optaplanner-wb
    • None
    • NEW
    • NEW

      Make sure to generate/update a scoreHolder variable based on the type of the score used in a planning solution. If no planning solution is defined in a WB project, the global variable shouldn't be present.

      `scoreHolder` global variable name should be reserved in the project, PLANNER-704 resolves that.

      In the first iteration, let's prevent user from changing the value of a score type if the scoreHolder is already used in the rules. Otherwise we'd sooner or later run into issues with using incompatible constraintMatches (e.g. addMediumConstraintMatch with HardSoftScore etc.).

      A preview pane should be created in the following iteration, allowing to set migration rules when changing a score type.

      e.g. HardMediumSoftScore -> HardSoftScore
      hard -> hard
      medium -> soft
      soft -> soft

      When the previous rule is applied, `addMediumConstraintMatch` occurrences will be replaced by `addSoftConstraintMatch`. If the change causes multiple `addXYZConstraintMatch` definitions of the same type be present on the RHS of a rule, fail fast before applying the changes.

              mcimbora_jira Matej Čimbora (Inactive)
              mcimbora_jira Matej Čimbora (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: