Bug 1165601 - SwapMove and PillarSwapMove return redundant values in getPlanningValues() method, if entities share some values.
Summary: SwapMove and PillarSwapMove return redundant values in getPlanningValues() me...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: OptaPlanner
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
low
high
Target Milestone: ---
: ---
Assignee: Geoffrey De Smet
QA Contact: jvahala
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-19 10:27 UTC by jvahala
Modified: 2016-04-28 05:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 14:05:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description jvahala 2014-11-19 10:27:22 UTC
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

Comment 2 Geoffrey De Smet 2014-12-03 09:30:48 UTC
We're going to fix this different, to avoid an unneeded performance loss,
as part of the big Tabu Search Rennaissance, which won't be in 6.2:
  https://issues.jboss.org/browse/PLANNER-279

Meanwhile: this issue should has no impact on the user's code and only a minor impact (if any) on the solver behavior, because AbstractTabuAcceptor puts both duplicates in the same map, so the first is discarded automatically anyway.

Comment 3 jvahala 2015-12-07 14:05:08 UTC
Since whole tabu search needs to be rewritten(see https://issues.jboss.org/browse/PLANNER-279) and since this issue is not serious perf killer I am closing the BZ


Note You need to log in before you can comment on or make changes to this bug.