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

Contains the solution of a LinearProgram as returned by a preprocessor. More...

#include <lp_data.h>

Public Member Functions

 ProblemSolution (RowIndex num_rows, ColIndex num_cols)
 
std::string DebugString () const
 

Public Attributes

ProblemStatus status
 The solution status.
 
DenseRow primal_values
 
DenseColumn dual_values
 
VariableStatusRow variable_statuses
 
ConstraintStatusColumn constraint_statuses
 

Detailed Description

Contains the solution of a LinearProgram as returned by a preprocessor.

ProblemSolution

Definition at line 671 of file lp_data.h.

Constructor & Destructor Documentation

◆ ProblemSolution()

operations_research::glop::ProblemSolution::ProblemSolution ( RowIndex num_rows,
ColIndex num_cols )
inline

Definition at line 672 of file lp_data.h.

Member Function Documentation

◆ DebugString()

std::string operations_research::glop::ProblemSolution::DebugString ( ) const

ProblemSolution

Definition at line 1589 of file lp_data.cc.

Member Data Documentation

◆ constraint_statuses

ConstraintStatusColumn operations_research::glop::ProblemSolution::constraint_statuses

Definition at line 700 of file lp_data.h.

◆ dual_values

DenseColumn operations_research::glop::ProblemSolution::dual_values

Definition at line 684 of file lp_data.h.

◆ primal_values

DenseRow operations_research::glop::ProblemSolution::primal_values

The actual primal/dual solution values. This is what most clients will need, and this is enough for LPSolver to easily check the optimality.

Definition at line 683 of file lp_data.h.

◆ status

ProblemStatus operations_research::glop::ProblemSolution::status

The solution status.

Definition at line 679 of file lp_data.h.

◆ variable_statuses

VariableStatusRow operations_research::glop::ProblemSolution::variable_statuses

The status of the variables and constraints which is difficult to reconstruct from the solution values alone. Some remarks:

  • From this information alone, by factorizing the basis, it is easy to reconstruct the primal and dual values.
  • The main difficulty to construct this from the solution values is to reconstruct the optimal basis if some basic variables are exactly at one of their bounds (and their reduced costs are close to zero).
  • The non-basic information (VariableStatus::FIXED_VALUE, VariableStatus::AT_LOWER_BOUND, VariableStatus::AT_UPPER_BOUND, VariableStatus::FREE) is easy to construct for variables (because they are at their exact bounds). They can be guessed for constraints (here a small precision error is unavoidable). However, it is useful to carry this exact information during post-solve.

Definition at line 699 of file lp_data.h.


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