0

Is there a function that can compare two SCIP_SOLs and determine whether one SCIP_SOL is more optimal than the other?

I am hoping to use this in a branching rule using the solutions in the solution pool.

1 Answers1

1

To get the objective value of a solution you need to call SCIPgetSolOrigObj(). SCIP will automatically store the best found solution - call SCIPgetBestSol() to get it.

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.

mattmilten
  • 6,242
  • 3
  • 35
  • 65
  • 1
    It would be better to use `SCIPgetSolObj()` within the transformed space in the case of a branching rule, which saves the case distinction between minimization and maximization. – Gregor Nov 04 '18 at 15:37