VRP_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-2007, Lehigh University, Matthew Galati, and Ted Ralphs//
00010 // All Rights Reserved.                                                      //
00011 //===========================================================================//
00012 
00013 #ifndef VRP_PARAM_INCLUDED
00014 #define VRP_PARAM_INCLUDED
00015 
00016 // --------------------------------------------------------------------- //
00017 #include "UtilParameters.h"
00018 
00019 // --------------------------------------------------------------------- //
00026 // --------------------------------------------------------------------- //
00027 class VRP_Param{  
00028 public:
00029    int    LogLevel;           //application log level
00030    string DataDir;            //data directory
00031    string Instance;           //name of instance
00032    int    NumRoutes;          //number of routes
00033    string ModelNameCore;      //name of model core
00034    string ModelNameRelax;     //name of model relax
00035    string ModelNameRelaxNest; //name of nested model relax
00036    
00037 public:
00038    void getSettings(UtilParameters & utilParam){
00039       static const char * common = "VRP";
00040       LogLevel     = utilParam.GetSetting("LogLevel",      0,  common);
00041       DataDir      = utilParam.GetSetting("DataDir",      "",  common);
00042       Instance     = utilParam.GetSetting("Instance",     "",  common);
00043       NumRoutes    = utilParam.GetSetting("NumRoutes",     1,  common);    
00044       ModelNameCore  
00045          = utilParam.GetSetting("ModelNameCore",  "", common);
00046       ModelNameRelax 
00047          = utilParam.GetSetting("ModelNameRelax", "", common);
00048       ModelNameRelaxNest 
00049          = utilParam.GetSetting("ModelNameRelaxNest", "", common);
00050    }
00051 
00052    void dumpSettings(ostream * os = &cout){
00053       static const char * common = "VRP";
00054       (*os) << "\n=====================================================\n"
00055             << "VRP_DECOMP PARAMETER SETTINGS \n";
00056       (*os) << common << ": LogLevel          : " << LogLevel          << endl;
00057       (*os) << common << ": DataDir           : " << DataDir           << endl;
00058       (*os) << common << ": Instance          : " << Instance          << endl;
00059       (*os) << common << ": NumRoutes         : " << NumRoutes         << endl;
00060       (*os) << common << ": ModelNameCore     : " << ModelNameCore     << endl;
00061       (*os) << common << ": ModelNameRelax    : " << ModelNameRelax    << endl;
00062       (*os) << common << ": ModelNameRelaxNest: " << ModelNameRelaxNest<< endl;
00063       (*os) <<   "=====================================================\n";
00064    }
00065 
00066 public:
00067    VRP_Param():
00068       LogLevel          (0 ),
00069       DataDir           (""),
00070       Instance          (""),
00071       NumRoutes         (0 ),
00072       ModelNameCore     (""),
00073       ModelNameRelax    (""),
00074       ModelNameRelaxNest("")      
00075    {}
00076    ~VRP_Param() {};
00077 };
00078 
00079 #endif

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