简体   繁体   English

Optaplanner终止策略

[英]Optaplanner termination strategy

In the opta planner configuration ,there is a provision to specify the termination time out. 在opta计划程序配置中,有一项规定终止超时。

Is there a better way to handle the termination time out strategy? 有没有更好的方法来处理终止超时策略? For example , my problem size is small and I have set the termination time out as 10 sec. 例如,我的问题很小,我将终止超时设置为10秒。

But I can see from the logs that the best score is obtained well within 2 - 3 seconds. 但是我从日志中看到,最好的分数在2-3秒之内就能获得。 Is there any means to exit once the best score is reached ? 一旦达到最佳成绩,是否有退出的方法?

Or should the program always run till the timeout is reached and then output the best score. 还是应该始终运行程序直到达到超时,然后输出最佳分数。

Take a look at the Termination chapter in the OptaPlanner documentation. 查看OptaPlanner文档中的“ 终止”一章。

What you are referring to is called BestScoreTermination but it might not be what you actually want -- do note that OptaPlanner has no way of knowing if the score is "the optimal score"... unless you configure Exhaustive Search (which doesn't scale well). 您指的是BestScoreTermination但实际上可能不是您想要的-请注意,OptaPlanner无法知道分数是否为“最佳分数” ...除非您配置了详尽搜索(很好地缩放)。

Therefore, if you misjudge your problem and set the BestScoreTermination to something "better" than the optimal value, OptaPlanner will run until it tries out all combinations (which might take effectively forever on big problems). 因此,如果您错误判断问题并将BestScoreTermination设置为比最佳值“更好”的值,则OptaPlanner将运行直到尝试所有组合(可能对大问题永远有效)。 If you're looking for a compromise, take a look at "termination composition" 如果您正在寻求折衷方案,请查看“终止条件”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM