-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptcfg.h
69 lines (53 loc) · 1.35 KB
/
optcfg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
///
/// include/utility/optcfg.h
///
/// Written by Roberto Bargetto
/// DIGEP
/// Politecnico di Torino
/// Corso Duca degli Abruzzi, 10129, Torino
/// Italy
///
/// Copyright 2023 by Roberto Bargetto
/// roberto.bargetto@polito.it or roberto.bargetto@gmail.com
///
/// This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0)
/// See the license at http://creativecommons.org/licenses/by-nc-sa/4.0/
///
#ifndef OPTCFG_H
#define OPTCFG_H
#include <string>
struct optcfg
{
/// Optimization algorithm
enum Algo
{
LP,
TS
};
/// Configuration parameters
Algo opt_algo = Algo::TS;
unsigned long long alg_mode = 0;
unsigned int maxmem = 512;
unsigned int threads2use = 1;
double timelimsec = 600;
double maxgap = 0.0;
unsigned int intp0;
unsigned int intp1;
double dblp0;
void read(std::string);
optcfg()
{
}
optcfg(std::string fn)
{
this->read(fn);
}
~optcfg()
{
}
};
std::string getAlg(optcfg::Algo);
optcfg::Algo getAlg(std::string);
/// function prototype
std::string log_opt_config(optcfg);
#endif // OPTCFG_H