You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
2.7 KiB
42 lines
2.7 KiB
#include "storm/settings/modules/OviSolverSettings.h"
|
|
|
|
#include "storm/settings/Option.h"
|
|
#include "storm/settings/ArgumentBuilder.h"
|
|
#include "storm/settings/OptionBuilder.h"
|
|
|
|
#include "storm/utility/macros.h"
|
|
#include "storm/exceptions/IllegalArgumentValueException.h"
|
|
|
|
namespace storm {
|
|
namespace settings {
|
|
namespace modules {
|
|
|
|
const std::string OviSolverSettings::moduleName = "ovi";
|
|
const std::string OviSolverSettings::precisionUpdateFactorOptionName = "precision-update-factor";
|
|
const std::string OviSolverSettings::maxVerificationIterationFactorOptionName = "max-verification-iter-factor";
|
|
const std::string OviSolverSettings::useRelevantValuesForPrecisionUpdateOptionName = "use-relevant-values";
|
|
|
|
OviSolverSettings::OviSolverSettings() : ModuleSettings(moduleName) {
|
|
|
|
this->addOption(storm::settings::OptionBuilder(moduleName, precisionUpdateFactorOptionName, false, "Sets with which factor the precision of the inner value iteration is updated.").setIsAdvanced().addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("factor", "The factor.").setDefaultValueDouble(0.5).addValidatorDouble(ArgumentValidatorFactory::createDoubleRangeValidatorExcluding(0.0, 1.0)).build()).build());
|
|
|
|
this->addOption(storm::settings::OptionBuilder(moduleName, useRelevantValuesForPrecisionUpdateOptionName, false, "Sets whether the precision of the inner value iteration is only based on the relevant values (i.e. initial states).").setIsAdvanced().build());
|
|
|
|
this->addOption(storm::settings::OptionBuilder(moduleName, maxVerificationIterationFactorOptionName, false, "Controls how many verification iterations are performed before guessing a new upper bound.").setIsAdvanced().addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("factor", "The factor.").setDefaultValueDouble(0.1).addValidatorDouble(ArgumentValidatorFactory::createDoubleGreaterValidator(0.0)).build()).build());
|
|
}
|
|
|
|
double OviSolverSettings::getPrecisionUpdateFactor() const {
|
|
return this->getOption(precisionUpdateFactorOptionName).getArgumentByName("factor").getValueAsDouble();
|
|
}
|
|
|
|
double OviSolverSettings::getMaxVerificationIterationFactor() const {
|
|
return this->getOption(maxVerificationIterationFactorOptionName).getArgumentByName("factor").getValueAsDouble();
|
|
}
|
|
|
|
bool OviSolverSettings::useRelevantValuesForPrecisionUpdate() const {
|
|
return this->getOption(useRelevantValuesForPrecisionUpdateOptionName).getHasOptionBeenSet();
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|