【问题标题】:OptaPlanner how to reject moves on Heuristic PartOptaPlanner 如何拒绝启发式部分的移动
【发布时间】:2019-12-06 15:43:06
【问题描述】:

我正在做一个项目,我不得不拒绝某些动作进行测试。 我已经使用“isMoveDoable”在本地搜索中做到了这一点,但 ConstructionHeuristics 可能需要不同的配置。我不想删除启发式部分,因为它非常有效。

  <!-- Power tweaked optimization algorithms configuration -->
  <constructionHeuristic> 
    <constructionHeuristicType>FIRST_FIT_DECREASING</constructionHeuristicType>
  </constructionHeuristic>

  <localSearch>
    <localSearchType>TABU_SEARCH</localSearchType>

    <moveListFactory>
      <moveListFactoryClass>org.optaplanner.examples.cloudbalancing.optional.move.CloudBusChangeMoveFactory</moveListFactoryClass>
    </moveListFactory>

    <!--<unionMoveSelector>-->
      <!--<changeMoveSelector/>-->
      <!--<swapMoveSelector/>-->
      <!--<pillarChangeMoveSelector/>-->
      <!--<pillarSwapMoveSelector/>-->
    <!--</unionMoveSelector>-->

    <!--<acceptor>-->
        <!--<entityTabuRatio>0.1</entityTabuRatio>-->
    <!--</acceptor>-->
    <!--<forager>-->
      <!--<acceptedCountLimit>1000</acceptedCountLimit>-->
    <!--</forager>-->
  </localSearch>

【问题讨论】:

    标签: drools optaplanner heuristics


    【解决方案1】:

    听起来您正在寻找移动过滤(请参阅文档)。不要使用isDoable() 过滤掉评估不感兴趣的动作。

    但是,我不是移动过滤的忠实粉丝 - 对于“我们如何提高解决方案质量”的问题,它通常是错误的解决方案。必须在每个移动选择器上配置它是一件痛苦的事。相反,使用 optaplanner-benchmark 来确定分数计算速度是否良好(至少在 1000 以上!)。如果不是,请找到约束中的瓶颈。如果是,请添加粗粒度移动以更快地摆脱局部最优。

    【讨论】:

    • 我明白你在说什么,但我必须拒绝我之前说过的一些动作,但我不想删除它们,因为它们的分数对我的解决方案很重要。你有什么建议?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-05-08
    • 2015-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-05
    • 1970-01-01
    相关资源
    最近更新 更多