12 #ifndef CglMixedIntegerRounding2_H
13 #define CglMixedIntegerRounding2_H
90 const std::string mpdDir);
144 const int preproc = -1);
176 throw CoinError(
"Unallowable value. maxaggr must be > 0",
177 "gutsOfConstruct",
"CglMixedIntegerRounding2");
192 if ((criterion >= 1) && (criterion <= 3)) {
196 throw CoinError(
"Unallowable value. criterion must be 1, 2 or 3",
197 "gutsOfConstruct",
"CglMixedIntegerRounding2");
234 const int rowLen,
const int* ind,
235 const double* coef,
const char sense,
236 const double rhs)
const;
241 const double* colUpperBound,
242 const double* colLowerBound,
249 const double* coefByCol,
251 const int* colStarts,
256 const int rowSelected,
258 int* listRowsAggregated,
265 double& rhsToAggregate)
const;
270 const double* colUpperBound,
271 const double* colLowerBound,
273 const double* xlp,
const double* coefByCol,
274 const int* rowInds,
const int* colStarts,
276 int& colSelected )
const;
283 double& rhsAggregated )
const;
290 const double UB)
const;
296 const double* xlpExtra,
297 const double* colUpperBound,
298 const double* colLowerBound,
300 double& rhsMixedKnapsack,
double& sStar,
307 const int* listRowsAggregated,
308 const char* sense,
const double*
RHS,
311 const double* xlp,
const double sStar,
312 const double* colUpperBound,
313 const double* colLowerBound,
315 const double& rhsMixedKnapsack,
323 const double numeratorBeta,
324 const int *knapsackIndices,
325 const double* knapsackElements,
328 const double* colUpperBound,
333 double& violation)
const;
336 inline double functionG(
const double d,
const double f )
const;
340 std::ofstream & fout,
344 const double& rhsAggregated,
const double* xlp,
345 const double* xlpExtra,
346 const int* listRowsAggregated,
347 const int* listColsSelected,
349 const double* colUpperBound,
350 const double* colLowerBound )
const;
425 const std::string mpdDir);
void setCRITERION_(int criterion)
Set CRITERION_.
void gutsOfConstruct(const int maxaggr, const bool multiply, const int criterion, const int preproc)
void cMirInequality(const int numInt, const double delta, const double numeratorBeta, const int *knapsackIndices, const double *knapsackElements, const double *xlp, const double sStar, const double *colUpperBound, const CoinIndexedVector &setC, CoinIndexedVector &cMIR, double &rhscMIR, double &sCoef, double &violation) const
CglMixIntRoundVUB2 & operator=(const CglMixIntRoundVUB2 &rhs)
After the row is flipped to 'L', the row has exactly two variables: one is negative binary and the ot...
CglMixIntRoundVUB2 CglMixIntRoundVLB2
void aggregateRow(const int colSelected, CoinIndexedVector &rowToAggregate, double rhs, CoinIndexedVector &rowAggregated, double &rhsAggregated) const
void printStats(std::ofstream &fout, const bool hasCut, const OsiSolverInterface &si, const CoinIndexedVector &rowAggregated, const double &rhsAggregated, const double *xlp, const double *xlpExtra, const int *listRowsAggregated, const int *listColsSelected, const int level, const double *colUpperBound, const double *colLowerBound) const
friend void CglMixedIntegerRounding2UnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
Sparse Matrix Base Class.
void copyRowSelected(const int iAggregate, const int rowSelected, CoinIndexedVector &setRowsAggregated, int *listRowsAggregated, double *xlpExtra, const char sen, const double rhs, const double lhs, const CoinPackedMatrix &matrixByRow, CoinIndexedVector &rowToAggregate, double &rhsToAggregate) const
void setDoPreproc(int value)
Set doPreproc.
bool getMULTIPLY_() const
Get MULTIPLY_.
CglMixedIntegerRounding2()
Default constructor.
Collections of row cuts and column cuts.
void CglMixedIntegerRounding2UnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
void gutsOfCopy(const CglMixedIntegerRounding2 &rhs)
#define RHS(cust_num, weight, capacity)
virtual ~CglMixedIntegerRounding2()
Destructor.
bool isLowerSubst(const double inf, const double aj, const double xlp, const double LB, const double UB) const
double functionG(const double d, const double f) const
virtual CglCutGenerator * clone() const
Clone.
CglMixedIntegerRounding2 & operator=(const CglMixedIntegerRounding2 &rhs)
Assignment operator.
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate Mixed Integer Rounding cuts for the model data contained in si.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
void generateMirCuts(const OsiSolverInterface &si, const double *xlp, const double *colUpperBound, const double *colLowerBound, const CoinPackedMatrix &matrixByRow, const double *LHS, const double *coefByCol, const int *rowInds, const int *colStarts, OsiCuts &cs) const
void setVal(const double v)
bool selectRowToAggregate(const CoinIndexedVector &rowAggregated, const double *colUpperBound, const double *colLowerBound, const CoinIndexedVector &setRowsAggregated, const double *xlp, const double *coefByCol, const int *rowInds, const int *colStarts, int &rowSelected, int &colSelected) const
The row sense is 'E', the row has exactly two variables: one is binary and the other is a continous...
CglMixIntRoundVLB2 * vlbs_
Abstract Base Class for describing an interface to a solver.
CglMixIntRoundVUB2(const CglMixIntRoundVUB2 &source)
Cut Generator Base Class.
void setMAXAGGR_(int maxaggr)
Set MAXAGGR_.
int getCRITERION_() const
Get CRITERION_.
int doPreproc_
Controls the preprocessing of the matrix to identify rows suitable for cut generation.
Error Class thrown by an exception.
void setMULTIPLY_(bool multiply)
Set MULTIPLY_.
void mixIntRoundPreprocess(const OsiSolverInterface &si)
CglMixIntRoundVUB2 * vubs_
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.
After the row is flipped to 'L', the row has exactly two variables: one is positive binary and the ot...
int UNDEFINED_
There is no variable upper bound or variable lower bound defined.
bool boundSubstitution(const OsiSolverInterface &si, const CoinIndexedVector &rowAggregated, const double *xlp, const double *xlpExtra, const double *colUpperBound, const double *colLowerBound, CoinIndexedVector &mixedKnapsack, double &rhsMixedKnapsack, double &sStar, CoinIndexedVector &contVariablesInS) const
bool getDoPreproc() const
Get doPreproc.
Information about where the cut generator is invoked from.
int getMAXAGGR_() const
Get MAXAGGR_.
Mixed Integer Rounding Cut Generator Class.
bool cMirSeparation(const OsiSolverInterface &si, const CoinPackedMatrix &matrixByRow, const CoinIndexedVector &rowAggregated, const int *listRowsAggregated, const char *sense, const double *RHS, const double *xlp, const double sStar, const double *colUpperBound, const double *colLowerBound, const CoinIndexedVector &mixedKnapsack, const double &rhsMixedKnapsack, const CoinIndexedVector &contVariablesInS, CoinIndexedVector *workVector, OsiRowCut &flowCut) const
RowType determineRowType(const int rowLen, const int *ind, const double *coef, const char sense, const double rhs) const