Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CglGMIParam.hpp
Go to the documentation of this file.
1 // Name: CglGMIParam.hpp
2 // Author: Giacomo Nannicini
3 // Singapore University of Technology and Design
4 // email: nannicini@sutd.edu.sg
5 // based on CglRedSplitParam.hpp by Francois Margot
6 // Date: 11/17/09
7 //-----------------------------------------------------------------------------
8 // Copyright (C) 2009, Giacomo Nannicini and others. All Rights Reserved.
9 
10 #ifndef CglGMIParam_H
11 #define CglGMIParam_H
12 
13 #include "CglParam.hpp"
14 
15 
18 
51 
52 class CglGMIParam : public CglParam {
53 
54 public:
55 
58  /* CglLandP procedure I */
60  /* CglLandP procedure II */
62  /* CglRedSplit procedure I */
64  /* Only integral cuts, i.e. cuts with integral coefficients */
66  /* CglLandP procedure I with integral scaling */
68  /* CglLandP procedure I with scaling of the max element to 1 if possible */
70  /* CglLandP procedure I with scaling of the rhs to 1 if possible */
72  };
73 
80  inline void setInfinity(double value) {setINFINIT(value);}
81  inline double getInfinity() const {return INFINIT;}
82 
84  inline void setEps(double value) {setEPS(value);}
85  inline double getEps() const {return EPS;}
86 
88  inline void setEpsCoeff(double value) {setEPS_COEFF(value);}
89  inline double getEpsCoeff() const {return EPS_COEFF;}
90 
92  inline void setMaxSupport(int value) {setMAX_SUPPORT(value);}
93  inline int getMaxSupport() const {return MAX_SUPPORT;}
95  inline void setMaxSupportAbs(int value) {setMAX_SUPPORT(value);}
96  inline int getMaxSupportAbs() const {return MAX_SUPPORT;}
97  inline int getMAX_SUPPORT_ABS() const {return MAX_SUPPORT;}
98 
103  virtual void setAway(double value);
105  inline double getAway() const {return AWAY;}
107  inline void setAWAY(double value) {setAway(value);}
108  inline double getAWAY() const {return AWAY;}
109 
113  virtual void setEPS_ELIM(double value);
115  inline double getEPS_ELIM() const {return EPS_ELIM;}
117  inline void setEpsElim(double value) {setEPS_ELIM(value);}
118  inline double getEpsElim() const {return EPS_ELIM;}
119 
121  virtual void setEPS_RELAX_ABS(double value);
123  inline double getEPS_RELAX_ABS() const {return EPS_RELAX_ABS;}
125  inline void setEpsRelaxAbs(double value) {setEPS_RELAX_ABS(value);}
126  inline double getEpsRelaxAbs() const {return EPS_RELAX_ABS;}
127 
129  virtual void setEPS_RELAX_REL(double value);
131  inline double getEPS_RELAX_REL() const {return EPS_RELAX_REL;}
133  inline void setEpsRelaxRel(double value) {setEPS_RELAX_REL(value);}
134  inline double getEpsRelaxRel() const {return EPS_RELAX_REL;}
135 
136  // Set the maximum ratio between largest and smallest non zero
137  // coefficients in a cut. Default: 1e6.
138  virtual void setMAXDYN(double value);
140  inline double getMAXDYN() const {return MAXDYN;}
142  inline void setMaxDyn(double value) {setMAXDYN(value);}
143  inline double getMaxDyn() const {return MAXDYN;}
144 
147  virtual void setMINVIOL(double value);
149  inline double getMINVIOL() const {return MINVIOL;}
151  inline void setMinViol(double value) {setMINVIOL(value);}
152  inline double getMinViol() const {return MINVIOL;}
153 
158  virtual void setMAX_SUPPORT_REL(double value);
160  inline double getMAX_SUPPORT_REL() const {return MAX_SUPPORT_REL;}
162  inline void setMaxSupportRel(double value) {setMAX_SUPPORT_REL(value);}
163  inline double getMaxSupportRel() const {return MAX_SUPPORT_REL;}
164 
166  virtual void setUSE_INTSLACKS(bool value);
168  inline bool getUSE_INTSLACKS() const {return USE_INTSLACKS;}
170  inline void setUseIntSlacks(bool value) {setUSE_INTSLACKS(value);}
171  inline int getUseIntSlacks() const {return USE_INTSLACKS;}
172 
174  virtual void setCHECK_DUPLICATES(bool value);
176  inline bool getCHECK_DUPLICATES() const {return CHECK_DUPLICATES;}
178  inline void setCheckDuplicates(bool value) {setCHECK_DUPLICATES(value);}
179  inline bool getCheckDuplicates() const {return CHECK_DUPLICATES;}
180 
182  virtual void setCLEAN_PROC(CleaningProcedure value);
184  inline CleaningProcedure getCLEAN_PROC() const {return CLEAN_PROC;}
186  inline void setCleanProc(CleaningProcedure value) {setCLEAN_PROC(value);}
188 
190  virtual void setINTEGRAL_SCALE_CONT(bool value);
192  inline bool getINTEGRAL_SCALE_CONT() const {return INTEGRAL_SCALE_CONT;}
194  inline void setIntegralScaleCont(bool value) {setINTEGRAL_SCALE_CONT(value);}
195  inline bool getIntegralScaleCont() const {return INTEGRAL_SCALE_CONT;}
196 
198  virtual void setENFORCE_SCALING(bool value);
200  inline bool getENFORCE_SCALING() const {return ENFORCE_SCALING;}
202  inline void setEnforceScaling(bool value) {setENFORCE_SCALING(value);}
203  inline bool getEnforcescaling() const {return ENFORCE_SCALING;}
204 
206 
209  CglGMIParam(double eps = 1e-12,
211  double away = 0.005,
212  double eps_coeff = 1e-11,
213  double eps_elim = 0,
214  double eps_relax_abs = 1e-11,
215  double eps_relax_rel = 1e-13,
216  double max_dyn = 1e6,
217  double min_viol = 1e-4,
218  int max_supp_abs = 1000,
219  double max_supp_rel = 0.1,
220  CleaningProcedure clean_proc = CP_CGLLANDP1,
221  bool use_int_slacks = false,
222  bool check_duplicates = false,
223  bool integral_scale_cont = false,
224  bool enforce_scaling = true);
225 
227  CglGMIParam(CglParam &source,
228  double away = 0.005,
229  double eps_elim = 1e-12,
230  double eps_relax_abs = 1e-11,
231  double eps_relax_rel = 1e-13,
232  double max_dyn = 1e6,
233  double min_viol = 1e-4,
234  double max_supp_rel = 0.1,
235  CleaningProcedure clean_proc = CP_CGLLANDP1,
236  bool use_int_slacks = false,
237  bool check_duplicates = false,
238  bool integral_scale_cont = false,
239  bool enforce_scaling = true);
240 
242  CglGMIParam(const CglGMIParam &source);
243 
245  virtual CglGMIParam* clone() const;
246 
248  virtual CglGMIParam& operator=(const CglGMIParam &rhs);
249 
251  virtual ~CglGMIParam();
253 
254 protected:
255 
258 
261  double AWAY;
262 
265  double EPS_ELIM;
266 
270 
275 
278  double MAXDYN;
279 
282  double MINVIOL;
283 
287 
290 
293 
296 
302 
309 
311 };
312 
313 #endif
double getAway() const
Get value of away.
void setMaxSupportAbs(int value)
Alias for consistency with our naming scheme.
Definition: CglGMIParam.hpp:95
bool getCHECK_DUPLICATES() const
Get the value of CHECK_DUPLICATES.
void setCheckDuplicates(bool value)
Aliases.
void setEpsElim(double value)
Aliases.
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 ...
double INFINIT
Definition: CglParam.hpp:77
double getMAX_SUPPORT_REL() const
Get the value of MINVIOL.
virtual void setUSE_INTSLACKS(bool value)
Set the value of USE_INTSLACKS.
int getMaxSupportAbs() const
Definition: CglGMIParam.hpp:96
CleaningProcedure getCLEAN_PROC() const
Get the value of CLEAN_PROC.
bool USE_INTSLACKS
Use integer slacks to generate cuts if USE_INTSLACKS = 1.
double getMaxSupportRel() const
double getEpsRelaxAbs() const
double EPS_COEFF
Definition: CglParam.hpp:84
virtual void setEPS_RELAX_REL(double value)
Set EPS_RELAX_REL.
CglGMIParam(double eps=1e-12, double away=0.005, double eps_coeff=1e-11, double eps_elim=0, double eps_relax_abs=1e-11, double eps_relax_rel=1e-13, double max_dyn=1e6, double min_viol=1e-4, int max_supp_abs=1000, double max_supp_rel=0.1, CleaningProcedure clean_proc=CP_CGLLANDP1, bool use_int_slacks=false, bool check_duplicates=false, bool integral_scale_cont=false, bool enforce_scaling=true)
Default constructor.
void setMinViol(double value)
Aliases.
virtual void setMAXDYN(double value)
virtual void setENFORCE_SCALING(bool value)
Set the value of ENFORCE_SCALING.
virtual void setEPS_ELIM(double value)
Set the value of EPS_ELIM, epsilon for values of coefficients when eliminating slack variables; Defau...
virtual void setEPS(const double eps)
Set EPS.
virtual void setEPS_COEFF(const double eps_c)
Set EPS_COEFF.
double getEpsRelaxRel() const
CleaningProcedure getCleaningProcedure() const
bool ENFORCE_SCALING
Should we discard badly scaled cuts (according to the scaling procedure in use)? If false...
CleaningProcedure CLEAN_PROC
Which cleaning procedure should be used?
Class collecting parameters for the GMI cut generator.
Definition: CglGMIParam.hpp:52
void setEnforceScaling(bool value)
Aliases.
int MAX_SUPPORT
Maximum number of non zero coefficients in a generated cut; Default: COIN_INT_MAX.
Definition: CglParam.hpp:88
void setAWAY(double value)
Aliases.
virtual void setMINVIOL(double value)
Set the value of MINVIOL, the minimum violation for the current basic solution in a generated cut...
virtual void setAway(double value)
Set AWAY, the minimum distance from being integer used for selecting rows for cut generation; all row...
virtual void setMAX_SUPPORT(const int max_s)
Set MAX_SUPPORT.
virtual ~CglGMIParam()
Destructor.
virtual void setEPS_RELAX_ABS(double value)
Set EPS_RELAX_ABS.
double MAX_SUPPORT_REL
Maximum support relative to number of columns.
virtual CglGMIParam & operator=(const CglGMIParam &rhs)
Assignment operator.
void setMaxDyn(double value)
Aliases.
double getAWAY() const
int getMAX_SUPPORT_ABS() const
Definition: CglGMIParam.hpp:97
double MAXDYN
Maximum ratio between largest and smallest non zero coefficients in a cut.
Class collecting parameters for all cut generators.
Definition: CglParam.hpp:22
void setIntegralScaleCont(bool value)
Aliases.
double getEPS_ELIM() const
Get the value of EPS_ELIM.
void setEpsRelaxRel(double value)
Aliases.
void setEpsCoeff(double value)
Epsilon for zeroing out coefficients.
Definition: CglGMIParam.hpp:88
double getMINVIOL() const
Get the value of MINVIOL.
double getEPS_RELAX_REL() const
Get value of EPS_RELAX_REL.
double getMinViol() const
void setEpsRelaxAbs(double value)
Aliases.
bool getEnforcescaling() const
virtual void setCHECK_DUPLICATES(bool value)
Set the value of CHECK_DUPLICATES.
double getEpsElim() const
double EPS_RELAX_ABS
Value added to the right hand side of each generated cut to relax it.
double getEpsCoeff() const
Definition: CglGMIParam.hpp:89
bool getIntegralScaleCont() const
double EPS
Definition: CglParam.hpp:80
virtual CglGMIParam * clone() const
Clone.
double getEps() const
Definition: CglGMIParam.hpp:85
bool getCheckDuplicates() const
int getUseIntSlacks() const
double MINVIOL
Minimum violation for the current basic solution in a generated cut.
bool getENFORCE_SCALING() const
Get the value of ENFORCE_SCALING.
void setUseIntSlacks(bool value)
Aliases.
bool getINTEGRAL_SCALE_CONT() const
Get the value of INTEGRAL_SCALE_CONT.
void setCleanProc(CleaningProcedure value)
Aliases.
virtual void setMAX_SUPPORT_REL(double value)
Set the value of MAX_SUPPORT_REL, the factor contributing to the maximum support relative to the numb...
double EPS_ELIM
Epsilon for value of coefficients when eliminating slack variables.
void setEps(double value)
Epsilon for comparing numbers.
Definition: CglGMIParam.hpp:84
double getMAXDYN() const
Get the value of MAXDYN.
double getEPS_RELAX_ABS() const
Get value of EPS_RELAX_ABS.
double getInfinity() const
Definition: CglGMIParam.hpp:81
void setMaxSupportRel(double value)
Aliases.
int getMaxSupport() const
Definition: CglGMIParam.hpp:93
bool INTEGRAL_SCALE_CONT
Should we try to rescale cut coefficients on continuous variables so that they become integral...
bool getUSE_INTSLACKS() const
Get the value of USE_INTSLACKS.
virtual void setCLEAN_PROC(CleaningProcedure value)
Set the value of CLEAN_PROC.
void setMaxSupport(int value)
Maximum support of the cutting planes.
Definition: CglGMIParam.hpp:92
virtual void setINTEGRAL_SCALE_CONT(bool value)
Set the value of INTEGRAL_SCALE_CONT.
double AWAY
Use row only if pivot variable should be integer but is more than AWAY from being integer...
virtual void setINFINIT(const double inf)
Set INFINIT.
void setInfinity(double value)
Aliases for parameter get/set method in the base class CglParam.
Definition: CglGMIParam.hpp:80
double getMaxDyn() const
bool CHECK_DUPLICATES
Check for duplicates when adding the cut to the collection?