#include "searchtuner.h"
#include <iostream>
#include <fstream>
+#include <limits>
#include "solver_interface.h"
CompTuner::CompTuner(uint _budget, uint _timeout) :
for (uint l = 0; l < problems.getSize(); l++) {
Problem *problem = problems.get(l);
long long time1 = tuner1->getTime(problem);
+ if(time1 == -1){
+ time1=LLONG_MAX;
+ }
long long time2 = tuner2->getTime(problem);
- long long minTime =DBL_MAX;
- if(time1 != -1 || time2 != -1){
- minTime = min(time1,time2);
+ if(time2 == -1){
+ time2 = LLONG_MAX;
}
- mintimes[l] = pow(minTime, (double)1 / problems.getSize());
+ mintimes[l] = pow(min(time1,time2), (double)1 / problems.getSize());
}
double result = 1;
for (uint l = 0; l < problems.getSize(); l++) {