Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <preprocessor.h>
Public Member Functions | |
MainLpPreprocessor (const GlopParameters *parameters) | |
MainLpPreprocessor (const MainLpPreprocessor &)=delete | |
MainLpPreprocessor & | operator= (const MainLpPreprocessor &)=delete |
~MainLpPreprocessor () override=default | |
bool | Run (LinearProgram *lp) final |
void | RecoverSolution (ProblemSolution *solution) const override |
void | DestructiveRecoverSolution (ProblemSolution *solution) |
void | SetLogger (SolverLogger *logger) |
Public Member Functions inherited from operations_research::glop::Preprocessor | |
Preprocessor (const GlopParameters *parameters) | |
Preprocessor (const Preprocessor &)=delete | |
Preprocessor & | operator= (const Preprocessor &)=delete |
virtual | ~Preprocessor () |
ProblemStatus | status () const |
virtual void | UseInMipContext () |
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 GlopParameters & | parameters_ |
bool | in_mip_context_ |
std::unique_ptr< TimeLimit > | infinite_time_limit_ |
TimeLimit * | time_limit_ |
MainLpPreprocessor This is the main LP preprocessor responsible for calling all the other preprocessors in this file, possibly more than once.
Definition at line 111 of file preprocessor.h.
|
inlineexplicit |
Definition at line 113 of file preprocessor.h.
|
delete |
|
overridedefault |
void operations_research::glop::MainLpPreprocessor::DestructiveRecoverSolution | ( | ProblemSolution * | solution | ) |
Like RecoverSolution but destroys data structures as it goes to reduce peak RAM use. After calling this the MainLpPreprocessor object may no longer be used.
Definition at line 207 of file preprocessor.cc.
|
delete |
|
overridevirtual |
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().
Implements operations_research::glop::Preprocessor.
Definition at line 200 of file preprocessor.cc.
|
finalvirtual |
Runs the preprocessor by modifying the given linear program. Returns true if a postsolve step will be needed (i.e. RecoverSolution() is not the identity function). Also updates status_ to something different from ProblemStatus::INIT if the problem was solved (including bad statuses like ProblemStatus::ABNORMAL, ProblemStatus::INFEASIBLE, etc.).
We run it a few times because running one preprocessor may allow another one to remove more stuff.
Abort early if none of the preprocessors did something. Technically this is true if none of the preprocessors above needs postsolving, which has exactly the same meaning for these particular preprocessors.
We use i here because the last pass did nothing.
If DualizerPreprocessor was run, we need to do some extra preprocessing. This is because it currently adds a lot of zero-cost singleton columns.
The scaling is controlled by use_scaling, not use_preprocessing.
Implements operations_research::glop::Preprocessor.
Definition at line 80 of file preprocessor.cc.
|
inline |
Definition at line 127 of file preprocessor.h.