TSP_Param.h

Go to the documentation of this file.
00001 //===========================================================================//
00002 // This file is part of the Decomp Solver Framework.                         //
00003 //                                                                           //
00004 // Decomp is distributed under the Common Public License as part of the      //
00005 // COIN-OR repository (http://www.coin-or.org).                              //
00006 //                                                                           //
00007 // Author: Matthew Galati, Lehigh University                                 //
00008 //                                                                           //
00009 // Copyright (C) 2002-2015, Lehigh University, Matthew Galati, and Ted Ralphs//
00010 // All Rights Reserved.                                                      //
00011 //===========================================================================//
00012 
00013 #ifndef TSP_PARAM_INCLUDED
00014 #define TSP_PARAM_INCLUDED
00015 
00016 // --------------------------------------------------------------------- //
00017 #include "UtilParameters.h"
00018 
00019 // --------------------------------------------------------------------- //
00029 // --------------------------------------------------------------------- //
00030 class TSP_Param{  
00031 public:
00032    int    LogLevel;
00033    string DataDir;
00034    string Instance;
00035    int    CutSubtoursX;
00036    //int    CutBlossomsX;
00037    //int    CutCombsX;
00038    string ModelNameCore;      //name of model core
00039    string ModelNameRelax;     //name of model relax
00040 
00041    
00042 public:
00043    void getSettings(UtilParameters & utilParam){
00044       static const char * common = "TSP";
00045       LogLevel       = utilParam.GetSetting("LogLevel",        0, common);
00046       DataDir        = utilParam.GetSetting("DataDir",        "", common);
00047       Instance       = utilParam.GetSetting("Instance",       "", common);    
00048       CutSubtoursX   = utilParam.GetSetting("CutSubtoursX",    1, common);    
00049       //CutBlossomsX   = utilParam.GetSetting("CutBlossomsX",    1, common); 
00050       //CutCombsX      = utilParam.GetSetting("CutCombsX",       1, common);
00051       ModelNameCore  = utilParam.GetSetting("ModelNameCore",  "2MATCH", 
00052                         common);
00053       ModelNameRelax = utilParam.GetSetting("ModelNameRelax", "SUBTOUR", 
00054                         common);
00055    }
00056 
00057    void dumpSettings(ostream * os = &cout){
00058       static const char * common = "TSP";
00059       (*os) << "\n=====================================================\n"
00060             << "TSP_DECOMP PARAMETER SETTINGS \n";
00061       (*os) << common << ": LogLevel      : " << LogLevel       << endl;
00062       (*os) << common << ": DataDir       : " << DataDir        << endl;
00063       (*os) << common << ": Instance      : " << Instance       << endl;
00064       (*os) << common << ": CutSubtoursX  : " << CutSubtoursX   << endl;
00065       //(*os) << common << ": CutBlossomsX  : " << CutBlossomsX   << endl;
00066       //(*os) << common << ": CutCombsX     : " << CutCombsX      << endl;
00067       (*os) << common << ": ModelNameCore : " << ModelNameCore  << endl;
00068       (*os) << common << ": ModelNameRelax: " << ModelNameRelax << endl;
00069       (*os) <<   "=====================================================\n";
00070    }
00071 
00072 public:
00073    TSP_Param():
00074       LogLevel      (0  ),
00075       DataDir       ("."),
00076       Instance      ("" ),
00077       CutSubtoursX  (1  ),
00078       //CutBlossomsX  (0  ),
00079       //CutCombsX     (0  ),   
00080       ModelNameCore ("2MATCH"),
00081       ModelNameRelax("SUBTOUR")
00082 
00083    {}
00084    ~TSP_Param() {};
00085 };
00086 
00087 #endif

Generated on 3 Jun 2015 for Dip-All by  doxygen 1.6.1