EasyLocalpp
3.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Control.h
Go to the documentation of this file.
1
#if !defined(_CONTROL_HH_)
2
#define _CONTROL_HH_
3
4
#include <stdexcept>
5
#include <list>
6
#include <string>
7
#include <iostream>
8
#include <memory>
9
#include <sstream>
10
//#include "easylocal/utils/types.hh"
11
12
13
#ifdef WIN32
14
#pragma warning(disable:4786)
15
#endif
16
17
18
#include "
easylocal/utils/Parameters.h
"
19
#include "
easylocal/utils/Defaults.hh
"
20
21
22
//#include "Utilities.h"
23
//#include "Parameters.h"
24
//#include "Settings.h"
25
26
using namespace
std;
27
28
//#include "Timer.h"
29
//#include "Random.h"
30
#include <map>
31
32
class
Control
{
33
private
:
34
//map< string, string > parameters;
35
//Timer timer;
36
37
int
nrTry, maxTry;
38
39
int
seed;
40
double
timeLimit;
41
42
ostream *os;
43
44
const
char
*ss;
45
46
public
:
47
48
Control
(
int
,
char
**);
// construct a control object, given a set of command line options
49
~
Control
();
50
const
char
*
is
;
51
const
char
*
param_set_file
;
52
53
Longint
ls_iter
;
54
55
56
int
runner
;
57
int
max_restart
;
58
int
solver
;
59
Longint
max_iter
;
60
Longint
max_idle
;
61
62
Bool
print_statistics
;
63
Bool
certificate
;
64
string
os_certificate
;
65
66
void
Usage();
67
68
void
ComParser(
int
argc,
char
** argv);
69
int
getSeed
() {
70
return
seed;
71
}
// get the seed for the random number generator
72
void
resetTime();
// reset the timer
73
74
;
// check whether our run has time left
75
int
getNumTry
() {
76
return
(nrTry);
77
}
78
;
79
80
81
const
char
*
getInputStream
() {
82
return
is;
83
}
// get the input stream for constructing problems
84
const
char
*
getInputSolutionStream
() {
85
return
ss;
86
}
// get the input stream for constructing problems
87
ostream&
getOutputStream
() {
88
return
*os;
89
}
// get the output stream used for writing output data
90
int
getNumberOfTries
() {
91
return
maxTry;
92
}
// get the max number of tries
93
bool
triesLeft
() {
94
return
(nrTry < maxTry);
95
}
// check whether more tries need to be run
96
double
getTimeLimit
() {
97
return
timeLimit;
98
}
// get the time limit of one run
99
void
informationsReport();
100
char
*readline(istream &infile);
101
char
*match(
char
*source,
char
*prefix);
102
void
SetDefaultParameters();
103
const
char
*fullPathToInstance() {
return
is;};
104
105
Parameters
*parset;
106
107
};
108
109
#endif
Control::triesLeft
bool triesLeft()
Definition:
Control.h:93
Control::os_certificate
string os_certificate
Definition:
Control.h:64
Longint
#define Longint
Definition:
Definitions.h:72
Control::getNumberOfTries
int getNumberOfTries()
Definition:
Control.h:90
Control::max_restart
int max_restart
Definition:
Control.h:57
Control::getTimeLimit
double getTimeLimit()
Definition:
Control.h:96
Parameters
Definition:
Parameters.h:139
Control::max_idle
Longint max_idle
Definition:
Control.h:60
Defaults.hh
Control::getInputSolutionStream
const char * getInputSolutionStream()
Definition:
Control.h:84
Control::max_iter
Longint max_iter
Definition:
Control.h:59
Parameters.h
Control::print_statistics
Bool print_statistics
Definition:
Control.h:62
Control::getSeed
int getSeed()
Definition:
Control.h:69
Control::is
const char * is
Definition:
Control.h:50
Bool
#define Bool
Definition:
Definitions.h:29
Control::certificate
Bool certificate
Definition:
Control.h:63
Control::ls_iter
Longint ls_iter
Definition:
Control.h:53
Control::getNumTry
int getNumTry()
Definition:
Control.h:75
Control
Definition:
Control.h:32
Control::getInputStream
const char * getInputStream()
Definition:
Control.h:81
Control::runner
int runner
Definition:
Control.h:56
Control::getOutputStream
ostream & getOutputStream()
Definition:
Control.h:87
Control::param_set_file
const char * param_set_file
Definition:
Control.h:51
Control::solver
int solver
Definition:
Control.h:58
include
easylocal
utils
Control.h
Generated on Wed Nov 25 2015 19:09:15 for EasyLocalpp by
1.8.6