Cgl 0.60.3
Loading...
Searching...
No Matches
CglRedSplit2Param.hpp
Go to the documentation of this file.
1// Name: CglRedSplit2Param.hpp
2// Author: Giacomo Nannicini
3// Singapore University of Technology and Design
4// Singapore
5// email: nannicini@sutd.edu.sg
6// Date: 03/09/09
7//-----------------------------------------------------------------------------
8// Copyright (C) 2010, Giacomo Nannicini and others. All Rights Reserved.
9
10#ifndef CglRedSplit2Param_H
11#define CglRedSplit2Param_H
12
13#include "CglParam.hpp"
14#include <vector>
15
18
87
89
90public:
95 /* Pick rows that introduce the fewest nonzeroes on integer nonbasics */
97 /* Pick rows that introduce the fewest nonzeroes on the set of working
98 continuous nonbasics */
100 /* Pick rows that introduce the fewest nonzeroes on both integer and
101 working continuous nonbasics */
103 /* Same as RS0 but with greedy algorithm */
105 /* Same as RS1 but with greedy algorithm */
107 /* Same as RS2 but with greedy algorithm */
109 /* Pick rows with smallest angle in the space of integer and working
110 continuous nonbasics */
112 /* Pick rows with smallest angle in the space of working
113 continuous nonbasics */
115 /* Use all strategies */
117 /* Use best ones - that is, RS8 and RS7 */
118 RS_BEST
119 };
120
123 /* C-3P */
125 /* C-5P */
127 /* I-2P-2/3 */
129 /* I-2P-4/5 */
131 /* I-2P-1/2 */
133 /* I-3P */
135 /* I-4P */
137 /* Use all strategies up to this point */
139 /* Use best strategies (same effect as CS_ALL, because it turns out that
140 using all strategies is the best thing to do) */
142 /* Optimize over all continuous nonbasic columns; this does not give
143 good results, but we use it for testing Lift & Project + RedSplit */
145 /* Lift & Project specific strategy: only select variables which
146 are nonbasic in the tableau but are basic in the point to cut
147 off. This strategy cannot be used outside L&P. It is not very
148 effective even with L&P, but is left here for testing.*/
150 };
151
155 /* No scaling */
157 /* Multiply by |xbar[i]| where xbar[i] is the value of the
158 corresponding component of the point that we want to cut off */
160 /* Multiply by min(factor,|xbar[i]|) */
162 /* Multiply by min(factor,log(|xbar[i]|)) */
164 /* Multiply all new nonbasics by factor */
166 /* Multiply only nonzero coefficients by factor */
168 };
169
176 virtual void setAway(double value);
178 inline double getAway() const {return away_;}
179
183 void setEPS_ELIM(double value);
185 double getEPS_ELIM() const {return EPS_ELIM;}
186
188 virtual void setEPS_RELAX_ABS(double eps_ra);
190 inline double getEPS_RELAX_ABS() const {return EPS_RELAX_ABS;}
191
193 virtual void setEPS_RELAX_REL(double eps_rr);
195 inline double getEPS_RELAX_REL() const {return EPS_RELAX_REL;}
196
197 // Set the maximum ratio between largest and smallest non zero
198 // coefficients in a cut. Default: 1e6.
199 virtual void setMAXDYN(double value);
201 inline double getMAXDYN() const {return MAXDYN;}
202
205 virtual void setMINVIOL(double value);
207 inline double getMINVIOL() const {return MINVIOL;}
208
211 inline void setMAX_SUPP_ABS(int value) {setMAX_SUPPORT(value);}
212 inline int getMAX_SUPP_ABS() const {return MAX_SUPPORT;}
213
216 inline void setMAX_SUPP_REL(double value);
217 inline double getMAX_SUPP_REL() const {return MAX_SUPP_REL;}
218
220 virtual void setUSE_INTSLACKS(int value);
222 inline int getUSE_INTSLACKS() const {return USE_INTSLACKS;}
223
226 virtual void setNormIsZero(double value);
228 inline double getNormIsZero() const {return normIsZero_;}
229
231 virtual void setMinNormReduction(double value);
233 inline double getMinNormReduction() const {return minNormReduction_;}
234
236 virtual void setMaxSumMultipliers(int value);
238 inline int getMaxSumMultipliers() const {return maxSumMultipliers_;}
239
241 virtual void setNormalization(double value);
243 inline double getNormalization() const {return normalization_;}
244
248 virtual void addNumRowsReduction(int value);
250 inline std::vector<int> getNumRowsReduction() const {return numRowsReduction_;}
253
257 inline std::vector<ColumnSelectionStrategy> getColumnSelectionStrategy() const {return columnSelectionStrategy_;}
260
265 inline std::vector<RowSelectionStrategy> getRowSelectionStrategy() const {return rowSelectionStrategy_;};
268
273 virtual void addNumRowsReductionLAP(int value);
275 inline std::vector<int> getNumRowsReductionLAP() const {return numRowsReductionLAP_;}
278
282 inline std::vector<ColumnSelectionStrategy> getColumnSelectionStrategyLAP() const {return columnSelectionStrategyLAP_;}
285
290 inline std::vector<RowSelectionStrategy> getRowSelectionStrategyLAP() const {return rowSelectionStrategyLAP_;};
293
299
301 virtual void setColumnScalingBoundLAP(double value);
303 inline double getColumnScalingBoundLAP() const {return columnScalingBoundLAP_;};
304
306 virtual void setTimeLimit(double value);
308 inline double getTimeLimit() const {return timeLimit_;}
309
311 virtual void setMaxNumCuts(int value);
313 inline int getMaxNumCuts() const {return maxNumCuts_;}
314
316 virtual void setMaxNumComputedCuts(int value);
318 inline int getMaxNumComputedCuts() const {return maxNumComputedCuts_;}
319
322 virtual void setMaxNonzeroesTab(int value);
324 inline int getMaxNonzeroesTab() const {return maxNonzeroesTab_;}
325
330 virtual void setSkipGomory(int value);
332 inline int getSkipGomory() const {return skipGomory_;}
333
335
341 CglRedSplit2Param(bool use_default_strategies = true,
342 double eps = 1e-12,
343 double eps_coeff = 1e-11,
344 double eps_elim = 0.0,
345 double eps_relax_abs = 1e-11,
346 double eps_relax_rel = 1e-13,
347 double max_dyn = 1e6,
348 double min_viol = 1e-3,
349 int max_supp_abs = 1000,
350 double max_supp_rel = 0.1,
351 int use_int_slacks = 0,
352 double norm_zero = 1e-5,
353 double minNormReduction = 0.1,
354 int maxSumMultipliers = 10,
355 double normalization = 0.0001,
356 double away = 0.005,
357 double timeLimit = 60,
358 int maxNumCuts = 10000,
359 int maxNumComputedCuts = 10000,
360 int maxNonzeroesTab = 1000,
361 double columnScalingBoundLAP = 5.0,
362 int skipGomory = 1);
363
369 bool use_default_strategies = true,
370 double eps_elim = 0.0,
371 double eps_relax_abs = 1e-11,
372 double eps_relax_rel = 1e-13,
373 double max_dyn = 1e6,
374 double min_viol = 1e-3,
375 double max_supp_rel = 0.1,
376 int use_int_slacks = 0,
377 double norm_zero = 1e-5,
378 double minNormReduction = 0.1,
379 int maxSumMultipliers = 10,
380 double normalization = 0.0001,
381 double away = 0.005,
382 double timeLimit = 60,
383 int maxNumCuts = 10000,
384 int maxNumComputedCuts = 10000,
385 int maxNonzeroesTab = 1000,
386 double columnScalingBoundLAP = 5.0,
387 int skipGomory = 1);
388
391
393 virtual CglRedSplit2Param* clone() const;
394
397
401
402protected:
403
406
409 double EPS_ELIM;
410
414
419
420 // Maximum ratio between largest and smallest non zero
421 // coefficients in a cut. Default: 1e6.
422 double MAXDYN;
423
426 double MINVIOL;
427
430
433
437
440
443
447
450 double away_;
451
453 std::vector<int> numRowsReduction_;
454
456 std::vector<ColumnSelectionStrategy> columnSelectionStrategy_;
457
459 std::vector<RowSelectionStrategy> rowSelectionStrategy_;
460
462 std::vector<int> numRowsReductionLAP_;
463
465 std::vector<ColumnSelectionStrategy> columnSelectionStrategyLAP_;
466
468 std::vector<RowSelectionStrategy> rowSelectionStrategyLAP_;
469
473
476
479
482
485
488
491
493};
494
495#endif
Class collecting parameters for all cut generators.
Definition: CglParam.hpp:22
int MAX_SUPPORT
Maximum number of non zero coefficients in a generated cut; Default: COIN_INT_MAX.
Definition: CglParam.hpp:86
virtual void setMAX_SUPPORT(const int max_s)
Set MAX_SUPPORT.
Class collecting parameters the Reduced-and-split cut generator.
double getMAXDYN() const
Get the value of MAXDYN.
int getMaxNumCuts() const
get the value
std::vector< int > numRowsReduction_
Maximum number of rows to use for the reduction of a given row.
virtual void setColumnScalingStrategyLAP(ColumnScalingStrategy value)
Set the value for columnScalingStrategyLAP, which sets the way nonbasic columns that are basic in the...
double getEPS_RELAX_ABS() const
Get value of EPS_RELAX_ABS.
double EPS_RELAX_ABS
Value added to the right hand side of each generated cut to relax it.
std::vector< int > numRowsReductionLAP_
Maximum number of rows to use for the reduction during Lift & Project.
std::vector< RowSelectionStrategy > rowSelectionStrategyLAP_
Row selection method for Lift & Project.
void resetRowSelectionStrategy()
reset
std::vector< RowSelectionStrategy > getRowSelectionStrategy() const
get the value
std::vector< ColumnSelectionStrategy > getColumnSelectionStrategy() const
get the value
virtual void setMAXDYN(double value)
int maxNonzeroesTab_
Maximum number of nonzeroes in tableau row for reduction.
double normIsZero_
Norm of a vector is considered zero if smaller than normIsZero; Default: 1e-5.
void resetRowSelectionStrategyLAP()
reset
double columnScalingBoundLAP_
Minimum value for column scaling (Lift & Project only)
double getAway() const
Get value of away.
int maxNumComputedCuts_
Maximum number of computed cuts.
double getEPS_ELIM() const
Get the value of EPS_ELIM.
RowSelectionStrategy
Enumerations for parameters.
void resetColumnSelectionStrategyLAP()
reset
CglRedSplit2Param(const CglRedSplit2Param &source)
Copy constructor.
double getNormIsZero() const
Get the value of normIsZero.
CglRedSplit2Param(const CglParam &source, bool use_default_strategies=true, double eps_elim=0.0, double eps_relax_abs=1e-11, double eps_relax_rel=1e-13, double max_dyn=1e6, double min_viol=1e-3, double max_supp_rel=0.1, int use_int_slacks=0, double norm_zero=1e-5, double minNormReduction=0.1, int maxSumMultipliers=10, double normalization=0.0001, double away=0.005, double timeLimit=60, int maxNumCuts=10000, int maxNumComputedCuts=10000, int maxNonzeroesTab=1000, double columnScalingBoundLAP=5.0, int skipGomory=1)
Constructor from CglParam.
std::vector< RowSelectionStrategy > rowSelectionStrategy_
Row selection method.
double timeLimit_
Time limit.
ColumnScalingStrategy columnScalingStrategyLAP_
Column scaling strategy for the nonbasics columns that were basic in the point that we want to cut of...
virtual void setMINVIOL(double value)
Set the value of MINVIOL, the minimum violation for the current basic solution in a generated cut.
std::vector< ColumnSelectionStrategy > columnSelectionStrategyLAP_
Column selection method for Lift & Project.
ColumnSelectionStrategy
Column selection strategies; again, look them up in the paper.
virtual void addRowSelectionStrategyLAP(RowSelectionStrategy value)
Set the value for rowSelectionStrategyLAP, which changes the way we choose the rows for the reduction...
double getEPS_RELAX_REL() const
Get value of EPS_RELAX_REL.
virtual CglRedSplit2Param * clone() const
Clone.
ColumnScalingStrategy getColumnScalingStrategyLAP() const
get the value
virtual void setTimeLimit(double value)
Set the value of the time limit for cut generation (in seconds)
virtual void setUSE_INTSLACKS(int value)
Set the value of USE_INTSLACKS.
CglRedSplit2Param(bool use_default_strategies=true, double eps=1e-12, double eps_coeff=1e-11, double eps_elim=0.0, double eps_relax_abs=1e-11, double eps_relax_rel=1e-13, double max_dyn=1e6, double min_viol=1e-3, int max_supp_abs=1000, double max_supp_rel=0.1, int use_int_slacks=0, double norm_zero=1e-5, double minNormReduction=0.1, int maxSumMultipliers=10, double normalization=0.0001, double away=0.005, double timeLimit=60, int maxNumCuts=10000, int maxNumComputedCuts=10000, int maxNonzeroesTab=1000, double columnScalingBoundLAP=5.0, int skipGomory=1)
Default constructor.
std::vector< ColumnSelectionStrategy > getColumnSelectionStrategyLAP() const
get the value
double MINVIOL
Minimum violation for the current basic solution in a generated cut.
int getMaxNonzeroesTab() const
get the value
double getMAX_SUPP_REL() const
virtual void setMinNormReduction(double value)
Set the value of minNormReduction; Default: 0.1.
virtual void addNumRowsReduction(int value)
Set the value of numRowsReduction, max number of rows that are used for each row reduction step.
virtual void addRowSelectionStrategy(RowSelectionStrategy value)
Set the value for rowSelectionStrategy, which changes the way we choose the rows for the reduction st...
virtual void setMaxNumComputedCuts(int value)
Set the value for the maximum number of cuts that can be computed.
std::vector< int > getNumRowsReduction() const
get the value
double EPS_RELAX_REL
For a generated cut with right hand side rhs_val, EPS_RELAX_EPS * fabs(rhs_val) is used to relax the ...
virtual void addNumRowsReductionLAP(int value)
Set the value of numRowsReductionLAP, max number of rows that are used for each row reduction step du...
virtual void setNormIsZero(double value)
Set the value of normIsZero, the threshold for considering a norm to be 0; Default: 1e-5.
void resetColumnSelectionStrategy()
reset
double EPS_ELIM
Epsilon for value of coefficients when eliminating slack variables.
virtual ~CglRedSplit2Param()
Destructor.
double MAX_SUPP_REL
Maximum support - relative part of the formula.
int maxSumMultipliers_
Maximum sum of the vector of row multipliers to generate a cut.
void setMAX_SUPP_ABS(int value)
Maximum absolute support of the cutting planes.
std::vector< RowSelectionStrategy > getRowSelectionStrategyLAP() const
get the value
double getColumnScalingBoundLAP() const
get the value
std::vector< int > getNumRowsReductionLAP() const
get the value
double normalization_
Normalization factor for the norm of lambda in the quadratic minimization problem that is solved duri...
double away_
Use row only if pivot variable should be integer but is more than away_ from being integer.
int maxNumCuts_
Maximum number of returned cuts.
void setMAX_SUPP_REL(double value)
Maximum relative support of the cutting planes.
std::vector< ColumnSelectionStrategy > columnSelectionStrategy_
Column selection method.
virtual void setSkipGomory(int value)
Set the value of skipGomory: should we skip simple Gomory cuts, i.e.
virtual CglRedSplit2Param & operator=(const CglRedSplit2Param &rhs)
Assignment operator.
virtual void setNormalization(double value)
Set the value of normalization; Default: 0.0001.
int getMaxNumComputedCuts() const
get the value
int getUSE_INTSLACKS() const
Get the value of USE_INTSLACKS.
double getTimeLimit() const
get the value
virtual void addColumnSelectionStrategy(ColumnSelectionStrategy value)
Add the value of columnSelectionStrategy.
double getMinNormReduction() const
Get the value of normIsZero.
double getNormalization() const
Get the value of normalization.
virtual void setMaxSumMultipliers(int value)
Set the value of maxSumMultipliers; Default: 10.
virtual void setMaxNonzeroesTab(int value)
Set the value for the maximum number of nonzeroes in a row of the simplex tableau for the row to be c...
virtual void setMaxNumCuts(int value)
Set the value for the maximum number of cuts that can be returned.
int getSkipGomory() const
get the value
double minNormReduction_
Minimum reduction to accept a new row.
double getMINVIOL() const
Get the value of MINVIOL.
ColumnScalingStrategy
Scaling strategies for new nonbasic columns for Lift & Project; "factor" is the value of columnScalin...
void setEPS_ELIM(double value)
Set the value of EPS_ELIM, epsilon for values of coefficients when eliminating slack variables; Defau...
void resetNumRowsReduction()
reset
virtual void setEPS_RELAX_REL(double eps_rr)
Set EPS_RELAX_REL.
virtual void setColumnScalingBoundLAP(double value)
Set the value for the bound in the column scaling factor.
void resetNumRowsReductionLAP()
reset
virtual void setEPS_RELAX_ABS(double eps_ra)
Set EPS_RELAX_ABS.
virtual void setAway(double value)
Set away, the minimum distance from being integer used for selecting rows for cut generation; all row...
virtual void addColumnSelectionStrategyLAP(ColumnSelectionStrategy value)
Add the value of columnSelectionStrategyLAP.
int getMaxSumMultipliers() const
Get the value of maxSumMultipliers.
int skipGomory_
Skip simple Gomory cuts.
int USE_INTSLACKS
Use integer slacks to generate cuts if USE_INTSLACKS = 1. Default: 0.