首頁  >  文章  >  timefold:是否可以透過建構啟發式來創建隨機初始解決方案?

timefold:是否可以透過建構啟發式來創建隨機初始解決方案?

王林
王林轉載
2024-02-06 10:54:081103瀏覽
問題內容

我正在嘗試在我的時間折疊模型中使用並行重新啟動。

我希望每次重新啟動都有不同的初始解決方案。 但我無法理解如何透過建構啟發階段創建隨機初始解決方案。

當然,我可以自己創建初始解決方案,但我仍然想知道是否可以使用建構啟發式?

我嘗試過這個配置:

<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刪除