解决方案克隆发生在产生“新最佳分数"的步骤中.连续 [英] Solution Cloning happening at steps that produce a "new best score" in a row

查看:74
本文介绍了解决方案克隆发生在产生“新最佳分数"的步骤中.连续的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当产生新的最佳成绩"时,最近引起我注意的是一个比其他人慢的步骤.这绝对是在产生新的最佳成绩"的每一步中发生的解决方案克隆.

Something that recently caught my attention was a step being slower than others when a "new best score" is produced. This is definitely the solution cloning that is happening at every step that produces a "new best score".

因此,如果新的最佳分数"步骤不是连续的,则可以.例如,如果我们连续有50个步骤,则解决方案克隆过程将执行50次.一种更聪明的方法是在序列末尾(仅一次)进行克隆过程.

So this is okay if the "new best score" steps are not in a row. If for example we have 50 steps in a row the solution cloning process will be executed 50 times. A smarter way would be to do the cloning process at the end of the sequence(only once).

这是可以轻松实现的东西,还是有其他东西可以阻止它?

Is this something that can be implemented easily or there is some other thing that would prevent it?

另一种想法是在每个新的最佳分数"步骤进行克隆,但仅克隆通过步骤移动而更改的计划实体实例,并将其附加到最佳解决方案中.

Another idea would be to do the cloning at every "new best score" step but only to clone the planning entity instances changed by the move selected as a step and append them to the best solution.

推荐答案

如果您连续执行了50个步骤,而前23个步骤改进了最佳解决方案,那么是否需要在该步骤的第23步中进行计划克隆工作解决方案? 是的,我们这样做了,因为不能保证接下来的27个步骤中的任何一个都会提高最佳分数,所以我们不想在步骤23松开解决方案的状态.并不是每个步骤都会提高最佳分数,有些人会去得分更低(尤其是延迟接受).

If you have 50 steps in a row, and the first 23 steps improve the best solution, do we need to do a planning clone during that step 23 of that working solution? Yes, we do, because there is no guarantee that any of the next 27 steps will improve the best score, so we don't want to loose the state of the solution at step 23. Not every step improves the best score, some go to a worse score (especially with Late Acceptance).

话虽这么说,但在构建启发式方法中-我们实际上不进行中间计划克隆,因为我们可以保证解决方案只会有所改善(初始化的变量越多越好).

That being said, in Construction Heuristics - we actually don't do intermediate planning clones because we can guarantee that the solution will only improve (more initialized variables is always better).

无论如何,使计划克隆轻巧的最佳方法是设计一个模型,使计划实体类没有任何传入引用(当然,解决方案类除外)

In any case, the best way to make planning clones light is to design a model for which the planning entity class doesn't have any incoming references (except from the solution class of course)

这篇关于解决方案克隆发生在产生“新最佳分数"的步骤中.连续的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆