Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-1984

SwapMove and PillarSwapMove return redundant values in getPlanningValues() method, if entities share some values.

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 6.1.0
    • OptaPlanner
    • None

      Reproducer based on optaplanner unit tests:
      @Test
      public void getPlanningValues() {
      TestdataValue v1 = new TestdataValue("1");
      TestdataValue v2 = new TestdataValue("2");
      TestdataValue v3 = new TestdataValue("3");

      TestdataMultiVarEntity a = new TestdataMultiVarEntity("a", v1, v2, null);
      TestdataMultiVarEntity b = new TestdataMultiVarEntity("b", v1, v3, null);

      EntityDescriptor entityDescriptor = TestdataMultiVarEntity.buildEntityDescriptor();
      SwapMove move = new SwapMove(entityDescriptor.getGenuineVariableDescriptors(), a, b);

      List<Object> values = (List<Object>) move.getPlanningValues();
      }

      Actual results: "values" array contains

      {null, null, 1, 1, 2, 3}

      , where "1" is redundant.

      Expected results: shoudl contains only

      {null, 1, 2, 3}

      Additional info: This issue corresponds with bigger problem: https://issues.jboss.org/browse/PLANNER-278

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            jvahala Jiří Vahala (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson
            Jiří Vahala Jiří Vahala (Inactive)
            Jiří Vahala Jiří Vahala (Inactive)
            Kris Verlaenen, Lukáš Petrovický (Inactive)

              Created:
              Updated:
              Resolved:
              Archived: