How to obtain the bound on the objective? #19
-
Where is the property or method that I can call to obtain the best bound given by the LP relaxation (or solving the dual) on the objective when using CBC through Sonnet? The Objective property only provides a I'm only familiar with other APIs (e.g. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Objective.Value of Sonnet returns the value of OsiSolverInterface::getObjValue(). For LPs, this is the primal objective value. For MIPs, this is the best feasible integer found so far.
See also Sonnet_CbcTests.cs line 123. I'm not sure there is a property within OsiSolverInterface that provides the value you're looking for. Let's look closer. Note: SonnetWrapper does the wrapping of the native C++ classes to .NET. Therefore, any property of the native C++ class (like OsiSolverInterface::foo) first needs to be wrapped by SonnetWrapper, but this is not done exhaustively for all properties, so you might not find what you expect. But updating the wrappers is usually simple. |
Beta Was this translation helpful? Give feedback.
-
I’ve added a Bound property to Objective. This only works for solver OsiCbc, in which case Bound will have the value of getBestPossibleObjValue(). Bound value is the best LP objective of all nodes remaining on the search tree. As such, Bound is the other side of the optimality gap from Value. For now, this feature is only available in the dev-obj-bound branch, with binaries on AppVeyor. Is this what you’re looking for? |
Beta Was this translation helpful? Give feedback.
I’ve added a Bound property to Objective. This only works for solver OsiCbc, in which case Bound will have the value of getBestPossibleObjValue(). Bound value is the best LP objective of all nodes remaining on the search tree. As such, Bound is the other side of the optimality gap from Value.
For now, this feature is only available in the dev-obj-bound branch, with binaries on AppVeyor.
Is this what you’re looking for?