Class to validate or reject a cut. More...
#include <CglLandPValidator.hpp>
Public Types | |
enum | RejectionsReasons { NoneAccepted = 0, SmallViolation, SmallCoefficient, BigDynamic, DenseCut, EmptyCut, DummyEnd } |
Reasons for rejecting a cut. More... | |
Public Member Functions | |
Validator (double maxFillIn=1., double maxRatio=1e8, double minViolation=0, bool scale=false, double rhsScale=1) | |
Constructor with default values. | |
int | cleanCut (OsiRowCut &aCut, const double *solCut, const OsiSolverInterface &si, const CglParam &par, const double *colLower, const double *colUpper) const |
Clean an OsiCut. | |
int | cleanCut2 (OsiRowCut &aCut, const double *solCut, const OsiSolverInterface &si, const CglParam &par, const double *colLower, const double *colUpper) const |
Clean an OsiCut by another method. | |
int | operator() (OsiRowCut &aCut, const double *solCut, const OsiSolverInterface &si, const CglParam &par, const double *colLower, const double *colUpper) const |
Call the cut cleaner. | |
const std::string & | failureString (RejectionsReasons code) const |
const std::string & | failureString (int code) const |
int | numRejected (RejectionsReasons code) const |
int | numRejected (int code) const |
set functions | |
void | setMaxFillIn (double value) |
void | setMaxRatio (double value) |
void | setMinViolation (double value) |
void | setRhsScale (double v) |
get functions | |
double | getMaxFillIn () |
double | getMaxRatio () |
double | getMinViolation () |
Static Private Member Functions | |
static void | fillRejectionReasons () |
Private Attributes | |
double | maxFillIn_ |
max percentage of given formulation fillIn should be accepted for cut fillin. | |
double | maxRatio_ |
max ratio between smallest and biggest coefficient | |
double | minViolation_ |
minimum violation for accepting a cut | |
bool | scale_ |
Do we do scaling? | |
double | rhsScale_ |
Scale of right-hand-side. | |
std::vector< int > | numRejected_ |
Number of cut rejected for each of the reasons. | |
Static Private Attributes | |
static std::vector< std::string > | rejections_ |
Strings explaining reason for rejections. |
Class to validate or reject a cut.
Definition at line 22 of file CglLandPValidator.hpp.
Reasons for rejecting a cut.
Definition at line 26 of file CglLandPValidator.hpp.
LAP::Validator::Validator | ( | double | maxFillIn = 1. , |
|
double | maxRatio = 1e8 , |
|||
double | minViolation = 0 , |
|||
bool | scale = false , |
|||
double | rhsScale = 1 | |||
) |
Constructor with default values.
int LAP::Validator::cleanCut | ( | OsiRowCut & | aCut, | |
const double * | solCut, | |||
const OsiSolverInterface & | si, | |||
const CglParam & | par, | |||
const double * | colLower, | |||
const double * | colUpper | |||
) | const |
Clean an OsiCut.
Referenced by operator()().
int LAP::Validator::cleanCut2 | ( | OsiRowCut & | aCut, | |
const double * | solCut, | |||
const OsiSolverInterface & | si, | |||
const CglParam & | par, | |||
const double * | colLower, | |||
const double * | colUpper | |||
) | const |
Clean an OsiCut by another method.
int LAP::Validator::operator() | ( | OsiRowCut & | aCut, | |
const double * | solCut, | |||
const OsiSolverInterface & | si, | |||
const CglParam & | par, | |||
const double * | colLower, | |||
const double * | colUpper | |||
) | const [inline] |
void LAP::Validator::setMaxFillIn | ( | double | value | ) | [inline] |
Definition at line 56 of file CglLandPValidator.hpp.
References maxFillIn_.
void LAP::Validator::setMaxRatio | ( | double | value | ) | [inline] |
Definition at line 59 of file CglLandPValidator.hpp.
References maxRatio_.
void LAP::Validator::setMinViolation | ( | double | value | ) | [inline] |
Definition at line 62 of file CglLandPValidator.hpp.
References minViolation_.
void LAP::Validator::setRhsScale | ( | double | v | ) | [inline] |
Definition at line 66 of file CglLandPValidator.hpp.
References rhsScale_.
double LAP::Validator::getMaxFillIn | ( | ) | [inline] |
Definition at line 72 of file CglLandPValidator.hpp.
References maxFillIn_.
double LAP::Validator::getMaxRatio | ( | ) | [inline] |
Definition at line 75 of file CglLandPValidator.hpp.
References maxRatio_.
double LAP::Validator::getMinViolation | ( | ) | [inline] |
Definition at line 78 of file CglLandPValidator.hpp.
References minViolation_.
const std::string& LAP::Validator::failureString | ( | RejectionsReasons | code | ) | const [inline] |
Definition at line 83 of file CglLandPValidator.hpp.
References rejections_.
const std::string& LAP::Validator::failureString | ( | int | code | ) | const [inline] |
Definition at line 86 of file CglLandPValidator.hpp.
References rejections_.
int LAP::Validator::numRejected | ( | RejectionsReasons | code | ) | const [inline] |
Definition at line 89 of file CglLandPValidator.hpp.
References numRejected_.
int LAP::Validator::numRejected | ( | int | code | ) | const [inline] |
Definition at line 92 of file CglLandPValidator.hpp.
References numRejected_.
static void LAP::Validator::fillRejectionReasons | ( | ) | [static, private] |
double LAP::Validator::maxFillIn_ [private] |
max percentage of given formulation fillIn should be accepted for cut fillin.
Definition at line 98 of file CglLandPValidator.hpp.
Referenced by getMaxFillIn(), and setMaxFillIn().
double LAP::Validator::maxRatio_ [private] |
max ratio between smallest and biggest coefficient
Definition at line 100 of file CglLandPValidator.hpp.
Referenced by getMaxRatio(), and setMaxRatio().
double LAP::Validator::minViolation_ [private] |
minimum violation for accepting a cut
Definition at line 102 of file CglLandPValidator.hpp.
Referenced by getMinViolation(), and setMinViolation().
bool LAP::Validator::scale_ [private] |
Do we do scaling?
Definition at line 104 of file CglLandPValidator.hpp.
double LAP::Validator::rhsScale_ [private] |
Scale of right-hand-side.
Definition at line 106 of file CglLandPValidator.hpp.
Referenced by setRhsScale().
std::vector<std::string> LAP::Validator::rejections_ [static, private] |
Strings explaining reason for rejections.
Definition at line 108 of file CglLandPValidator.hpp.
Referenced by failureString().
std::vector<int> LAP::Validator::numRejected_ [mutable, private] |
Number of cut rejected for each of the reasons.
Definition at line 110 of file CglLandPValidator.hpp.
Referenced by numRejected().