selectedValue = _selection;
}
+void TunableSetting::print() {
+ if (hasVar) {
+ model_print("Type %llu, ", type);
+ }
+ model_print("Param %u = %u\n", param, selectedValue);
+}
+
unsigned int tunableSettingHash(TunableSetting *setting) {
return setting->hasVar ^ setting->type ^ setting->param;
}
else
randomSetting->selectedValue = randomchoice + 1;
}
+
+void SearchTuner::print() {
+ HSIteratorTunableSetting *iterator=settings.iterator();
+ while(iterator->hasNext()) {
+ TunableSetting *setting=iterator->next();
+ setting->print();
+ }
+ delete iterator;
+
+}
+
+void SearchTuner::printUsed() {
+ HSIteratorTunableSetting *iterator=usedSettings.iterator();
+ while(iterator->hasNext()) {
+ TunableSetting *setting=iterator->next();
+ setting->print();
+ }
+ delete iterator;
+}
TunableSetting(TunableParam param);
TunableSetting(TunableSetting * ts);
void setDecision(int _low, int _high, int _default, int _selection);
+ void print();
MEMALLOC;
private:
bool hasVar;
SearchTuner * copyUsed();
void randomMutate();
uint getSize() { return usedSettings.getSize();}
-
+ void print();
+ void printUsed();
+
MEMALLOC;
private:
/** Used Settings keeps track of settings that were actually used by
long long CSolver::getSolveTime() { return satEncoder->getSolveTime(); }
-void CSolver::autoTune() {
- AutoTuner * autotuner=new AutoTuner();
+void CSolver::autoTune(uint budget) {
+ AutoTuner * autotuner=new AutoTuner(budget);
autotuner->addProblem(this);
autotuner->tune();
}
void replaceBooleanWithFalse(Boolean *bexpr);
void replaceBooleanWithBoolean(Boolean *oldb, Boolean *newb);
CSolver *clone();
- void autoTune();
+ void autoTune(uint budget);
void setTuner(Tuner * _tuner) { tuner = _tuner; }
long long getElapsedTime() { return elapsedTime; }