CglRedSplit2Param.hpp

Go to the documentation of this file.
00001 // Name:     CglRedSplit2Param.hpp
00002 // Author:   Giacomo Nannicini
00003 //           Singapore University of Technology and Design
00004 //           Singapore
00005 //           email: nannicini@sutd.edu.sg
00006 // Date:     03/09/09
00007 //-----------------------------------------------------------------------------
00008 // Copyright (C) 2010, Giacomo Nannicini and others.  All Rights Reserved.
00009 
00010 #ifndef CglRedSplit2Param_H
00011 #define CglRedSplit2Param_H
00012 
00013 #include "CglParam.hpp"
00014 #include <vector>
00015 
00018 
00087 
00088 class CglRedSplit2Param : public CglParam {
00089 
00090 public:
00094   enum RowSelectionStrategy{
00095     /* Pick rows that introduce the fewest nonzeroes on integer nonbasics */
00096     RS1, 
00097     /* Pick rows that introduce the fewest nonzeroes on the set of working
00098        continuous nonbasics */
00099     RS2,
00100     /* Pick rows that introduce the fewest nonzeroes on both integer and
00101        working continuous nonbasics */
00102     RS3,
00103     /* Same as RS0 but with greedy algorithm */
00104     RS4,
00105     /* Same as RS1 but with greedy algorithm */
00106     RS5,
00107     /* Same as RS2 but with greedy algorithm */
00108     RS6,
00109     /* Pick rows with smallest angle in the space of integer and working
00110        continuous nonbasics */
00111     RS7,
00112     /* Pick rows with smallest angle in the space of working
00113        continuous nonbasics */
00114     RS8,
00115     /* Use all strategies */
00116     RS_ALL,
00117     /* Use best ones - that is, RS8 and RS7 */
00118     RS_BEST
00119   };
00120 
00122   enum ColumnSelectionStrategy{
00123     /* C-3P */
00124     CS1, CS2, CS3,
00125     /* C-5P */
00126     CS4, CS5, CS6, CS7, CS8,
00127     /* I-2P-2/3 */
00128     CS9, CS10,
00129     /* I-2P-4/5 */
00130     CS11, CS12,
00131     /* I-2P-1/2 */
00132     CS13, CS14,
00133     /* I-3P */
00134     CS15, CS16, CS17,
00135     /* I-4P */
00136     CS18, CS19, CS20, CS21,
00137     /* Use all strategies up to this point */
00138     CS_ALL,
00139     /* Use best strategies (same effect as CS_ALL, because it turns out that
00140        using all strategies is the best thing to do) */
00141     CS_BEST,
00142     /* Optimize over all continuous nonbasic columns; this does not give
00143        good results, but we use it for testing Lift & Project + RedSplit */
00144     CS_ALLCONT,
00145     /* Lift & Project specific strategy: only select variables which
00146        are nonbasic in the tableau but are basic in the point to cut
00147        off.  This strategy cannot be used outside L&P. It is not very
00148        effective even with L&P, but is left here for testing.*/
00149     CS_LAP_NONBASICS
00150   };
00151 
00154   enum ColumnScalingStrategy{
00155     /* No scaling */
00156     SC_NONE,
00157     /* Multiply by |xbar[i]| where xbar[i] is the value of the 
00158        corresponding component of the point that we want to cut off */
00159     SC_LINEAR,
00160     /* Multiply by min(factor,|xbar[i]|) */
00161     SC_LINEAR_BOUNDED,
00162     /* Multiply by min(factor,log(|xbar[i]|)) */
00163     SC_LOG_BOUNDED,
00164     /* Multiply all new nonbasics by factor */
00165     SC_UNIFORM,
00166     /* Multiply only nonzero coefficients by factor */
00167     SC_UNIFORM_NZ
00168   };
00169 
00176   virtual void setAway(double value);
00178   inline double getAway() const {return away_;}
00179 
00183   void setEPS_ELIM(double value);
00185   double getEPS_ELIM() const {return EPS_ELIM;}
00186   
00188   virtual void setEPS_RELAX_ABS(double eps_ra);
00190   inline double getEPS_RELAX_ABS() const {return EPS_RELAX_ABS;}
00191 
00193   virtual void setEPS_RELAX_REL(double eps_rr);
00195   inline double getEPS_RELAX_REL() const {return EPS_RELAX_REL;}
00196 
00197   // Set the maximum ratio between largest and smallest non zero 
00198   // coefficients in a cut. Default: 1e6.
00199   virtual void setMAXDYN(double value);
00201   inline double getMAXDYN() const {return MAXDYN;}
00202 
00205   virtual void setMINVIOL(double value);
00207   inline double getMINVIOL() const {return MINVIOL;}
00208 
00211   inline void setMAX_SUPP_ABS(int value) {setMAX_SUPPORT(value);}
00212   inline int getMAX_SUPP_ABS() const {return MAX_SUPPORT;}
00213 
00216   inline void setMAX_SUPP_REL(double value); 
00217   inline double getMAX_SUPP_REL() const {return MAX_SUPP_REL;}
00218 
00220   virtual void setUSE_INTSLACKS(int value);
00222   inline int getUSE_INTSLACKS() const {return USE_INTSLACKS;}
00223 
00226   virtual void setNormIsZero(double value);
00228   inline double getNormIsZero() const {return normIsZero_;}
00229 
00231   virtual void setMinNormReduction(double value);
00233   inline double getMinNormReduction() const {return minNormReduction_;}
00234 
00236   virtual void setMaxSumMultipliers(int value);
00238   inline int getMaxSumMultipliers() const {return maxSumMultipliers_;}
00239 
00241   virtual void setNormalization(double value);
00243   inline double getNormalization() const {return normalization_;}
00244 
00248   virtual void addNumRowsReduction(int value);
00250   inline std::vector<int> getNumRowsReduction() const {return numRowsReduction_;}
00252   inline void resetNumRowsReduction() {numRowsReduction_.clear();}
00253 
00255   virtual void addColumnSelectionStrategy(ColumnSelectionStrategy value);
00257   inline std::vector<ColumnSelectionStrategy> getColumnSelectionStrategy() const {return columnSelectionStrategy_;}
00259   inline void resetColumnSelectionStrategy(){columnSelectionStrategy_.clear();}
00260 
00263   virtual void addRowSelectionStrategy(RowSelectionStrategy value);
00265   inline std::vector<RowSelectionStrategy> getRowSelectionStrategy() const {return rowSelectionStrategy_;};
00267   inline void resetRowSelectionStrategy() {rowSelectionStrategy_.clear();}
00268 
00273   virtual void addNumRowsReductionLAP(int value);
00275   inline std::vector<int> getNumRowsReductionLAP() const {return numRowsReductionLAP_;}
00277   inline void resetNumRowsReductionLAP() {numRowsReductionLAP_.clear();}
00278 
00280   virtual void addColumnSelectionStrategyLAP(ColumnSelectionStrategy value);
00282   inline std::vector<ColumnSelectionStrategy> getColumnSelectionStrategyLAP() const {return columnSelectionStrategyLAP_;}
00284   inline void resetColumnSelectionStrategyLAP(){columnSelectionStrategyLAP_.clear();}
00285 
00288   virtual void addRowSelectionStrategyLAP(RowSelectionStrategy value);
00290   inline std::vector<RowSelectionStrategy> getRowSelectionStrategyLAP() const {return rowSelectionStrategyLAP_;};
00292   inline void resetRowSelectionStrategyLAP() {rowSelectionStrategyLAP_.clear();}
00293 
00296   virtual void setColumnScalingStrategyLAP(ColumnScalingStrategy value);
00298   inline ColumnScalingStrategy getColumnScalingStrategyLAP() const {return columnScalingStrategyLAP_; };
00299 
00301   virtual void setColumnScalingBoundLAP(double value);
00303   inline double getColumnScalingBoundLAP() const {return columnScalingBoundLAP_;};
00304 
00306   virtual void setTimeLimit(double value);
00308   inline double getTimeLimit() const {return timeLimit_;}
00309 
00311   virtual void setMaxNumCuts(int value);
00313   inline int getMaxNumCuts() const {return maxNumCuts_;}
00314 
00316   virtual void setMaxNumComputedCuts(int value);
00318   inline int getMaxNumComputedCuts() const {return maxNumComputedCuts_;}
00319 
00322   virtual void setMaxNonzeroesTab(int value);
00324   inline int getMaxNonzeroesTab() const {return maxNonzeroesTab_;}
00325 
00330   virtual void setSkipGomory(int value);
00332   inline int getSkipGomory() const {return skipGomory_;}
00333 
00335 
00338 
00339 
00340 
00341   CglRedSplit2Param(bool use_default_strategies = true,
00342                     double eps = 1e-12,
00343                     double eps_coeff = 1e-11,
00344                     double eps_elim = 0.0,
00345                     double eps_relax_abs = 1e-11,
00346                     double eps_relax_rel = 1e-13,
00347                     double max_dyn = 1e6,
00348                     double min_viol = 1e-3,
00349                     int max_supp_abs = 1000,
00350                     double max_supp_rel = 0.1,
00351                     int use_int_slacks = 0,
00352                     double norm_zero = 1e-5,
00353                     double minNormReduction = 0.1,
00354                     int maxSumMultipliers = 10,
00355                     double normalization = 0.0001,
00356                     double away = 0.005,
00357                     double timeLimit = 60,
00358                     int maxNumCuts = 10000,
00359                     int maxNumComputedCuts = 10000,
00360                     int maxNonzeroesTab = 1000,
00361                     double columnScalingBoundLAP = 5.0,
00362                     int skipGomory = 1);
00363 
00368   CglRedSplit2Param(const CglParam &source,
00369                     bool use_default_strategies = true,
00370                     double eps_elim = 0.0,
00371                     double eps_relax_abs = 1e-11,
00372                     double eps_relax_rel = 1e-13,
00373                     double max_dyn = 1e6,
00374                     double min_viol = 1e-3,
00375                     double max_supp_rel = 0.1,
00376                     int use_int_slacks = 0,
00377                     double norm_zero = 1e-5,
00378                     double minNormReduction = 0.1,
00379                     int maxSumMultipliers = 10,
00380                     double normalization = 0.0001,
00381                     double away = 0.005,
00382                     double timeLimit = 60,
00383                     int maxNumCuts = 10000,
00384                     int maxNumComputedCuts = 10000,
00385                     int maxNonzeroesTab = 1000,
00386                     double columnScalingBoundLAP = 5.0,
00387                     int skipGomory = 1);
00388 
00390   CglRedSplit2Param(const CglRedSplit2Param &source);
00391 
00393   virtual CglRedSplit2Param* clone() const;
00394 
00396   virtual CglRedSplit2Param& operator=(const CglRedSplit2Param &rhs);
00397 
00399   virtual ~CglRedSplit2Param();
00401 
00402 protected:
00403 
00406 
00409   double EPS_ELIM;
00410 
00413   double EPS_RELAX_ABS;
00414 
00418   double EPS_RELAX_REL;
00419 
00420   // Maximum ratio between largest and smallest non zero 
00421   // coefficients in a cut. Default: 1e6.
00422   double MAXDYN;
00423 
00426   double MINVIOL;
00427 
00429   double MAX_SUPP_REL;
00430 
00432   int USE_INTSLACKS;
00433 
00436   double normIsZero_;
00437 
00439   double minNormReduction_;
00440 
00442   int maxSumMultipliers_;
00443 
00446   double normalization_;
00447 
00450   double away_;
00451   
00453   std::vector<int> numRowsReduction_;
00454 
00456   std::vector<ColumnSelectionStrategy> columnSelectionStrategy_;
00457 
00459   std::vector<RowSelectionStrategy> rowSelectionStrategy_;
00460 
00462   std::vector<int> numRowsReductionLAP_;
00463 
00465   std::vector<ColumnSelectionStrategy> columnSelectionStrategyLAP_;
00466 
00468   std::vector<RowSelectionStrategy> rowSelectionStrategyLAP_;
00469 
00472   ColumnScalingStrategy columnScalingStrategyLAP_;
00473 
00475   double columnScalingBoundLAP_;
00476 
00478   double timeLimit_;
00479 
00481   int maxNumCuts_;
00482 
00484   int maxNumComputedCuts_;
00485 
00487   int maxNonzeroesTab_;
00488 
00490   int skipGomory_;
00491 
00493 };
00494 
00495 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Nov 2013 for Cgl by  doxygen 1.6.1