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