Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::ObjectiveBounds Struct Reference

Bounds on the optimal objective value. More...

#include <solve_result.h>

Public Member Functions

ObjectiveBoundsProto Proto () const
 
std::string ToString () const
 

Static Public Member Functions

static ObjectiveBounds MakeTrivial (bool is_maximize)
 
static ObjectiveBounds MaximizeMakeTrivial ()
 
static ObjectiveBounds MinimizeMakeTrivial ()
 
static ObjectiveBounds MakeUnbounded (bool is_maximize)
 
static ObjectiveBounds MinimizeMakeUnbounded ()
 
static ObjectiveBounds MaximizeMakeUnbounded ()
 
static ObjectiveBounds MakeOptimal (double objective_value)
 Sets both bounds to objective_value.
 
static ObjectiveBounds FromProto (const ObjectiveBoundsProto &objective_bounds_proto)
 

Public Attributes

double primal_bound = 0.0
 
double dual_bound = 0.0
 

Detailed Description

Bounds on the optimal objective value.

Definition at line 229 of file solve_result.h.

Member Function Documentation

◆ FromProto()

ObjectiveBounds operations_research::math_opt::ObjectiveBounds::FromProto ( const ObjectiveBoundsProto & objective_bounds_proto)
static

Definition at line 58 of file solve_result.cc.

◆ MakeOptimal()

ObjectiveBounds operations_research::math_opt::ObjectiveBounds::MakeOptimal ( double objective_value)
static

Sets both bounds to objective_value.

Definition at line 110 of file solve_result.cc.

◆ MakeTrivial()

ObjectiveBounds operations_research::math_opt::ObjectiveBounds::MakeTrivial ( bool is_maximize)
static

Returns trivial bounds.

Trivial bounds are:

  • for a maximization:
    • primal_bound = -inf
    • dual_bound = +inf
  • for a minimization:
    • primal_bound = +inf
    • dual_bound = -inf

Definition at line 82 of file solve_result.cc.

◆ MakeUnbounded()

ObjectiveBounds operations_research::math_opt::ObjectiveBounds::MakeUnbounded ( bool is_maximize)
static

Returns unbounded bounds.

Unbounded bounds are:

  • for a maximization:
    • primal_bound = dual_bound = +inf
  • for a minimization:
    • primal_bound = dual_bound = -inf

Definition at line 95 of file solve_result.cc.

◆ MaximizeMakeTrivial()

ObjectiveBounds operations_research::math_opt::ObjectiveBounds::MaximizeMakeTrivial ( )
static

Definition at line 88 of file solve_result.cc.

◆ MaximizeMakeUnbounded()

ObjectiveBounds operations_research::math_opt::ObjectiveBounds::MaximizeMakeUnbounded ( )
static

Definition at line 106 of file solve_result.cc.

◆ MinimizeMakeTrivial()

ObjectiveBounds operations_research::math_opt::ObjectiveBounds::MinimizeMakeTrivial ( )
static

Definition at line 91 of file solve_result.cc.

◆ MinimizeMakeUnbounded()

ObjectiveBounds operations_research::math_opt::ObjectiveBounds::MinimizeMakeUnbounded ( )
static

Definition at line 102 of file solve_result.cc.

◆ Proto()

ObjectiveBoundsProto operations_research::math_opt::ObjectiveBounds::Proto ( ) const

Definition at line 51 of file solve_result.cc.

◆ ToString()

std::string operations_research::math_opt::ObjectiveBounds::ToString ( ) const

Definition at line 76 of file solve_result.cc.

Member Data Documentation

◆ dual_bound

double operations_research::math_opt::ObjectiveBounds::dual_bound = 0.0

Solver claims there exists a dual solution that is numerically feasible (i.e. feasible up to the solvers tolerance), and whose objective value is dual_bound.

For MIP solvers, the associated dual problem may be some continuous relaxation (e.g. LP relaxation), but it is often an implicitly defined problem that is a complex consequence of the solvers execution. For both continuous and MIP solvers, the optimal value is equal or worse (larger for min objective and smaller for max objectives) than dual_bound, but only up to solver-tolerances. Some continuous solvers provide a numerically safer dual bound through solver's specific output (e.g. for PDLP, pdlp_output.convergence_information.corrected_dual_objective).

Definition at line 250 of file solve_result.h.

◆ primal_bound

double operations_research::math_opt::ObjectiveBounds::primal_bound = 0.0

Solver claims there exists a primal solution that is numerically feasible (i.e. feasible up to the solvers tolerance), and whose objective value is primal_bound.

The optimal value is equal or better (smaller for min objectives and larger for max objectives) than primal_bound, but only up to solver-tolerances.

Definition at line 236 of file solve_result.h.


The documentation for this struct was generated from the following files: