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

#include <solve_result.h>

Public Member Functions

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

Static Public Member Functions

static absl::StatusOr< ProblemStatusFromProto (const ProblemStatusProto &problem_status_proto)
 Returns an error if the primal_status or dual_status is unspecified.
 

Public Attributes

FeasibilityStatus primal_status = FeasibilityStatus::kUndetermined
 Status for the primal problem.
 
FeasibilityStatus dual_status = FeasibilityStatus::kUndetermined
 Status for the dual problem (or for the dual of a continuous relaxation).
 
bool primal_or_dual_infeasible = false
 

Detailed Description

Feasibility status of the primal problem and its dual (or the dual of a continuous relaxation) as claimed by the solver. The solver is not required to return a certificate for the claim (e.g. the solver may claim primal feasibility without returning a primal feasible solution). This combined status gives a comprehensive description of a solver's claims about feasibility and unboundedness of the solved problem. For instance,

  • a feasible status for primal and dual problems indicates the primal is feasible and bounded and likely has an optimal solution (guaranteed for problems without non-linear constraints).
  • a primal feasible and a dual infeasible status indicates the primal problem is unbounded (i.e. has arbitrarily good solutions).
Note
a dual infeasible status by itself (i.e. accompanied by an undetermined primal status) does not imply the primal problem is unbounded as we could have both problems be infeasible. Also, while a primal and dual feasible status may imply the existence of an optimal solution, it does not guarantee the solver has actually found such optimal solution.

Definition at line 74 of file solve_result.h.

Member Function Documentation

◆ FromProto()

absl::StatusOr< ProblemStatus > operations_research::math_opt::ProblemStatus::FromProto ( const ProblemStatusProto & problem_status_proto)
static

Returns an error if the primal_status or dual_status is unspecified.

Definition at line 415 of file solve_result.cc.

◆ Proto()

ProblemStatusProto operations_research::math_opt::ProblemStatus::Proto ( ) const

Definition at line 407 of file solve_result.cc.

◆ ToString()

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

Definition at line 443 of file solve_result.cc.

Member Data Documentation

◆ dual_status

FeasibilityStatus operations_research::math_opt::ProblemStatus::dual_status = FeasibilityStatus::kUndetermined

Status for the dual problem (or for the dual of a continuous relaxation).

Definition at line 79 of file solve_result.h.

◆ primal_or_dual_infeasible

bool operations_research::math_opt::ProblemStatus::primal_or_dual_infeasible = false

If true, the solver claims the primal or dual problem is infeasible, but it does not know which (or if both are infeasible). Can be true only when primal_problem_status = dual_problem_status = kUndetermined. This extra information is often needed when preprocessing determines there is no optimal solution to the problem (but can't determine if it is due to infeasibility, unboundedness, or both).

Definition at line 87 of file solve_result.h.

◆ primal_status

FeasibilityStatus operations_research::math_opt::ProblemStatus::primal_status = FeasibilityStatus::kUndetermined

Status for the primal problem.

Definition at line 76 of file solve_result.h.


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