Sebastian Junges
5 years ago
4 changed files with 124 additions and 4 deletions
-
47src/storm-pomdp-cli/settings/modules/QualitativePOMDPAnalysisSettings.cpp
-
43src/storm-pomdp-cli/settings/modules/QualitativePOMDPAnalysisSettings.h
-
19src/storm-pomdp-cli/storm-pomdp.cpp
-
19src/storm-pomdp/analysis/MemlessStrategySearchQualitative.h
@ -0,0 +1,47 @@ |
|||||
|
#include "storm-pomdp-cli/settings/modules/QualitativePOMDPAnalysisSettings.h"
|
||||
|
|
||||
|
#include "storm/settings/SettingsManager.h"
|
||||
|
#include "storm/settings/SettingMemento.h"
|
||||
|
#include "storm/settings/Option.h"
|
||||
|
#include "storm/settings/OptionBuilder.h"
|
||||
|
#include "storm/settings/ArgumentBuilder.h"
|
||||
|
|
||||
|
#include "storm/exceptions/InvalidArgumentException.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace settings { |
||||
|
namespace modules { |
||||
|
|
||||
|
const std::string QualitativePOMDPAnalysisSettings::moduleName = "pomdpQualitative"; |
||||
|
const std::string exportSATCallsOption = "exportSATCallsPath"; |
||||
|
const std::string lookaheadHorizonOption = "lookaheadHorizon"; |
||||
|
|
||||
|
|
||||
|
QualitativePOMDPAnalysisSettings::QualitativePOMDPAnalysisSettings() : ModuleSettings(moduleName) { |
||||
|
this->addOption(storm::settings::OptionBuilder(moduleName, exportSATCallsOption, false, "Export the SAT calls?.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("path", "The name of the file to which to write the model.").build()).build()); |
||||
|
this->addOption(storm::settings::OptionBuilder(moduleName, lookaheadHorizonOption, false, "In reachability in combination with a discrete ranking function, a lookahead is necessary.").addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("bound", "The lookahead. Use 0 for the number of states.").setDefaultValueUnsignedInteger(0).build()).build()); |
||||
|
} |
||||
|
|
||||
|
uint64_t QualitativePOMDPAnalysisSettings::getLookahead() const { |
||||
|
return this->getOption(lookaheadHorizonOption).getArgumentByName("bound").getValueAsUnsignedInteger(); |
||||
|
} |
||||
|
bool QualitativePOMDPAnalysisSettings::isExportSATCallsSet() const { |
||||
|
return this->getOption(exportSATCallsOption).getHasOptionBeenSet(); |
||||
|
} |
||||
|
|
||||
|
std::string QualitativePOMDPAnalysisSettings::getExportSATCallsPath() const { |
||||
|
return this->getOption(exportSATCallsOption).getArgumentByName("path").getValueAsString(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
void QualitativePOMDPAnalysisSettings::finalize() { |
||||
|
} |
||||
|
|
||||
|
bool QualitativePOMDPAnalysisSettings::check() const { |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
} // namespace modules
|
||||
|
} // namespace settings
|
||||
|
} // namespace storm
|
@ -0,0 +1,43 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
|
||||
|
#include "storm-config.h" |
||||
|
#include "storm/settings/modules/ModuleSettings.h" |
||||
|
#include "storm-pomdp/storage/PomdpMemory.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace settings { |
||||
|
namespace modules { |
||||
|
|
||||
|
/*! |
||||
|
* This class represents the settings for POMDP model checking. |
||||
|
*/ |
||||
|
class QualitativePOMDPAnalysisSettings : public ModuleSettings { |
||||
|
public: |
||||
|
|
||||
|
/*! |
||||
|
* Creates a new set of POMDP settings. |
||||
|
*/ |
||||
|
QualitativePOMDPAnalysisSettings(); |
||||
|
|
||||
|
uint64_t getLookahead() const; |
||||
|
bool isExportSATCallsSet() const; |
||||
|
std::string getExportSATCallsPath() const; |
||||
|
|
||||
|
|
||||
|
virtual ~QualitativePOMDPAnalysisSettings() = default; |
||||
|
|
||||
|
bool check() const override; |
||||
|
void finalize() override; |
||||
|
|
||||
|
// The name of the module. |
||||
|
static const std::string moduleName; |
||||
|
|
||||
|
private: |
||||
|
|
||||
|
|
||||
|
}; |
||||
|
|
||||
|
} // namespace modules |
||||
|
} // namespace settings |
||||
|
} // namespace storm |
Write
Preview
Loading…
Cancel
Save
Reference in new issue