Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::glop::Preprocessor Class Referenceabstract

#include <preprocessor.h>

Inheritance diagram for operations_research::glop::Preprocessor:
operations_research::glop::AddSlackVariablesPreprocessor operations_research::glop::DoubletonEqualityRowPreprocessor operations_research::glop::DoubletonFreeColumnPreprocessor operations_research::glop::DualizerPreprocessor operations_research::glop::EmptyColumnPreprocessor operations_research::glop::EmptyConstraintPreprocessor operations_research::glop::FixedVariablePreprocessor operations_research::glop::ForcingAndImpliedFreeConstraintPreprocessor operations_research::glop::FreeConstraintPreprocessor operations_research::glop::ImpliedFreePreprocessor operations_research::glop::MainLpPreprocessor operations_research::glop::ProportionalColumnPreprocessor operations_research::glop::ProportionalRowPreprocessor operations_research::glop::ScalingPreprocessor operations_research::glop::ShiftVariableBoundsPreprocessor operations_research::glop::SingletonColumnSignPreprocessor operations_research::glop::SingletonPreprocessor operations_research::glop::ToMinimizationPreprocessor operations_research::glop::UnconstrainedVariablePreprocessor

Public Member Functions

 Preprocessor (const GlopParameters *parameters)
 
 Preprocessor (const Preprocessor &)=delete
 
Preprocessoroperator= (const Preprocessor &)=delete
 
virtual ~Preprocessor ()
 
virtual bool Run (LinearProgram *lp)=0
 
virtual void RecoverSolution (ProblemSolution *solution) const =0
 
ProblemStatus status () const
 
virtual void UseInMipContext ()
 
void SetTimeLimit (TimeLimit *time_limit)
 

Protected Member Functions

bool IsSmallerWithinFeasibilityTolerance (Fractional a, Fractional b) const
 
bool IsSmallerWithinPreprocessorZeroTolerance (Fractional a, Fractional b) const
 

Protected Attributes

ProblemStatus status_
 
const GlopParameters & parameters_
 
bool in_mip_context_
 
std::unique_ptr< TimeLimitinfinite_time_limit_
 
TimeLimittime_limit_
 

Detailed Description

Preprocessor This is the base class for preprocessors.

Todo
(user): On most preprocessors, calling Run() more than once will not work as expected. Fix? or document and crash in debug if this happens.

Definition at line 49 of file preprocessor.h.

Constructor & Destructor Documentation

◆ Preprocessor() [1/2]

operations_research::glop::Preprocessor::Preprocessor ( const GlopParameters * parameters)
explicit

Preprocessor

Definition at line 62 of file preprocessor.cc.

◆ Preprocessor() [2/2]

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

◆ ~Preprocessor()

operations_research::glop::Preprocessor::~Preprocessor ( )
virtual

Definition at line 68 of file preprocessor.cc.

Member Function Documentation

◆ IsSmallerWithinFeasibilityTolerance()

bool operations_research::glop::Preprocessor::IsSmallerWithinFeasibilityTolerance ( Fractional a,
Fractional b ) const
inlineprotected

Returns true if a is less than b (or slighlty greater than b with a given tolerance).

Definition at line 86 of file preprocessor.h.

◆ IsSmallerWithinPreprocessorZeroTolerance()

bool operations_research::glop::Preprocessor::IsSmallerWithinPreprocessorZeroTolerance ( Fractional a,
Fractional b ) const
inlineprotected
Todo
(user): use an absolute tolerance here to be even more defensive?

Definition at line 90 of file preprocessor.h.

◆ operator=()

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

◆ RecoverSolution()

◆ Run()

virtual bool operations_research::glop::Preprocessor::Run ( LinearProgram * lp)
pure virtual

◆ SetTimeLimit()

void operations_research::glop::Preprocessor::SetTimeLimit ( TimeLimit * time_limit)
inline

Definition at line 81 of file preprocessor.h.

◆ status()

ProblemStatus operations_research::glop::Preprocessor::status ( ) const
inline

Returns the status of the preprocessor. A status different from ProblemStatus::INIT means that the problem is solved and there is not need to call subsequent preprocessors.

Definition at line 71 of file preprocessor.h.

◆ UseInMipContext()

virtual void operations_research::glop::Preprocessor::UseInMipContext ( )
inlinevirtual

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 in operations_research::glop::DualizerPreprocessor, operations_research::glop::ProportionalColumnPreprocessor, and operations_research::glop::ScalingPreprocessor.

Definition at line 79 of file preprocessor.h.

Member Data Documentation

◆ in_mip_context_

bool operations_research::glop::Preprocessor::in_mip_context_
protected

Definition at line 99 of file preprocessor.h.

◆ infinite_time_limit_

std::unique_ptr<TimeLimit> operations_research::glop::Preprocessor::infinite_time_limit_
protected

Definition at line 100 of file preprocessor.h.

◆ parameters_

const GlopParameters& operations_research::glop::Preprocessor::parameters_
protected

Definition at line 98 of file preprocessor.h.

◆ status_

ProblemStatus operations_research::glop::Preprocessor::status_
protected

Definition at line 97 of file preprocessor.h.

◆ time_limit_

TimeLimit* operations_research::glop::Preprocessor::time_limit_
protected

Definition at line 101 of file preprocessor.h.


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