I'm trying to implement my own MoveListFactory
and don't know how to access / create the variable descriptors for the move I want to instantiate. The createMoveList
method (from the MoveListFactory
interface) takes a single argument of an instance of my Solution
class. From this I can access all the planning variables that I need to create a ChainSwapMove
. What I'm unsure about is how to create the first argument that the ChainSwapMove
constructor requires (e.g. the Collection<GenuineVariableDescriptor>
). The example in the documentation doesn't shed any light on this process since the custom move used in the NQueens example doesn't require this Collection of GenuineVariableDescriptors
. I've not come across any examples of how someone can access these from only the information contained in a Solution
object.
How do you create a Collection of GenuineVariableDescriptors?
128 views Asked by Alastair At
1
Anything ending with
*Descriptor
is very internal API, not the kind of classes I want users to be using. The docs presume you build your own move (which is difficult indeed to build a valid move on chained variables that leaves the chain in a valid state).That being said, here's a clue:
InnerScoreDirector.getSolutionDescriptor().getEntityDescripor(MyCustomer.class).getVariableDescriptor("myPreviousStandstill")
...