Browse Source

removed the --forcebounds setting

tempestpy_adaptions
TimQu 7 years ago
parent
commit
efcb718851
  1. 9
      src/storm/environment/solver/MinMaxSolverEnvironment.cpp
  2. 11
      src/storm/environment/solver/NativeSolverEnvironment.cpp
  3. 3
      src/storm/environment/solver/NativeSolverEnvironment.h
  4. 6
      src/storm/settings/modules/MinMaxEquationSolverSettings.cpp
  5. 5
      src/storm/settings/modules/MinMaxEquationSolverSettings.h
  6. 15
      src/storm/settings/modules/NativeEquationSolverSettings.cpp
  7. 6
      src/storm/settings/modules/NativeEquationSolverSettings.h

9
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;
}

11
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<storm::RationalNumber>(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;
}

3
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;
};
}

6
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<std::string> 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();
}
}
}
}

5
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;

15
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<std::string> 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 {

6
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;

Loading…
Cancel
Save