21const std::string CoreSettings::eqSolverOptionName =
"eqsolver";
22const std::string CoreSettings::lpSolverOptionName =
"lpsolver";
23const std::string CoreSettings::smtSolverOptionName =
"smtsolver";
24const std::string CoreSettings::statisticsOptionName =
"statistics";
25const std::string CoreSettings::statisticsOptionShortName =
"stats";
26const std::string CoreSettings::engineOptionName =
"engine";
27const std::string CoreSettings::engineOptionShortName =
"e";
28const std::string CoreSettings::ddLibraryOptionName =
"ddlib";
34#if defined STORM_HAVE_GLPK
36#elif defined STORM_HAVE_SOPLEX
44#if defined STORM_DEFAULT_SMT_SOLVER_Z3
46#elif defined STORM_DEFAULT_SMT_SOLVER_MATHSAT
48#elif defined STORM_DEFAULT_SMT_SOLVER_CVC5
56 std::vector<std::string> engines;
60 engines.push_back(
"portfolio");
63 .setShortName(engineOptionShortName)
66 .setDefaultValueString(
"sparse")
70 std::vector<std::string> linearEquationSolver = {
"gmm++",
"native",
"eigen",
"elimination",
"topological",
"acyclic"};
75 .setDefaultValueString(
"topological")
80 std::vector<std::string> ddLibraries;
81 std::string ddDefault =
"";
83 ddLibraries.push_back(
"cudd");
86#ifdef STORM_HAVE_SYLVAN
87 ddLibraries.push_back(
"sylvan");
90 if (!ddLibraries.empty()) {
95 .setDefaultValueString(ddDefault)
100 std::vector<std::string> lpSolvers = {
"glpk",
"gurobi",
"highs",
"soplex",
"z3"};
108 std::vector<std::string> smtSolvers;
109#if defined STORM_HAVE_Z3
110 smtSolvers.push_back(
"z3");
112#if defined STORM_HAVE_MATHSAT
113 smtSolvers.push_back(
"mathsat");
115#if defined STORM_HAVE_CVC5
116 smtSolvers.push_back(
"cvc5");
123 if (smtSolvers.empty()) {
133 .setShortName(statisticsOptionShortName)
139 if (equationSolverName ==
"gmm++") {
140 return storm::solver::EquationSolverType::Gmmxx;
141 }
else if (equationSolverName ==
"native") {
142 return storm::solver::EquationSolverType::Native;
143 }
else if (equationSolverName ==
"eigen") {
144 return storm::solver::EquationSolverType::Eigen;
145 }
else if (equationSolverName ==
"elimination") {
146 return storm::solver::EquationSolverType::Elimination;
147 }
else if (equationSolverName ==
"topological") {
148 return storm::solver::EquationSolverType::Topological;
149 }
else if (equationSolverName ==
"acyclic") {
150 return storm::solver::EquationSolverType::Acyclic;
165 if (lpSolverName ==
"glpk") {
166 return storm::solver::LpSolverType::Glpk;
167 }
else if (lpSolverName ==
"gurobi") {
168 return storm::solver::LpSolverType::Gurobi;
169 }
else if (lpSolverName ==
"highs") {
170 return storm::solver::LpSolverType::Highs;
171 }
else if (lpSolverName ==
"soplex") {
172 return storm::solver::LpSolverType::Soplex;
173 }
else if (lpSolverName ==
"z3") {
174 return storm::solver::LpSolverType::Z3;
185 if (smtSolverName ==
"z3") {
186 return storm::solver::SmtSolverType::Z3;
187 }
else if (smtSolverName ==
"mathsat") {
188 return storm::solver::SmtSolverType::Mathsat;
189 }
else if (smtSolverName ==
"cvc5") {
190 return storm::solver::SmtSolverType::Cvc5;
202 if (ddLibraryAsString ==
"sylvan") {
223 this->engine = newEngine;
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 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.
bool isSmtSolverSetFromDefaultValue() const
Retrieves whether the smt solver has been set from its default value.
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.
ModuleSettings(std::string const &moduleName)
Constructs a new settings object.
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_THROW_UNCONDITIONALLY(exception, message)
#define STORM_LOG_THROW(cond, exception, message)
std::string getDefaultSmtSolverAsString()
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.