23const std::string CoreSettings::eqSolverOptionName =
"eqsolver";
24const std::string CoreSettings::lpSolverOptionName =
"lpsolver";
25const std::string CoreSettings::smtSolverOptionName =
"smtsolver";
26const std::string CoreSettings::statisticsOptionName =
"statistics";
27const std::string CoreSettings::statisticsOptionShortName =
"stats";
28const std::string CoreSettings::engineOptionName =
"engine";
29const std::string CoreSettings::engineOptionShortName =
"e";
30const std::string CoreSettings::ddLibraryOptionName =
"ddlib";
31const std::string CoreSettings::intelTbbOptionName =
"enable-tbb";
32const std::string CoreSettings::intelTbbOptionShortName =
"tbb";
38#if defined STORM_HAVE_GLPK
40#elif defined STORM_HAVE_SOPLEX
48 std::vector<std::string> engines;
52 engines.push_back(
"portfolio");
55 .setShortName(engineOptionShortName)
58 .setDefaultValueString(
"sparse")
62 std::vector<std::string> linearEquationSolver = {
"gmm++",
"native",
"eigen",
"elimination",
"topological",
"acyclic"};
67 .setDefaultValueString(
"topological")
71 std::vector<std::string> ddLibraries = {
"cudd",
"sylvan"};
75 .setDefaultValueString(
"sylvan")
79 std::vector<std::string> lpSolvers = {
"gurobi",
"glpk",
"z3",
"soplex"};
87 std::vector<std::string> smtSolvers = {
"z3",
"mathsat"};
91 .setDefaultValueString(
"z3")
95 .setShortName(statisticsOptionShortName)
100 .setShortName(intelTbbOptionShortName)
106 if (equationSolverName ==
"gmm++") {
107 return storm::solver::EquationSolverType::Gmmxx;
108 }
else if (equationSolverName ==
"native") {
109 return storm::solver::EquationSolverType::Native;
110 }
else if (equationSolverName ==
"eigen") {
111 return storm::solver::EquationSolverType::Eigen;
112 }
else if (equationSolverName ==
"elimination") {
113 return storm::solver::EquationSolverType::Elimination;
114 }
else if (equationSolverName ==
"topological") {
115 return storm::solver::EquationSolverType::Topological;
116 }
else if (equationSolverName ==
"acyclic") {
117 return storm::solver::EquationSolverType::Acyclic;
119 STORM_LOG_THROW(
false, storm::exceptions::IllegalArgumentValueException,
"Unknown equation solver '" << equationSolverName <<
"'.");
132 if (lpSolverName ==
"gurobi") {
133 return storm::solver::LpSolverType::Gurobi;
134 }
else if (lpSolverName ==
"glpk") {
135 return storm::solver::LpSolverType::Glpk;
136 }
else if (lpSolverName ==
"z3") {
137 return storm::solver::LpSolverType::Z3;
138 }
else if (lpSolverName ==
"soplex") {
139 return storm::solver::LpSolverType::Soplex;
141 STORM_LOG_THROW(
false, storm::exceptions::IllegalArgumentValueException,
"Unknown LP solver '" << lpSolverName <<
"'.");
150 if (smtSolverName ==
"z3") {
151 return storm::solver::SmtSolverType::Z3;
152 }
else if (smtSolverName ==
"mathsat") {
153 return storm::solver::SmtSolverType::Mathsat;
155 STORM_LOG_THROW(
false, storm::exceptions::IllegalArgumentValueException,
"Unknown SMT solver '" << smtSolverName <<
"'.");
160 if (ddLibraryAsString ==
"sylvan") {
185 this->engine = newEngine;
196#ifdef STORM_HAVE_INTELTBB
virtual std::string getValueAsString() const =0
Retrieves the value of this argument as a string.
virtual bool getHasBeenSet() const
Retrieves whether the argument has been set.
virtual bool wasSetFromDefaultValue() const =0
static ArgumentBuilder createStringArgument(std::string const &name, std::string const &description)
Creates a string argument with the given parameters.
static std::shared_ptr< ArgumentValidator< std::string > > createMultipleChoiceValidator(std::vector< std::string > const &choices)
This class provides the interface to create an option...
ArgumentBase const & getArgumentByName(std::string const &argumentName) const
Returns a reference to the argument with the specified long name.
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
storm::solver::LpSolverType getLpSolver() const
Retrieves the selected LP solver.
storm::dd::DdType getDdLibraryType() const
Retrieves the selected library for DD-related operations.
bool isShowStatisticsSet() const
Retrieves whether statistics are to be shown.
storm::solver::EquationSolverType getEquationSolver() const
Retrieves the selected equation solver.
bool isUseIntelTbbSet() const
Retrieves whether the option to use Intel TBB is set.
bool isEquationSolverSetFromDefaultValue() const
Retrieves whether the equation solver has been set from its default value.
bool isEquationSolverSet() const
Retrieves whether a equation solver has been set.
CoreSettings()
Creates a new set of core settings.
bool isLpSolverSetFromDefaultValue() const
Retrieves whether the lp solver has been set from its default value.
void finalize() override
Prepares the modules for further usage, should be called at the end of the initialization,...
void setEngine(storm::utility::Engine const &engine)
Sets the engine for further usage.
bool check() const override
Checks whether the settings are consistent.
storm::solver::SmtSolverType getSmtSolver() const
Retrieves the selected SMT solver.
bool isDdLibraryTypeSetFromDefaultValue() const
Retrieves whether the selected DD library is set from its default value.
static const std::string moduleName
storm::utility::Engine getEngine() const
Retrieves the selected engine.
This is the base class of the settings for a particular module.
void addOption(std::shared_ptr< Option > const &option)
Adds and registers the given option.
Option & getOption(std::string const &longName)
Retrieves the option with the given long name.
#define STORM_LOG_WARN_COND(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
std::string getDefaultLpSolverAsString()
Engine
An enumeration of all engines.
std::string toString(Engine const &engine)
Returns a string representation of the given engine.
std::vector< Engine > getEngines()
Returns a list of all available engines (excluding Unknown)
Engine engineFromString(std::string const &engineStr)
Parses the string representation of an engine and returns the corresponding engine.