solver  1.0
Settings.cpp
1 /*
2  This file is part of the EnergyOptimizatorOfRoboticCells program.
3 
4  EnergyOptimizatorOfRoboticCells is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  EnergyOptimizatorOfRoboticCells is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with EnergyOptimizatorOfRoboticCells. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #include <string>
19 #include <thread>
20 #include "Settings.h"
21 #include "DefaultSettings.h"
22 
23 using namespace std;
24 
25 namespace Settings {
26  /* GENERAL OPTIONS */
30  uint32_t NUMBER_OF_THREADS = max(1u, thread::hardware_concurrency());
32  bool USE_HEURISTICS = false;
33  bool USE_EXACT_ALGORITHM = false;
35 
36  /* ILP SOLVER OPTIONS */
40 
41  /* HEURISTIC OPTIONS */
45 }
46 
bool USE_EXACT_ALGORITHM
The variable indicates whether the exact algorithm should be used.
Definition: Settings.cpp:33
#define DEFAULT_MAX_RUNTIME
Default time limit.
double ILP_RELATIVE_GAP
If a given relative gap from the best known lower bound is achieved, then the solver stops...
Definition: Settings.cpp:37
#define DEFAULT_DATASET_FILE
Dataset to be loaded if not specified.
#define DEFAULT_ILP_RELATIVE_GAP
ILP solver stops if a current best solution is not worse than gap*100 % from optimality.
uint32_t MAX_ALTERNATIVES
The maximal number of alternative orders generated for each robot.
Definition: Settings.cpp:43
uint32_t NUMBER_OF_SEGMENTS
By how many segments (linear pieces) the energy function of the movement is approximated.
Definition: Settings.cpp:29
#define DEFAULT_MAX_ELITE_SOLUTIONS
Default number of elite solutions stored by the heuristic.
#define DEFAULT_MAX_ALTERNATIVES
It bounds the maximal number of generated alternatives for each robot, only some of them are selected...
string DATASET_FILE
Dataset with problems to be solved.
Definition: Settings.cpp:27
STL namespace.
#define DEFAULT_RESULTS_DIRECTORY
Path to a directory where the results could be written.
bool CALCULATE_LOWER_BOUND
Indicates whether a tight lower bound should be calculated.
Definition: Settings.cpp:38
double RUNTIME_OF_LOWER_BOUND
Time limit for the tight lower bound.
Definition: Settings.cpp:39
uint32_t MAX_ELITE_SOLUTIONS
The number of top solutions maintained by the heuristic.
Definition: Settings.cpp:42
bool VERBOSE
Boolean flag determining verbosity of the program.
Definition: Settings.cpp:28
uint32_t NUMBER_OF_THREADS
Maximal number of threads to be used.
Definition: Settings.cpp:30
#define DEFAULT_NUMBER_OF_SEGMENTS
The number of linear functions that approximate each energy function of the movement.
#define DEFAULT_VERBOSE
Verbosity is not turn on by default.
It declares the namespace for program settings.
#define DEFAULT_RUNTIME_OF_LOWER_BOUND
Upper bound on time limit for the tight lower bound.
This namespace encapsulates various external variables related to the program settings.
Definition: Settings.cpp:25
string RESULTS_DIRECTORY
If not empty, then the optimization results will be written to this directory.
Definition: Settings.cpp:34
#define DEFAULT_MIN_ITERS_PER_TUPLE
The minimal number of optimization iterations per partial solution in the heuristic.
uint32_t MIN_ITERS_PER_TUPLE
The minimal number of optimization iterations per each tuple.
Definition: Settings.cpp:44
Default configuration of the solver.
#define DEFAULT_CALCULATE_LOWER_BOUND
It specifies whether a tight lower bound should be calculated.
double MAX_RUNTIME
Maximal run time of the solver.
Definition: Settings.cpp:31
bool USE_HEURISTICS
The variable indicates whether the heuristic should be used.
Definition: Settings.cpp:32