From 648357de642e62ea2a7e864bf6ae89e29f78f437 Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 19 Jul 2021 16:34:25 +0200 Subject: [PATCH] disable objective transformation in W-Model of fastga --- eo/contrib/irace/fastga.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/eo/contrib/irace/fastga.cpp b/eo/contrib/irace/fastga.cpp index 170f69877..0455f07c1 100644 --- a/eo/contrib/irace/fastga.cpp +++ b/eo/contrib/irace/fastga.cpp @@ -267,6 +267,26 @@ std::ostream& operator<<(std::ostream& os, const Problem& pb) return os; } +/***************************************************************************** + * IOH problem adaptation. + *****************************************************************************/ + +class WModelFlat : public ioh::problem::wmodel::WModelOneMax +{ + public: + WModelFlat(const int instance, const int n_variables, + const double dummy_para, const int epistasis_para, const int neutrality_para, + const int ruggedness_para) + : WModelOneMax(instance, n_variables, dummy_para, epistasis_para, neutrality_para, ruggedness_para) + { } + + protected: + double transform_objectives(const double y) override + { // Disable objective function shift & scaling. + return y; + } +}; + /***************************************************************************** * Command line interface. *****************************************************************************/ @@ -562,7 +582,8 @@ int main(int argc, char* argv[]) // + "_N" + std::to_string(w_neutrality) // + "_R" + std::to_string(w_ruggedness); - ioh::problem::wmodel::WModelOneMax w_model_om( + // ioh::problem::wmodel::WModelOneMax w_model_om( + WModelFlat w_model_om( instance, dimension, w_dummy,