SDPUC_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-2009, Lehigh University, Matthew Galati, and Ted Ralphs//
00010 // All Rights Reserved.                                                      //
00011 //===========================================================================//
00012 
00013 #ifndef SDPUC_PARAM_INCLUDED
00014 #define SDPUC_PARAM_INCLUDED
00015 
00016 //===========================================================================//
00017 #include "UtilMacros.h"
00018 #include "UtilMacrosDecomp.h"
00019 #include "UtilParameters.h"
00020 //===========================================================================//
00021 
00022 //===========================================================================//
00029 //===========================================================================//
00030 class SDPUC_Param {
00031 public:
00032    int    LogLevel;           //application log level
00033    int    UseSparse;          //use sparse version of relaxations
00034    string DataDir;            //data directory
00035    string Instance;           //name of instance
00036 
00037 public:
00038    void getSettings(UtilParameters & utilParam){
00039       static const char * common = "MCF";
00040       LogLevel       = utilParam.GetSetting("LogLevel",        0,      common);
00041       UseSparse      = utilParam.GetSetting("UseSparse",       0,      common);
00042       DataDir        = utilParam.GetSetting("DataDir",        "",      common);
00043       Instance       = utilParam.GetSetting("Instance",       "",      common);
00044       if(!checkOptions())
00045          throw UtilException("Bad Parameter", "getSettings", "MCF_Param");
00046    }
00047 
00048    bool checkOptions(){
00049       bool optionsOk = true;
00050       return optionsOk;
00051    }
00052 
00053    void dumpSettings(ostream * os = &cout){
00054       static const char * common = "MCF";
00055       (*os) << "\n=====================================================\n"
00056             << "MCF_DECOMP PARAMETER SETTINGS \n";
00057       (*os) << common << ": LogLevel          : " << LogLevel      << endl;
00058       (*os) << common << ": UseSparse         : " << UseSparse     << endl;
00059       (*os) << common << ": DataDir           : " << DataDir       << endl;
00060       (*os) << common << ": Instance          : " << Instance      << endl;
00061       (*os) <<   "=====================================================\n";
00062    }
00063    
00064 public:
00065    SDPUC_Param() :
00066       LogLevel          (0),
00067       UseSparse         (0),
00068       DataDir           (""),
00069       Instance          ("")
00070    {}
00071    ~SDPUC_Param() {};
00072 };
00073 
00074 #endif

Generated on 12 Feb 2015 for Dip-All by  doxygen 1.6.1