Search code examples
optaplanner

Is it possible to pass a parameter to a MoveIteratorFactory


I have created a number of MoveIteratorFactorys and would like to pass a parameter (maxValue) to them. The anticipated effect would be that each iterator created with these factories is then passed this parameter - and consequently change it's behaviour.

Looking that the code and documentation, I don't think this feature exists. But maybe I am missing something?


Solution

  • The current version 7.18 doesn't support it yet, but it does support custom properties on several other config classes. In the exact same way, a future version of OptaPlanner should support it on MoveListFactoryConfig and MoveIteratorFactoryConfig. I've created an issue with code references for inspiration. (Pull requests welcome :) Otherwise I 'll code it sooner or later.