首页  >  文章  >  timefold:是否可以通过构造启发式创建随机初始解决方案?

timefold:是否可以通过构造启发式创建随机初始解决方案?

王林
王林转载
2024-02-06 10:54:081102浏览
问题内容

我正在尝试在我的时间折叠模型中使用并行重新启动。

我希望每次重新启动都有不同的初始解决方案。 但我无法理解如何通过构造启发阶段创建随机初始解决方案。

当然,我可以自己创建初始解决方案,但我仍然想知道是否可以使用构造启发式?

我尝试过这个配置:

<constructionheuristic>
    <changemoveselector>
      <entityselector>
        <selectionorder>random</selectionorder>
      </entityselector>
    </changemoveselector>
  </constructionheuristic>

我遇到了这个错误:

java.lang.IllegalStateException: The <constructionHeuristic> contains a changeMoveSelector (ChangeMoveSelectorConfig(EntitySelectorConfig(null), null)) that contains an entitySelector (EntitySelectorConfig(null)) without explicitly configuring the <queuedEntityPlacer>.

我的时间折叠版本1.6.0


正确答案


不,但我们可以为其添加一个特定阶段(或为其重复使用 constructionheuristic 阶段),例如

<randomConstruction/>

同时,您可以定义一个 customphase

以上是timefold:是否可以通过构造启发式创建随机初始解决方案?的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文转载于:stackoverflow.com。如有侵权,请联系admin@php.cn删除