Simplify solution ownership in MultiPlanning under CBR

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, CBR strategies which invoke multiplanning must re-enumerate solutions as MultiPlanner takes ownership of the solution vector, to split each solution into a candidate in MultiPlanStage.

      This was reasonable when MultiPlanner was the only entity.

      However, CBR also requires access to the solutions (but does not require moving ownership around).

      The combination of CBR and MP must:

      • Cost the plans
      • Gather MP metrics for the plans
      • Safely convey explain data to the explainer (including ensuring rejected solutions are still accessible)
      • Safely transfer ownership of the winning solution to execution

      As a step towards this, CBR should move to using MultiPlanStage, which should in turn be changed to not take ownership of solutions.

      Then, ownership of solutions remains in the RankingContext for CBR, and in the MultiPlanner for "traditional" multiplanning.

      Once ranking is complete, ownership of all solutions can cleanly be transferred to the executor.

      This will:

      • reduce the complexity of the ranker code
      • avoid puzzling situations like "CBR ranked solutions, the vector size is 1, but it is a nullptr because ownership is elsewhere in this particular path"
      • Unblock improvements to PlanExplainerData ownership

            Assignee:
            James Harrison
            Reporter:
            James Harrison
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: