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

Pause the best solution consumer

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Unresolved
    • Major
    • None
    • None
    • optaplanner-core
    • 2022 Week 02-04 (from Jan 10), 2022 Week 05-07 (from Jan 31)
    • 1
    • NEW
    • NEW

    Description

      As external changes may be arriving at SolverManager at any time, consumption of best solutions should be paused for that moment to avoid overwriting external state (e.g. a database).

      Idea:

      public void removeRoom(Room room) {
        try (solverManager.pauseBestSolutionConsumer(pid)) {
             transaction.begin();
             dao.removeRoom(); // can throw exception
             transaction.commit();
             solverManager.addProblemChange(pid, new RemoveRoom(room));
         }
      }
      

      Attachments

        Activity

          People

            rsynek@redhat.com Radovan Synek
            rsynek@redhat.com Radovan Synek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: