IBMDecisionOptimization / docplex-examples

These samples demonstrate how to use the DOcplex library to model and solve optimization problems.
https://ibmdecisionoptimization.github.io/
Apache License 2.0
396 stars 228 forks source link

How to get Best Bound when model is not MILP. Specifically when model is SOCP, MIQP. #83

Closed Ashim-Khanal closed 3 months ago

Ashim-Khanal commented 1 year ago

I am trying to retrieve the best bound (after certain specified run time) for a second-order cone program model with quadratic constraints. Since the model is not MILP, the method: "m.get_solve_details().best_bound" did not work.

Please help to get the best bound when there are quadratic constraints.

Ashim-Khanal commented 1 year ago

Following this solution worked

https://github.com/IBMDecisionOptimization/docplex-examples/issues/79#issuecomment-1277563364

    c = m.get_cplex()
    best_bound = c.solution.MIP.get_best_objective()

Thanks