From abdbef06f667f4a443031f334801b1c99028aa52 Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Mon, 13 Jan 2020 14:14:13 +0100 Subject: [PATCH] Enabling GLPK MILP Presolver by default (again) --- src/storm/settings/modules/GlpkSettings.cpp | 6 +++--- src/storm/settings/modules/GlpkSettings.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/storm/settings/modules/GlpkSettings.cpp b/src/storm/settings/modules/GlpkSettings.cpp index 1beddf1ae..59602cc74 100644 --- a/src/storm/settings/modules/GlpkSettings.cpp +++ b/src/storm/settings/modules/GlpkSettings.cpp @@ -15,11 +15,11 @@ namespace storm { const std::string GlpkSettings::moduleName = "glpk"; const std::string GlpkSettings::integerToleranceOption = "inttol"; const std::string GlpkSettings::outputOptionName = "output"; - const std::string GlpkSettings::milpPresolverOptionName = "milppresolver"; + const std::string GlpkSettings::noMilpPresolverOptionName = "nomilppresolver"; GlpkSettings::GlpkSettings() : ModuleSettings(moduleName) { this->addOption(storm::settings::OptionBuilder(moduleName, outputOptionName, true, "If set, the glpk output will be printed to the command line.").setIsAdvanced().build()); - this->addOption(storm::settings::OptionBuilder(moduleName, milpPresolverOptionName, true, "Enables glpk's built-in MILP presolver.").setIsAdvanced().build()); + this->addOption(storm::settings::OptionBuilder(moduleName, noMilpPresolverOptionName, true, "Disables glpk's built-in MILP presolver.").setIsAdvanced().build()); this->addOption(storm::settings::OptionBuilder(moduleName, integerToleranceOption, true, "Sets glpk's precision for integer variables.").setIsAdvanced().addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value", "The precision to achieve.").setDefaultValueDouble(1e-06).addValidatorDouble(ArgumentValidatorFactory::createDoubleRangeValidatorExcluding(0.0, 1.0)).build()).build()); } @@ -28,7 +28,7 @@ namespace storm { } bool GlpkSettings::isMILPPresolverEnabled() const { - return this->getOption(milpPresolverOptionName).getHasOptionBeenSet(); + return !this->getOption(noMilpPresolverOptionName).getHasOptionBeenSet(); } bool GlpkSettings::isIntegerToleranceSet() const { diff --git a/src/storm/settings/modules/GlpkSettings.h b/src/storm/settings/modules/GlpkSettings.h index 62dc7ba70..f43765de1 100644 --- a/src/storm/settings/modules/GlpkSettings.h +++ b/src/storm/settings/modules/GlpkSettings.h @@ -52,7 +52,7 @@ namespace storm { // Define the string names of the options as constants. static const std::string integerToleranceOption; static const std::string outputOptionName; - static const std::string milpPresolverOptionName; + static const std::string noMilpPresolverOptionName; }; } // namespace modules