2 #include "searchtuner.h"
3 #include "kmeanstuner.h"
6 #include "randomtuner.h"
8 void printKnownTunerTypes(){
9 printf("Known Tuner Types:\nRandom Tuner=1\nComp Tuner=2\nKmeans Tuner=3\nSimulated Annealing Tuner=4\n");
12 BasicTuner *createTuner(uint tunertype, uint budget, uint rounds, uint timeout){
14 case 1: return new RandomTuner(budget, timeout);
15 case 2: return new CompTuner(budget, timeout);
16 case 3: return new KMeansTuner(budget, rounds, timeout);
17 case 4: return new SATuner(budget, timeout);
19 printf("Tuner type %u is unknown\n", tunertype);
20 printKnownTunerTypes();
26 int main(int argc, char **argv) {
28 printf("You should specify: %s TunerType budget rounds timeout problemfilenames - tunerfilenames\n", argv[0]);
29 printKnownTunerTypes();
36 sscanf(argv[1], "%u", &tunertype);
37 sscanf(argv[2], "%u", &budget);
38 sscanf(argv[3], "%u", &rounds);
39 sscanf(argv[4], "%u", &timeout);
41 BasicTuner *multituner = createTuner(tunertype, budget, rounds, timeout);
42 bool tunerfiles = false;
43 for (int i = 5; i < argc; i++) {
45 if (argv[i][0] == '-' && argv[i][1] == 0)
48 multituner->addProblem(argv[i]);
50 multituner->addTuner(new SearchTuner(argv[i], true )); //add settings to usedsettigs
54 printf("You should specify %s budget rounds timeout problemfilenames - tunerfilenames", argv[0]);