简体   繁体   English

SCIP:如何比较两个SCIP_SOL的目标值?

[英]SCIP: how to compare objective values of two SCIP_SOLs?

Is there a function that can compare two SCIP_SOLs and determine whether one SCIP_SOL is more optimal than the other? 是否有一个功能可以比较两个SCIP_SOL,并确定一个SCIP_SOL是否比另一个更优?

I am hoping to use this in a branching rule using the solutions in the solution pool. 我希望在使用解决方案池中的解决方案的分支规则中使用它。

To get the objective value of a solution you need to call SCIPgetSolOrigObj() . 为了获得解决方案的客观价值,您需要调用SCIPgetSolOrigObj() SCIP will automatically store the best found solution - call SCIPgetBestSol() to get it. SCIP将自动存储找到的最佳解决方案-调用SCIPgetBestSol()即可获取它。

There is no such thing as a "more optimal" solution. 没有“更优化”的解决方案。 If you want to compare solutions based on something other than their objective values you need to implement that metric yourself. 如果要基于目标值以外的其他条件来比较解决方案,则需要自己实施该指标。

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

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