Dip-All
0.91.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
home
coin
svn-release
Dip-0.91.5
Dip
examples
TSP
TSP_Param.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-2015, Lehigh University, Matthew Galati, and Ted Ralphs//
10
// All Rights Reserved. //
11
//===========================================================================//
12
13
#ifndef TSP_PARAM_INCLUDED
14
#define TSP_PARAM_INCLUDED
15
16
// --------------------------------------------------------------------- //
17
#include "UtilParameters.h"
18
19
// --------------------------------------------------------------------- //
29
// --------------------------------------------------------------------- //
30
class
TSP_Param
{
31
public
:
32
int
LogLevel
;
33
string
DataDir
;
34
string
Instance
;
35
int
CutSubtoursX
;
36
//int CutBlossomsX;
37
//int CutCombsX;
38
string
ModelNameCore
;
//name of model core
39
string
ModelNameRelax
;
//name of model relax
40
41
42
public
:
43
void
getSettings
(
UtilParameters
& utilParam){
44
static
const
char
* common =
"TSP"
;
45
LogLevel
= utilParam.
GetSetting
(
"LogLevel"
, 0, common);
46
DataDir
= utilParam.
GetSetting
(
"DataDir"
,
""
, common);
47
Instance
= utilParam.
GetSetting
(
"Instance"
,
""
, common);
48
CutSubtoursX
= utilParam.
GetSetting
(
"CutSubtoursX"
, 1, common);
49
//CutBlossomsX = utilParam.GetSetting("CutBlossomsX", 1, common);
50
//CutCombsX = utilParam.GetSetting("CutCombsX", 1, common);
51
ModelNameCore
= utilParam.
GetSetting
(
"ModelNameCore"
,
"2MATCH"
,
52
common);
53
ModelNameRelax
= utilParam.
GetSetting
(
"ModelNameRelax"
,
"SUBTOUR"
,
54
common);
55
}
56
57
void
dumpSettings
(ostream * os = &cout){
58
static
const
char
* common =
"TSP"
;
59
(*os) <<
"\n=====================================================\n"
60
<<
"TSP_DECOMP PARAMETER SETTINGS \n"
;
61
(*os) << common <<
": LogLevel : "
<<
LogLevel
<< endl;
62
(*os) << common <<
": DataDir : "
<<
DataDir
<< endl;
63
(*os) << common <<
": Instance : "
<<
Instance
<< endl;
64
(*os) << common <<
": CutSubtoursX : "
<<
CutSubtoursX
<< endl;
65
//(*os) << common << ": CutBlossomsX : " << CutBlossomsX << endl;
66
//(*os) << common << ": CutCombsX : " << CutCombsX << endl;
67
(*os) << common <<
": ModelNameCore : "
<<
ModelNameCore
<< endl;
68
(*os) << common <<
": ModelNameRelax: "
<<
ModelNameRelax
<< endl;
69
(*os) <<
"=====================================================\n"
;
70
}
71
72
public
:
73
TSP_Param
():
74
LogLevel
(0 ),
75
DataDir
(
"."
),
76
Instance
(
""
),
77
CutSubtoursX
(1 ),
78
//CutBlossomsX (0 ),
79
//CutCombsX (0 ),
80
ModelNameCore
(
"2MATCH"
),
81
ModelNameRelax
(
"SUBTOUR"
)
82
83
{}
84
~TSP_Param
() {};
85
};
86
87
#endif
UtilParameters
Definition:
UtilParameters.h:30
TSP_Param::getSettings
void getSettings(UtilParameters &utilParam)
Definition:
TSP_Param.h:43
TSP_Param::LogLevel
int LogLevel
Definition:
TSP_Param.h:32
UtilParameters::GetSetting
string GetSetting(const char *name, const char *defaultValue, const char *section=NULL)
TSP_Param
Definition:
TSP_Param.h:30
TSP_Param::dumpSettings
void dumpSettings(ostream *os=&cout)
Definition:
TSP_Param.h:57
TSP_Param::Instance
string Instance
Definition:
TSP_Param.h:34
TSP_Param::TSP_Param
TSP_Param()
Definition:
TSP_Param.h:73
TSP_Param::ModelNameRelax
string ModelNameRelax
Definition:
TSP_Param.h:39
TSP_Param::ModelNameCore
string ModelNameCore
Definition:
TSP_Param.h:38
TSP_Param::~TSP_Param
~TSP_Param()
Definition:
TSP_Param.h:84
TSP_Param::DataDir
string DataDir
Definition:
TSP_Param.h:33
TSP_Param::CutSubtoursX
int CutSubtoursX
Definition:
TSP_Param.h:35
Generated by
1.8.5