Minotaur 0.4.1
Docs for developers
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Minotaur::Presolver Class Reference

#include <Presolver.h>

Collaboration diagram for Minotaur::Presolver:
Collaboration graph
[legend]

Public Member Functions

 Presolver ()
 Default constructor.
 
 Presolver (ProblemPtr problem, EnvPtr env, HandlerVector handlers)
 Constructor for a given problem.
 
virtual ~Presolver ()
 Destroy.
 
virtual void presolve ()
 Default presolve.
 
virtual SolutionPtr getSolution ()
 get solution if any
 
virtual SolveStatus getStatus ()
 
virtual void standardize ()
 
virtual SolveStatus solve ()
 
virtual void removeDuplicates ()
 Search and remove any duplicate rows and columns from the problem.
 
virtual void getX (const double *x, DoubleVector *newx)
 
SolutionPtr getPostSol (SolutionPtr s)
 

Protected Member Functions

void removeEmptyObj_ ()
 Remove objective function, if it is zero or constant.
 
void minimizify_ ()
 convert to minimization problem.
 
void linearizeObjective_ ()
 
void ifIntsAreBins_ ()
 
void standardizeConstraints_ ()
 

Protected Attributes

EnvPtr env_
 Environment.
 
double eTol_
 Tolerance for checking feasibility.
 
HandlerVector handlers_
 Handlers used to presolve the problem.
 
double intTol_
 A value in [z-intTol_, z+intTol_], z integer, will be treated as z.
 
LoggerPtr logger_
 Log manager.
 
PreModQ mods_
 A queue of presolve-modifications required for post-solve.
 
ProblemPtr problem_
 
SolutionPtr sol_
 Pointer to optimal solution, if one found.
 
SolveStatus status_
 Status.
 

Static Protected Attributes

static const std::string me_ = "Presolver: "
 For logging.
 

Detailed Description

A Presolver is used to modify a problem such that it becomes simplified or easier to solve. A Presolver, in its default form, will create a copy of the problem. A user will need to specifically tell presolver not to copy a problem. It should maintain a list of changes made to the original problem.

The Presolver may also be able to detect infeasibility, optimality, feasibility or unboundedness. A presolver in this way, is very much a solver.

Member Function Documentation

◆ getPostSol()

SolutionPtr Presolver::getPostSol ( SolutionPtr  s)

Construct a solution for the original problem from that of the presolved problem.

◆ getX()

void Presolver::getX ( const double *  x,
DoubleVector *  newx 
)
virtual

Translate a given x into solution of the original problem. The space for newx needs to be allocated.

◆ ifIntsAreBins_()

void Presolver::ifIntsAreBins_ ( )
protected

Some interfaces (like AMPL) and the users may specify binary variables as integer variables. This function converts such variables to binary.

◆ linearizeObjective_()

void Presolver::linearizeObjective_ ( )
protected

Replace the objective with a linear function. The problem remains equivalent to the one before the function is called.

◆ standardize()

void Presolver::standardize ( )
virtual

standardize is called before solving any problem even when presolve is disabled. This method is necessary to standardize the problem: convert maximize to minimize, add a new variable for the objective function, ...


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

Minotaur source code documented by Doxygen 1.9.4 on Thu Apr 24 2025