MILP_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 MILP_PARAM_INCLUDED
00014 #define MILP_PARAM_INCLUDED
00015 
00016 //===========================================================================//
00017 #include "UtilParameters.h"
00018 
00019 using namespace std;
00020 
00021 //===========================================================================//
00022 class MILP_Param{
00023 public:
00024    int    LogLevel;   
00025    int    RandomSeed;
00026    double RelaxPercent;
00027    double BestKnownLB;
00028    double BestKnownUB;
00029    string DataDir;
00030    string Instance;   
00031 
00032 public:
00033    void getSettings(UtilParameters & utilParam){
00034       static const char * common = "MILP";
00035       LogLevel     = utilParam.GetSetting("LogLevel",     0,       common);
00036       RandomSeed   = utilParam.GetSetting("RandomSeed",   1,       common);
00037       RelaxPercent = utilParam.GetSetting("RelaxPercent", 0.333,   common);
00038       BestKnownLB  = utilParam.GetSetting("BestKnownLB",  -1.e100, common);
00039       BestKnownUB  = utilParam.GetSetting("BestKnownUB",   1.e100, common);
00040       DataDir      = utilParam.GetSetting("DataDir",      "",      common);
00041       Instance     = utilParam.GetSetting("Instance",     "",      common);    
00042    }
00043 
00044    void dumpSettings(ostream * os = &cout){
00045       static const char * common = "MILP";
00046       (*os) << "\n=====================================================\n"
00047             << "MILP_DECOMP PARAMETER SETTINGS \n";
00048       (*os) << common << ": LogLevel    : " << LogLevel     << endl;
00049       (*os) << common << ": RandomSeed  : " << RandomSeed   << endl;
00050       (*os) << common << ": RelaxPercent: " << RelaxPercent << endl;
00051       (*os) << common << ": BestKnownLB : " << BestKnownLB  << endl;
00052       (*os) << common << ": BestKnownUB : " << BestKnownUB  << endl;
00053       (*os) << common << ": DataDir     : " << DataDir      << endl;
00054       (*os) << common << ": Instance    : " << Instance     << endl;
00055       (*os) << "\n=====================================================\n";
00056    }
00057    
00058 public:
00059    MILP_Param():    
00060       LogLevel    (0     ),
00061       RandomSeed  (1     ),
00062       RelaxPercent(0.333 ),      
00063       BestKnownLB (-1e100),
00064       BestKnownUB ( 1e100),
00065       DataDir     (""    ),
00066       Instance    (""    ) {};
00067    ~MILP_Param() {};
00068 };
00069 
00070 #endif

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