Java 我如何定义nqueen';OptaPlanner的工厂在哪里?
我正在学习OptaPlanner的例子 我试图在nqueen示例中设置moveFactory。我对配置文件进行了如下修改:Java 我如何定义nqueen';OptaPlanner的工厂在哪里?,java,optaplanner,Java,Optaplanner,我正在学习OptaPlanner的例子 我试图在nqueen示例中设置moveFactory。我对配置文件进行了如下修改: <moveListFactory> <moveListFactoryClass>org.optaplanner.examples.nqueens.solver.move.factory.RowChangeMoveFactory</moveListFactoryClass> </moveListFactory> 如何正确指
<moveListFactory>
<moveListFactoryClass>org.optaplanner.examples.nqueens.solver.move.factory.RowChangeMoveFactory</moveListFactoryClass>
</moveListFactory>
如何正确指定移动工厂?
我正在使用optaplanner-distribution-7.7.0.Final
谢谢,
MH如果您有两个移动选择器,请将它们包装在
中。我将更清楚地说明错误信息。我如下所示:
<unionMoveSelector>
<changeMoveSelector>
<selectionOrder>ORIGINAL</selectionOrder>
</changeMoveSelector>
<!-- changeMoveSelector is the generic form of RowChangeMoveFactory: -->
<moveListFactory>
<moveListFactoryClass>org.optaplanner.examples.nqueens.solver.move.factory.RowChangeMoveFactory</moveListFactoryClass>
</moveListFactory>
起初的
org.optaplanner.examples.nqueens.solver.move.factory.RowChangeMoveFactory
然后,它需要。我是这样加的
<acceptedCountLimit>10</acceptedCountLimit>
10
然后,它成功了
<acceptedCountLimit>10</acceptedCountLimit>