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

boolean locked to pin down immovable entities with @PlanningPin

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 7.7.0.Final
    • None
    • optaplanner-core
    • None
    • 2018 Week 05-06, 2018 Week 07-08
    • NEW
    • NEW

      It should be dead simple to make a planning entity immovable if a boolean field on it is true.
      Almost everybody needs this and the movableEntitySelectionFilter=... approach is too much work for something so common.

      Instead we want:

      @PlanningEntity
      private class Shift{
         @PlanningPinned
         private boolean lockedByHuman;
      
      }
      

      Advanced case:

      @PlanningEntity
      private class Shift{
         @PlanningPinned
         private boolean lockedByHuman;
         @PlanningPinned
         private boolean borrowedByAnotherDepartment;
         @PlanningPinned
         private boolean lockedBecauseItsHistory;
      
      }
      

      Open question: how shall we call that annotation? @PlanningPinned or @PlanningLocked or @PlanningImmovable?

              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: