Dip 0.95.0
Loading...
Searching...
No Matches
AlpsDecompParam.h
Go to the documentation of this file.
1//===========================================================================//
2// This file is part of the DIP Solver Framework. //
3// //
4// DIP is distributed under the Eclipse Public License as part of the //
5// COIN-OR repository (http://www.coin-or.org). //
6// //
7// Authors: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8// Ted Ralphs, Lehigh University (ted@lehigh.edu) //
9// Jiadong Wang, Lehigh University (jiw408@lehigh.edu) //
10// //
11// Copyright (C) 2002-2019, Lehigh University, Matthew Galati, Ted Ralphs //
12// All Rights Reserved. //
13//===========================================================================//
14
15//===========================================================================//
16#ifndef AlpsDecompParam_h_
17#define AlpsDecompParam_h_
18
19//===========================================================================//
20#include "UtilParameters.h"
21
22//===========================================================================//
28//===========================================================================//
29
30//===========================================================================//
32
33 //----------------------------------------------------------------------//
38 //----------------------------------------------------------------------//
39
40public:
48
54
59
69
74
79
80
81 //-----------------------------------------------------------------------//
86 //-----------------------------------------------------------------------//
87public:
89 static const char* sec = "ALPS";
90 logFileLevel = param.GetSetting("logFileLevel", 0, sec);
91 printSolution = param.GetSetting("printSolution", false, sec);
92 checkMemory = param.GetSetting("checkMemory", false, sec);
93 msgLevel = param.GetSetting("msgLevel", 2, sec);
94 nodeLimit = param.GetSetting("nodeLimit", ALPS_INT_MAX, sec);
95 nodeLogInterval = param.GetSetting("nodeLogInterval", 10, sec);
96
97 if (msgLevel > 2) {
99 }
100 }
101
102 void dumpSettings(std::ostream* os = &std::cout) {
103 static const char* sec = "ALPS";
104 (*os) << "\n========================================================\n"
105 << "ALPS PARAMETER SETTINGS \n";
106 (*os) << sec << ": logFileLevel = " << logFileLevel << std::endl;
107 (*os) << sec << ": printSolution = " << printSolution << std::endl;
108 (*os) << sec << ": checkMemory = " << checkMemory << std::endl;
109 (*os) << sec << ": msgLevel = " << msgLevel << std::endl;
110 (*os) << sec << ": nodeLimit = " << nodeLimit << std::endl;
111 (*os) << sec << ": nodeLogInterval = " << nodeLogInterval << std::endl;
112 }
113
116
117 //-----------------------------------------------------------------------//
122 //-----------------------------------------------------------------------//
123public:
128
130 getSettings(utilParam);
131 }
132
140};
141
142#endif
#define ALPS_INT_MAX
void getSettings(UtilParameters &param)
bool printSolution
Print solution to screen and log if have a solution and msgLevel and logFileLevel permits.
int logFileLevel
The level of log file.
AlpsDecompParam()
Default constructors.
int nodeLimit
The max number of nodes can be processed.
AlpsDecompParam(UtilParameters &utilParam)
bool checkMemory
Check memory.
int nodeLogInterval
Node log interval.
void dumpSettings(std::ostream *os=&std::cout)
~AlpsDecompParam()
Destructor.
int msgLevel
The level of printing messages on screen.
std::string GetSetting(const char *name, const char *defaultValue, const char *section=NULL)