5 changed files with 144 additions and 19 deletions
-
43src/modelchecker/multiobjective/helper/SparseMultiObjectiveModelCheckerHelper.cpp
-
2src/modelchecker/multiobjective/helper/SparseMultiObjectiveModelCheckerHelper.h
-
2src/settings/SettingsManager.cpp
-
49src/settings/modules/MultiObjectiveSettings.cpp
-
67src/settings/modules/MultiObjectiveSettings.h
@ -0,0 +1,49 @@ |
|||||
|
#include "src/settings/modules/MultiObjectiveSettings.h"
|
||||
|
|
||||
|
#include "src/settings/Option.h"
|
||||
|
#include "src/settings/OptionBuilder.h"
|
||||
|
#include "src/settings/ArgumentBuilder.h"
|
||||
|
#include "src/settings/Argument.h"
|
||||
|
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace settings { |
||||
|
namespace modules { |
||||
|
|
||||
|
const std::string MultiObjectiveSettings::moduleName = "multiobjective"; |
||||
|
const std::string MultiObjectiveSettings::exportResultFileOptionName = "resultfile"; |
||||
|
const std::string MultiObjectiveSettings::precisionOptionName = "precision"; |
||||
|
const std::string MultiObjectiveSettings::maxIterationsOptionName = "maxiterations"; |
||||
|
|
||||
|
MultiObjectiveSettings::MultiObjectiveSettings() : ModuleSettings(moduleName) { |
||||
|
this->addOption(storm::settings::OptionBuilder(moduleName, exportResultFileOptionName, true, "Saves the result as LaTeX document.") |
||||
|
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "A path to a file where the result should be saved.").build()).build()); |
||||
|
this->addOption(storm::settings::OptionBuilder(moduleName, precisionOptionName, true, "The precision used for the approximation of numerical- and pareto queries.") |
||||
|
.addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("value", "The precision. Default is 1e-04.").setDefaultValueDouble(1e-04).addValidationFunctionDouble(storm::settings::ArgumentValidators::doubleRangeValidatorExcluding(0.0, 1.0)).build()).build()); |
||||
|
this->addOption(storm::settings::OptionBuilder(moduleName, maxIterationsOptionName, true, "Aborts the computation after the given number of iterations (= computed pareto optimal points).") |
||||
|
.addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("value", "the threshold for the number of iterations to be performed.").build()).build()); |
||||
|
} |
||||
|
|
||||
|
bool MultiObjectiveSettings::exportResultToFile() const { |
||||
|
return this->getOption(exportResultFileOptionName).getHasOptionBeenSet(); |
||||
|
} |
||||
|
|
||||
|
std::string MultiObjectiveSettings::exportResultPath() const { |
||||
|
return this->getOption(exportResultFileOptionName).getArgumentByName("filename").getValueAsString(); |
||||
|
} |
||||
|
|
||||
|
double MultiObjectiveSettings::getPrecision() const { |
||||
|
return this->getOption(precisionOptionName).getArgumentByName("value").getValueAsDouble(); |
||||
|
} |
||||
|
|
||||
|
bool MultiObjectiveSettings::isMaxIterationsSet() const { |
||||
|
return this->getOption(maxIterationsOptionName).getHasOptionBeenSet(); |
||||
|
} |
||||
|
|
||||
|
uint_fast64_t MultiObjectiveSettings::getMaxIterations() const { |
||||
|
return this->getOption(precisionOptionName).getArgumentByName("value").getValueAsUnsignedInteger(); |
||||
|
} |
||||
|
|
||||
|
} // namespace modules
|
||||
|
} // namespace settings
|
||||
|
} // namespace storm
|
@ -0,0 +1,67 @@ |
|||||
|
#ifndef STORM_SETTINGS_MODULES_MULTIOBJECTIVESETTINGS_H_ |
||||
|
#define STORM_SETTINGS_MODULES_MULTIOBJECTIVESETTINGS_H_ |
||||
|
|
||||
|
#include "src/settings/modules/ModuleSettings.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace settings { |
||||
|
namespace modules { |
||||
|
|
||||
|
/*! |
||||
|
* This class represents the settings for multi-objective model checking. |
||||
|
*/ |
||||
|
class MultiObjectiveSettings : public ModuleSettings { |
||||
|
public: |
||||
|
|
||||
|
/*! |
||||
|
* Creates a new set of multi-objective model checking settings. |
||||
|
*/ |
||||
|
MultiObjectiveSettings(); |
||||
|
|
||||
|
/** |
||||
|
* Retrieves whether the model checking result should be exported to a file. |
||||
|
* @return True iff the result should be exported to a file. |
||||
|
*/ |
||||
|
bool exportResultToFile() const; |
||||
|
|
||||
|
/** |
||||
|
* The path to a file location which should contain the model checking result. |
||||
|
* @return A path to a file location. |
||||
|
*/ |
||||
|
std::string exportResultPath() const; |
||||
|
|
||||
|
/** |
||||
|
* Retrieves the desired precision for numerical- and pareto queries. |
||||
|
* @return the desired precision for numerical- and pareto queries. |
||||
|
*/ |
||||
|
double getPrecision() const; |
||||
|
|
||||
|
/*! |
||||
|
* Retrieves whether or not a threshold for the number of performed iterations is given. |
||||
|
* |
||||
|
* @return True if a threshold for the number of performed iterations is given. |
||||
|
*/ |
||||
|
bool isMaxIterationsSet() const; |
||||
|
|
||||
|
|
||||
|
/*! |
||||
|
* Retrieves The maximum number of iterations that should be performed (if given). |
||||
|
* |
||||
|
* @return the maximum number of iterations that should be performed (if given). |
||||
|
*/ |
||||
|
uint_fast64_t getMaxIterations() const; |
||||
|
|
||||
|
|
||||
|
const static std::string moduleName; |
||||
|
|
||||
|
private: |
||||
|
const static std::string exportResultFileOptionName; |
||||
|
const static std::string precisionOptionName; |
||||
|
const static std::string maxIterationsOptionName; |
||||
|
}; |
||||
|
|
||||
|
} // namespace modules |
||||
|
} // namespace settings |
||||
|
} // namespace storm |
||||
|
|
||||
|
#endif /* STORM_SETTINGS_MODULES_MULTIOBJECTIVESETTINGS_H_ */ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue