Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::glop::ScalingPreprocessor Class Referencefinal

Detailed Description

ScalingPreprocessor Scales the SparseMatrix of the linear program using a SparseMatrixScaler. This is only applied if the parameter use_scaling is true.

Definition at line 1034 of file preprocessor.h.

#include <preprocessor.h>

Inheritance diagram for operations_research::glop::ScalingPreprocessor:
operations_research::glop::Preprocessor

Public Member Functions

 ScalingPreprocessor (const GlopParameters *parameters)
 ScalingPreprocessor (const ScalingPreprocessor &)=delete
ScalingPreprocessoroperator= (const ScalingPreprocessor &)=delete
 ~ScalingPreprocessor () final=default
bool Run (LinearProgram *lp) final
void RecoverSolution (ProblemSolution *solution) const final
void UseInMipContext () final
Public Member Functions inherited from operations_research::glop::Preprocessor
 Preprocessor (const GlopParameters *parameters)
 Preprocessor (const Preprocessor &)=delete
Preprocessoroperator= (const Preprocessor &)=delete
virtual ~Preprocessor ()
ProblemStatus status () const
void SetTimeLimit (TimeLimit *time_limit)

Additional Inherited Members

Protected Member Functions inherited from operations_research::glop::Preprocessor
bool IsSmallerWithinFeasibilityTolerance (Fractional a, Fractional b) const
bool IsSmallerWithinPreprocessorZeroTolerance (Fractional a, Fractional b) const
Protected Attributes inherited from operations_research::glop::Preprocessor
ProblemStatus status_
const GlopParametersparameters_
bool in_mip_context_
std::unique_ptr< TimeLimitinfinite_time_limit_
TimeLimittime_limit_

Constructor & Destructor Documentation

◆ ScalingPreprocessor() [1/2]

operations_research::glop::ScalingPreprocessor::ScalingPreprocessor ( const GlopParameters * parameters)
inlineexplicit

Definition at line 1036 of file preprocessor.h.

◆ ScalingPreprocessor() [2/2]

operations_research::glop::ScalingPreprocessor::ScalingPreprocessor ( const ScalingPreprocessor & )
delete

◆ ~ScalingPreprocessor()

operations_research::glop::ScalingPreprocessor::~ScalingPreprocessor ( )
finaldefault

Member Function Documentation

◆ operator=()

ScalingPreprocessor & operations_research::glop::ScalingPreprocessor::operator= ( const ScalingPreprocessor & )
delete

◆ RecoverSolution()

void operations_research::glop::ScalingPreprocessor::RecoverSolution ( ProblemSolution * solution) const
finalvirtual

Stores the optimal solution of the linear program that was passed to Run(). The given solution needs to be set to the optimal solution of the linear program "modified" by Run().

Make sure the variable are at they exact bounds according to their status. This just remove a really low error (about 1e-15) but allows to keep the variables at their exact bounds.

Implements operations_research::glop::Preprocessor.

Definition at line 3829 of file preprocessor.cc.

◆ Run()

bool operations_research::glop::ScalingPreprocessor::Run ( LinearProgram * lp)
finalvirtual

ScalingPreprocessor

Save the linear program bounds before scaling them.

See the doc of these functions for more details. It is important to call Scale() before the other two.

Implements operations_research::glop::Preprocessor.

Definition at line 3806 of file preprocessor.cc.

◆ UseInMipContext()

void operations_research::glop::ScalingPreprocessor::UseInMipContext ( )
inlinefinalvirtual

Some preprocessors only need minimal changes when used with integer variables in a MIP context. Setting this to true allows to consider integer variables as integer in these preprocessors.

Not all preprocessors handle integer variables correctly, calling this function on them will cause a LOG(FATAL).

Reimplemented from operations_research::glop::Preprocessor.

Definition at line 1043 of file preprocessor.h.


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