Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

OptaPlanner: pillarSwapMoveSelector multiple variableNameInclude elements

$
0
0

I'm trying to specify a pillarSwapMoveSelector in my config XML which can swap all variables of an entity class which are not the chained variable (as they are not compatible with the pillar moves).

According to the OptaPlanner 8.8.0.Final documentation, the following should be valid:

<pillarSwapMoveSelector><pillarSelector><entitySelector><entityClass>a.fully.qualified.ClassName</entityClass></entitySelector></pillarSelector><variableNameInclude>planningVariable1</variableNameInclude><variableNameInclude>planningVariable2</variableNameInclude><variableNameInclude>planningVariable3</variableNameInclude></pillarSwapMoveSelector>

It seems that is it not. Is this intentionally invalid? Or is this just an issue with the documentation?

Regardless, as a work-around if it is a bug, you must use a wrapper to specify a collection of variableNameIncludes:

<pillarSwapMoveSelector><pillarSelector><entitySelector><entityClass>a.fully.qualified.ClassName</entityClass></entitySelector></pillarSelector><variableNameIncludes><variableNameInclude>planningVariable1</variableNameInclude><variableNameInclude>planningVariable2</variableNameInclude><variableNameInclude>planningVariable3</variableNameInclude></variableNameIncludes></pillarSwapMoveSelector>

Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>