From efcb7188516829218519bf171eaec172db482d72 Mon Sep 17 00:00:00 2001 From: TimQu Date: Tue, 20 Mar 2018 18:39:02 +0100 Subject: [PATCH] removed the --forcebounds setting --- .../solver/MinMaxSolverEnvironment.cpp | 9 --------- .../solver/NativeSolverEnvironment.cpp | 11 +---------- .../environment/solver/NativeSolverEnvironment.h | 3 --- .../modules/MinMaxEquationSolverSettings.cpp | 6 ------ .../modules/MinMaxEquationSolverSettings.h | 5 ----- .../modules/NativeEquationSolverSettings.cpp | 15 ++++----------- .../modules/NativeEquationSolverSettings.h | 6 +++--- 7 files changed, 8 insertions(+), 47 deletions(-) diff --git a/src/storm/environment/solver/MinMaxSolverEnvironment.cpp b/src/storm/environment/solver/MinMaxSolverEnvironment.cpp index ada4cc5da..536bf5913 100644 --- a/src/storm/environment/solver/MinMaxSolverEnvironment.cpp +++ b/src/storm/environment/solver/MinMaxSolverEnvironment.cpp @@ -17,7 +17,6 @@ namespace storm { considerRelativeTerminationCriterion = minMaxSettings.getConvergenceCriterion() == storm::settings::modules::MinMaxEquationSolverSettings::ConvergenceCriterion::Relative; STORM_LOG_ASSERT(considerRelativeTerminationCriterion || minMaxSettings.getConvergenceCriterion() == storm::settings::modules::MinMaxEquationSolverSettings::ConvergenceCriterion::Absolute, "Unknown convergence criterion"); multiplicationStyle = minMaxSettings.getValueIterationMultiplicationStyle(); - forceBounds = minMaxSettings.isForceBoundsSet(); symmetricUpdates = minMaxSettings.isForceIntervalIterationSymmetricUpdatesSet(); } @@ -70,14 +69,6 @@ namespace storm { multiplicationStyle = value; } - bool MinMaxSolverEnvironment::isForceBoundsSet() const { - return forceBounds; - } - - void MinMaxSolverEnvironment::setForceBounds(bool value) { - forceBounds = value; - } - bool MinMaxSolverEnvironment::isSymmetricUpdatesSet() const { return symmetricUpdates; } diff --git a/src/storm/environment/solver/NativeSolverEnvironment.cpp b/src/storm/environment/solver/NativeSolverEnvironment.cpp index 722fed3d1..149a2feb6 100644 --- a/src/storm/environment/solver/NativeSolverEnvironment.cpp +++ b/src/storm/environment/solver/NativeSolverEnvironment.cpp @@ -18,8 +18,7 @@ namespace storm { STORM_LOG_ASSERT(considerRelativeTerminationCriterion || nativeSettings.getConvergenceCriterion() == storm::settings::modules::NativeEquationSolverSettings::ConvergenceCriterion::Absolute, "Unknown convergence criterion"); powerMethodMultiplicationStyle = nativeSettings.getPowerMethodMultiplicationStyle(); sorOmega = storm::utility::convertNumber(nativeSettings.getOmega()); - forceBounds = nativeSettings.isForceBoundsSet(); - symmetricUpdates = nativeSettings.isForcePowerMethodSymmetricUpdatesSet(); + symmetricUpdates = nativeSettings.isForceIntervalIterationSymmetricUpdatesSet(); } @@ -80,14 +79,6 @@ namespace storm { sorOmega = value; } - bool NativeSolverEnvironment::isForceBoundsSet() const { - return forceBounds; - } - - void NativeSolverEnvironment::setForceBounds(bool value) { - forceBounds = value; - } - bool NativeSolverEnvironment::isSymmetricUpdatesSet() const { return symmetricUpdates; } diff --git a/src/storm/environment/solver/NativeSolverEnvironment.h b/src/storm/environment/solver/NativeSolverEnvironment.h index b3c9ce457..d0b0e8b9b 100644 --- a/src/storm/environment/solver/NativeSolverEnvironment.h +++ b/src/storm/environment/solver/NativeSolverEnvironment.h @@ -27,8 +27,6 @@ namespace storm { void setPowerMethodMultiplicationStyle(storm::solver::MultiplicationStyle value); storm::RationalNumber const& getSorOmega() const; void setSorOmega(storm::RationalNumber const& value); - bool isForceBoundsSet() const; - void setForceBounds(bool value); bool isSymmetricUpdatesSet() const; void setSymmetricUpdates(bool value); @@ -40,7 +38,6 @@ namespace storm { bool considerRelativeTerminationCriterion; storm::solver::MultiplicationStyle powerMethodMultiplicationStyle; storm::RationalNumber sorOmega; - bool forceBounds; bool symmetricUpdates; }; } diff --git a/src/storm/settings/modules/MinMaxEquationSolverSettings.cpp b/src/storm/settings/modules/MinMaxEquationSolverSettings.cpp index 82c2ba59c..186f0caf9 100644 --- a/src/storm/settings/modules/MinMaxEquationSolverSettings.cpp +++ b/src/storm/settings/modules/MinMaxEquationSolverSettings.cpp @@ -21,7 +21,6 @@ namespace storm { const std::string MinMaxEquationSolverSettings::markovAutomatonBoundedReachabilityMethodOptionName = "mamethod"; const std::string MinMaxEquationSolverSettings::valueIterationMultiplicationStyleOptionName = "vimult"; const std::string MinMaxEquationSolverSettings::intervalIterationSymmetricUpdatesOptionName = "symmetricupdates"; - const std::string MinMaxEquationSolverSettings::forceBoundsOptionName = "forcebounds"; MinMaxEquationSolverSettings::MinMaxEquationSolverSettings() : ModuleSettings(moduleName) { std::vector minMaxSolvingTechniques = {"vi", "value-iteration", "pi", "policy-iteration", "lp", "linear-programming", "rs", "ratsearch", "ii", "interval-iteration", "svi", "sound-value-iteration", "topological"}; @@ -47,8 +46,6 @@ namespace storm { this->addOption(storm::settings::OptionBuilder(moduleName, intervalIterationSymmetricUpdatesOptionName, false, "If set, interval iteration performs an update on both, lower and upper bound in each iteration").build()); - this->addOption(storm::settings::OptionBuilder(moduleName, forceBoundsOptionName, false, "If set, minmax solver always require that a priori bounds for the solution are computed.").build()); - } storm::solver::MinMaxMethod MinMaxEquationSolverSettings::getMinMaxEquationSolvingMethod() const { @@ -136,9 +133,6 @@ namespace storm { return this->getOption(intervalIterationSymmetricUpdatesOptionName).getHasOptionBeenSet(); } - bool MinMaxEquationSolverSettings::isForceBoundsSet() const { - return this->getOption(forceBoundsOptionName).getHasOptionBeenSet(); - } } } } diff --git a/src/storm/settings/modules/MinMaxEquationSolverSettings.h b/src/storm/settings/modules/MinMaxEquationSolverSettings.h index f64988b6a..43d3d1b00 100644 --- a/src/storm/settings/modules/MinMaxEquationSolverSettings.h +++ b/src/storm/settings/modules/MinMaxEquationSolverSettings.h @@ -112,11 +112,6 @@ namespace storm { */ bool isForceIntervalIterationSymmetricUpdatesSet() const; - /*! - * Retrieves whether the force bounds option has been set. - */ - bool isForceBoundsSet() const; - // The name of the module. static const std::string moduleName; diff --git a/src/storm/settings/modules/NativeEquationSolverSettings.cpp b/src/storm/settings/modules/NativeEquationSolverSettings.cpp index a73d64bc2..3f0282f0a 100644 --- a/src/storm/settings/modules/NativeEquationSolverSettings.cpp +++ b/src/storm/settings/modules/NativeEquationSolverSettings.cpp @@ -23,8 +23,7 @@ namespace storm { const std::string NativeEquationSolverSettings::precisionOptionName = "precision"; const std::string NativeEquationSolverSettings::absoluteOptionName = "absolute"; const std::string NativeEquationSolverSettings::powerMethodMultiplicationStyleOptionName = "powmult"; - const std::string NativeEquationSolverSettings::forceBoundsOptionName = "forcebounds"; - const std::string NativeEquationSolverSettings::powerMethodSymmetricUpdatesOptionName = "symmetricupdates"; + const std::string NativeEquationSolverSettings::intervalIterationSymmetricUpdatesOptionName = "symmetricupdates"; NativeEquationSolverSettings::NativeEquationSolverSettings() : ModuleSettings(moduleName) { std::vector methods = { "jacobi", "gaussseidel", "sor", "walkerchae", "power", "sound-value-iteration", "svi", "interval-iteration", "ii", "ratsearch" }; @@ -42,9 +41,7 @@ namespace storm { this->addOption(storm::settings::OptionBuilder(moduleName, powerMethodMultiplicationStyleOptionName, false, "Sets which method multiplication style to prefer for the power method.") .addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of a multiplication style.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(multiplicationStyles)).setDefaultValueString("gaussseidel").build()).build()); - this->addOption(storm::settings::OptionBuilder(moduleName, forceBoundsOptionName, false, "If set, the equation solver always require that a priori bounds for the solution are computed.").build()); - - this->addOption(storm::settings::OptionBuilder(moduleName, powerMethodSymmetricUpdatesOptionName, false, "If set, interval iteration performs an update on both, lower and upper bound in each iteration").build()); + this->addOption(storm::settings::OptionBuilder(moduleName, intervalIterationSymmetricUpdatesOptionName, false, "If set, interval iteration performs an update on both, lower and upper bound in each iteration").build()); } bool NativeEquationSolverSettings::isLinearEquationSystemTechniqueSet() const { @@ -115,12 +112,8 @@ namespace storm { STORM_LOG_THROW(false, storm::exceptions::IllegalArgumentValueException, "Unknown multiplication style '" << multiplicationStyleString << "'."); } - bool NativeEquationSolverSettings::isForcePowerMethodSymmetricUpdatesSet() const { - return this->getOption(powerMethodSymmetricUpdatesOptionName).getHasOptionBeenSet(); - } - - bool NativeEquationSolverSettings::isForceBoundsSet() const { - return this->getOption(forceBoundsOptionName).getHasOptionBeenSet(); + bool NativeEquationSolverSettings::isForceIntervalIterationSymmetricUpdatesSet() const { + return this->getOption(intervalIterationSymmetricUpdatesOptionName).getHasOptionBeenSet(); } bool NativeEquationSolverSettings::check() const { diff --git a/src/storm/settings/modules/NativeEquationSolverSettings.h b/src/storm/settings/modules/NativeEquationSolverSettings.h index 1562a89c2..306e9750e 100644 --- a/src/storm/settings/modules/NativeEquationSolverSettings.h +++ b/src/storm/settings/modules/NativeEquationSolverSettings.h @@ -94,9 +94,9 @@ namespace storm { ConvergenceCriterion getConvergenceCriterion() const; /*! - * Retrievew whether updates in power method have to be made symmetrically + * Retrievew whether updates in interval iteration have to be made symmetrically */ - bool isForcePowerMethodSymmetricUpdatesSet() const; + bool isForceIntervalIterationSymmetricUpdatesSet() const; /*! * Retrieves the multiplication style to use in the power method. @@ -123,7 +123,7 @@ namespace storm { static const std::string maximalIterationsOptionShortName; static const std::string precisionOptionName; static const std::string absoluteOptionName; - static const std::string powerMethodSymmetricUpdatesOptionName; + static const std::string intervalIterationSymmetricUpdatesOptionName; static const std::string powerMethodMultiplicationStyleOptionName; static const std::string forceBoundsOptionName;