Minotaur 0.4.1
Docs for developers
Public Member Functions | List of all members
Minotaur::PerspCutGenerator Class Reference

Public Member Functions

 PerspCutGenerator ()
 Default constructor.
 
 PerspCutGenerator (EnvPtr env, ProblemPtr problem, EnginePtr nlpe_)
 Constructor.
 
 ~PerspCutGenerator ()
 Destructor.
 
bool addPC (RelaxationPtr rel, const double *y, UInt i, const double *ptToCut, const double *prPt, bool isObj, VariablePtr objVar, CutManagerPtr cutMan, double relVal)
 Added perspective cut to a constraint at a given point.
 
std::string getName () const
 Returns name of the handler.
 
UInt getNumCuts ()
 
void fixedValue (double *prPt, bool isObj, UInt i)
 
void addCut (RelaxationPtr rel, const double *nlpx, const double *lpx, UInt it, SeparationStatus *pcStatus)
 
void atIntPt (RelaxationPtr rel, const double *nlpx, const double *lpx, SeparationStatus *pcStatus, CutManager *)
 
void getCutFun (RelaxationPtr rel, LinearFunctionPtr *lf, UInt it, const double *x, double *c, int *error)
 
bool addCutToRel (RelaxationPtr rel, const double *ptToCut, LinearFunctionPtr lf, double c, VariablePtr objVar, double relVal, CutManagerPtr)
 Add PCut torelaxation.
 
void oriFeasPt (RelaxationPtr rel, const double *x)
 Iterate over PR amenable constraints to add PCut;. More...
 
void oriInfeasPt (RelaxationPtr rel, const double *x)
 
void atPtx (RelaxationPtr rel, const double *x)
 
void cutToCons (RelaxationPtr rel, const double *x, UInt it)
 
bool bisecPt (double *x, double *newPt, UInt i, bool isObj, double relVal)
 
void cvxCombPt (RelaxationPtr rel, const double *y, UInt it)
 
bool changeVarForm (VariablePtr v, double xc, double sb, UInt itn, double *newPt, bool isObj, bool nlin)
 
void linearAt (RelaxationPtr rel, const double *x, const double *prPt, double *c, LinearFunctionPtr *lf, UInt itn, int *error, bool isObj)
 
std::vector< prConsgetPRCons ()
 Return vector of perspective amenable constraint.
 
prObj getPRObj ()
 
UInt isFeasible (const double *x, UInt i, bool isObj, double relVal)
 Check feasibility of PR amenable constraints at the given solution.
 
bool prVars (const double *y, double *prPt, UInt itn, bool isObj)
 Generate variables for PR reformulation. Case in which z = 0 fixes x.
 
void findPRCons ()
 
bool uniDirZSearch (double *y, double *newPt, UInt i, double zdir)
 
bool getStatus ()
 Return 1 if there are PR amenable constraints in the problem.
 
bool lineSearchAC (double *y, double *newPt, UInt i, bool isObj, double relVal)
 Perform line search using analytical center solC_. This search happens.
 
void writeStats (std::ostream &out) const
 Writes statistics.
 

Member Function Documentation

◆ addCut()

void Minotaur::PerspCutGenerator::addCut ( RelaxationPtr  rel,
const double *  nlpx,
const double *  lpx,
UInt  it,
SeparationStatus pcStatus 
)

Add Perspective cut (PCut) to a violated PR amenable constraint whose associated binary variable in integer at the given point (nlpx).

◆ atIntPt()

void Minotaur::PerspCutGenerator::atIntPt ( RelaxationPtr  rel,
const double *  nlpx,
const double *  lpx,
SeparationStatus pcStatus,
CutManager  
)

Add PCut to violated PR amenable constraints whose associated binary variable in integer at the given point (nlpx).

◆ atPtx()

void Minotaur::PerspCutGenerator::atPtx ( RelaxationPtr  rel,
const double *  x 
)

Add PCut to a PR amenable constraint. If both the original and PR amenable constraints are satisfied at x, PCut is added at x. If only former is satisfied, then a point feasible to latter is obtained using bisection at which PCut is then added. If both the constraints are not satisfied then first a point feasible to original constraint is obtained using which a point satisfying PR amneable constraint is obtained using bisection, at which PCut is added.

◆ bisecPt()

bool PerspCutGenerator::bisecPt ( double *  x,
double *  newPt,
UInt  i,
bool  isObj,
double  relVal 
)

Determine a point feasible to orginal constraint when the given point (x) violates both original and PR reformulated constraints. Give variable values when associated binary variable is 0 for a PR amenable constraint. Find a point (w1) feasible to original constraint using bisection method on points x and w, where former in feasible and latter is infeasible to the original constraint. Given point (x,z) violating PR amenable constraint. Also, known that (x,1) satisfies the PR constraint. Perform the bisection to find boundary point.

◆ getCutFun()

void Minotaur::PerspCutGenerator::getCutFun ( RelaxationPtr  rel,
LinearFunctionPtr lf,
UInt  it,
const double *  x,
double *  c,
int *  error 
)

Add OA cut to original constraint of a violated PR constraint whose associated binary variable has value 0. Add PCut to a PR amenable constraint whose associated binary variable in integer at the given point (nlpx).

◆ linearAt()

void PerspCutGenerator::linearAt ( RelaxationPtr  rel,
const double *  x,
const double *  prPt,
double *  c,
LinearFunctionPtr lf,
UInt  itn,
int *  error,
bool  isObj 
)

Given outer-approximatio to a violated PR constraint

◆ oriFeasPt()

void Minotaur::PerspCutGenerator::oriFeasPt ( RelaxationPtr  rel,
const double *  x 
)

Iterate over PR amenable constraints to add PCut;.

Add PCut to a PR amenable constraint. At point (x) original constraint is known to be satisfied but not necessarily PR constraint. If PR constraint is satisfied at x then PCut is added at x. Otherwise, a feasible point to add PCut is obtained using bisection.


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