ATM_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 ATM_PARAM_INCLUDED
00014 #define ATM_PARAM_INCLUDED
00015 
00016 //===========================================================================//
00017 #include "UtilParameters.h"
00018 
00019 using namespace std;
00020 
00021 //===========================================================================//
00028 //===========================================================================//
00029 class ATM_Param {
00030 public:
00031    int    LogLevel;          //application log level
00032    string DataDir;           //data directory
00033    string DataAtm;           //data file (atms)
00034    string DataDate;          //data file (dates)
00035    string DataAtmDate;       //data file (atms x dates)
00036    int    NumSteps;          //number of steps for discretization of NLP
00037    bool   UseTightModel;     //use tighter formulation of z=xy
00038    string ModelNameCore;     //name of model core
00039    string ModelNameRelax;    //name of model relax
00040    string ModelNameRelaxNest;//name of nested model relax
00041 
00042 public:
00043    void getSettings(UtilParameters & utilParam){
00044       static const char * common = "ATM";
00045       LogLevel       = utilParam.GetSetting("LogLevel",         0, common);
00046       DataDir        = utilParam.GetSetting("DataDir",         "", common);
00047       DataAtm        = utilParam.GetSetting("DataAtm",         "", common);    
00048       DataDate       = utilParam.GetSetting("DataDate",        "", common);    
00049       DataAtmDate    = utilParam.GetSetting("DataAtmDate",     "", common);    
00050       NumSteps       = utilParam.GetSetting("NumSteps",        10, common);
00051       UseTightModel  = utilParam.GetSetting("UseTightModel", true, common);
00052       ModelNameCore  = utilParam.GetSetting("ModelNameCore",   "", common);
00053       ModelNameRelax = utilParam.GetSetting("ModelNameRelax",  "", common);
00054       ModelNameRelaxNest 
00055      = utilParam.GetSetting("ModelNameRelaxNest", "", common);
00056    }
00057    
00058    void dumpSettings(ostream * os = &cout){
00059       static const char * common = "ATM";
00060       (*os) << "\n=====================================================\n"
00061             << "ATM_DECOMP PARAMETER SETTINGS \n";
00062       (*os) << common << ": LogLevel          : " << LogLevel          << endl;
00063       (*os) << common << ": DataDir           : " << DataDir           << endl;
00064       (*os) << common << ": DataAtm           : " << DataAtm           << endl;
00065       (*os) << common << ": DataDate          : " << DataDate          << endl;
00066       (*os) << common << ": DataAtmDate       : " << DataAtmDate       << endl;
00067       (*os) << common << ": NumSteps          : " << NumSteps          << endl;
00068       (*os) << common << ": UseTightModel     : " << UseTightModel     << endl;
00069       (*os) << common << ": ModelNameCore     : " << ModelNameCore     << endl;
00070       (*os) << common << ": ModelNameRelax    : " << ModelNameRelax    << endl;
00071       (*os) << common << ": ModelNameRelaxNest: " << ModelNameRelaxNest<< endl;
00072       (*os) <<   "=====================================================\n";
00073    }
00074    
00075 public:
00076    ATM_Param():    
00077       LogLevel          (0),
00078       DataDir           (""),
00079       DataAtm           (""),
00080       DataDate          (""),
00081       DataAtmDate       (""),
00082       NumSteps          (0),
00083       UseTightModel     (true),
00084       ModelNameCore     (""),
00085       ModelNameRelax    (""),
00086       ModelNameRelaxNest(""){};
00087    ~ATM_Param() {};
00088 };
00089 
00090 #endif

Generated on 5 Apr 2015 for Dip-All by  doxygen 1.6.1