Dip
0.92.4
src
old
DecompParam.h
Go to the documentation of this file.
1
//===========================================================================//
2
// This file is part of the Decomp Solver Framework. //
3
// //
4
// Decomp is distributed under the Common Public License as part of the //
5
// COIN-OR repository (http://www.coin-or.org). //
6
// //
7
// Author: Matthew Galati, Lehigh University //
8
// //
9
// Copyright (C) 2002-2007, Lehigh University, Matthew Galati, and Ted Ralphs//
10
// All Rights Reserved. //
11
//===========================================================================//
12
13
#ifndef DECOMP_PARAM_INCLUDED
14
#define DECOMP_PARAM_INCLUDED
15
16
#include "
UtilParameters.h
"
17
#include "
DecompConstants.h
"
18
19
// --------------------------------------------------------------------- //
20
class
DecompParam
{
21
private
:
22
DecompParam
(
const
DecompParam
&);
23
DecompParam
& operator=(
const
DecompParam
&);
24
25
public
:
26
27
int
LogLevel
;
28
int
LogAppLevel
;
29
int
LogDebugLevel
;
30
int
LogLpLevel
;
//name? inner solver
31
unsigned
int
LimitInitVars
;
//?? specific to PC? make own section ??
32
double
TolZero
;
33
int
LimitTotalCutIters
;
34
int
LimitTotalPriceIters
;
35
int
LimitRoundCutIters
;
36
int
LimitRoundPriceIters
;
37
double
LimitTime
;
38
int
PriceMultiPoly
;
39
int
CutDC
;
40
int
CutCGL
;
41
//subsection?
42
int
CutCglKnapC
;
43
int
CutCglFlowC
;
44
int
CutCglMir
;
45
int
CutCglClique
;
46
47
public
:
48
void
getSettings
(
UtilParameters
& utilParam) {
49
static
const
char
* common =
"DECOMP"
;
50
LogLevel
= utilParam.
GetSetting
(
"LogLevel"
, 0, common);
51
LogAppLevel
= utilParam.
GetSetting
(
"LogAppLevel"
, 0, common);
52
LogDebugLevel
= utilParam.
GetSetting
(
"LogDebugLevel"
, 0, common);
53
LogLpLevel
= utilParam.
GetSetting
(
"LogLpLevel"
, 0, common);
54
LimitInitVars
= utilParam.
GetSetting
(
"LimitInitVars"
, 1, common);
55
TolZero
= utilParam.
GetSetting
(
"TolZero"
,
56
DecompEpsilon
, common);
57
LimitTotalCutIters
= utilParam.
GetSetting
(
"LimitTotalCutIters"
,
58
2000, common);
59
LimitTotalPriceIters
= utilParam.
GetSetting
(
"LimitTotalPriceIters"
,
60
2000, common);
61
LimitRoundCutIters
= utilParam.
GetSetting
(
"LimitRoundCutIters"
,
62
2000, common);
63
LimitRoundPriceIters
= utilParam.
GetSetting
(
"LimitRoundPriceIters"
,
64
2000, common);
65
LimitTime
= utilParam.
GetSetting
(
"LimitTime"
,
66
600, common);
67
//TODO: what if we want multi-poly on just 1st and 3rd - TODO
68
PriceMultiPoly
= utilParam.
GetSetting
(
"PriceMultiPoly"
,
69
0, common);
70
CutDC
= utilParam.
GetSetting
(
"CutDC"
,
71
0, common);
72
CutCGL
= utilParam.
GetSetting
(
"CutCGL"
,
73
0, common);
74
CutCglKnapC
= utilParam.
GetSetting
(
"CutCglKnapC"
,
75
0, common);
76
CutCglFlowC
= utilParam.
GetSetting
(
"CutCglFlowC"
,
77
0, common);
78
CutCglMir
= utilParam.
GetSetting
(
"CutCglMir"
,
79
0, common);
80
CutCglClique
= utilParam.
GetSetting
(
"CutCglClique"
,
81
0, common);
82
}
83
84
//this should be a parameter method, should parameter be an object?
85
//have user register parameters, so can set usage too
86
void
dumpSettings
(ostream* os = &cout) {
87
static
const
char
* common =
"DECOMP"
;
88
(*os) <<
"\n========================================================\n"
89
<<
"DECOMP PARAMETER SETTINGS \n"
;
90
(*os) << common <<
": LogLevel = "
<<
LogLevel
<< endl;
91
(*os) << common <<
": LogAppLevel = "
<<
LogAppLevel
<< endl;
92
(*os) << common <<
": LogDebugLevel = "
<<
LogDebugLevel
<< endl;
93
(*os) << common <<
": LogLpLevel = "
<<
LogLpLevel
<< endl;
94
(*os) << common <<
": LimitInitVars = "
<<
LimitInitVars
<< endl;
95
(*os) << common <<
": TolZero = "
<<
TolZero
<< endl;
96
(*os) << common <<
": LimitTotalCutIters = "
97
<<
LimitTotalCutIters
<< endl;
98
(*os) << common <<
": LimitTotalPriceIters = "
99
<<
LimitTotalPriceIters
<< endl;
100
(*os) << common <<
": LimitRoundCutIters = "
101
<<
LimitRoundCutIters
<< endl;
102
(*os) << common <<
": LimitRoundPriceIters = "
103
<<
LimitRoundPriceIters
<< endl;
104
(*os) << common <<
": PriceMultiPoly= "
<<
PriceMultiPoly
<< endl;
105
(*os) << common <<
": CutDC = "
<<
CutDC
<< endl;
106
(*os) << common <<
": CutCGL = "
<<
CutCGL
<< endl;
107
(*os) << common <<
": CutCglKnapC = "
<<
CutCglKnapC
<< endl;
108
(*os) << common <<
": CutCglFlowC = "
<<
CutCglFlowC
<< endl;
109
(*os) << common <<
": CutCglMir = "
<<
CutCglMir
<< endl;
110
(*os) << common <<
": CutCglClique = "
<<
CutCglClique
<< endl;
111
(*os) <<
"========================================================\n"
;
112
}
113
114
public
:
115
DecompParam
():
116
LogLevel
(0),
117
LogAppLevel
(0),
118
LogDebugLevel
(0),
119
LogLpLevel
(0),
120
LimitInitVars
(1),
121
TolZero
(
DecompEpsilon
),
122
LimitTotalCutIters
(2000),
123
LimitTotalPriceIters
(2000),
124
LimitRoundCutIters
(2000),
125
LimitRoundPriceIters
(2000),
126
LimitTime
(60),
127
PriceMultiPoly
(0),
128
CutDC
(0),
129
CutCGL
(0),
130
CutCglKnapC
(0),
131
CutCglFlowC
(0),
132
CutCglMir
(0),
133
CutCglClique
(0)
134
{}
135
136
~DecompParam
() {};
137
};
138
139
#endif
DecompParam::CutCglMir
int CutCglMir
Definition:
DecompParam.h:103
DecompParam::LimitTotalPriceIters
int LimitTotalPriceIters
Definition:
DecompParam.h:34
DecompParam::dumpSettings
void dumpSettings(ostream *os=&cout)
Definition:
DecompParam.h:86
DecompParam::CutCglClique
int CutCglClique
Definition:
DecompParam.h:104
DecompParam::LimitRoundCutIters
int LimitRoundCutIters
Definition:
DecompParam.h:35
DecompParam::CutCGL
int CutCGL
Definition:
DecompParam.h:99
DecompEpsilon
const double DecompEpsilon
Definition:
Decomp.h:100
DecompParam::LimitRoundPriceIters
int LimitRoundPriceIters
Definition:
DecompParam.h:36
DecompParam::DecompParam
DecompParam()
Default constructors.
Definition:
DecompParam.h:723
DecompParam::PriceMultiPoly
int PriceMultiPoly
Definition:
DecompParam.h:38
DecompParam::LimitInitVars
unsigned int LimitInitVars
Definition:
DecompParam.h:31
DecompConstants.h
UtilParameters::GetSetting
string GetSetting(const char *name, const char *defaultValue, const char *section=NULL)
DecompParam::~DecompParam
~DecompParam()
Definition:
DecompParam.h:136
DecompParam::TolZero
double TolZero
Definition:
DecompParam.h:61
DecompParam::CutCglFlowC
int CutCglFlowC
Definition:
DecompParam.h:102
DecompParam::getSettings
void getSettings(UtilParameters &utilParam)
Definition:
DecompParam.h:48
UtilParameters
Definition:
UtilParameters.h:30
DecompParam
Definition:
DecompParam.h:27
DecompParam::LogLevel
int LogLevel
Definition:
DecompParam.h:38
DecompParam::CutCglKnapC
int CutCglKnapC
Definition:
DecompParam.h:101
DecompParam::CutDC
int CutDC
Definition:
DecompParam.h:98
DecompParam::LogDebugLevel
int LogDebugLevel
Definition:
DecompParam.h:39
UtilParameters.h
DecompParam::LogLpLevel
int LogLpLevel
Definition:
DecompParam.h:40
DecompParam::LimitTotalCutIters
int LimitTotalCutIters
Definition:
DecompParam.h:33
DecompParam::LogAppLevel
int LogAppLevel
Definition:
DecompParam.h:28
DecompParam::LimitTime
double LimitTime
Definition:
DecompParam.h:37
Generated by
1.8.15