19template<
typename ValueType>
24template<
typename ValueType>
29template<
typename ValueType>
31 return std::make_unique<GlpkLpSolverFactory<ValueType>>(*this);
34template<
typename ValueType>
39template<
typename ValueType>
44template<
typename ValueType>
46 return std::make_unique<SoplexLpSolverFactory<ValueType>>(*this);
49template<
typename ValueType>
51 environment = std::make_shared<storm::solver::GurobiEnvironment>();
52 environment->initialize();
55template<
typename ValueType>
60template<
typename ValueType>
65template<
typename ValueType>
67 return std::make_unique<GurobiLpSolverFactory<ValueType>>(*this);
70template<
typename ValueType>
75template<
typename ValueType>
80template<
typename ValueType>
82 return std::make_unique<Z3LpSolverFactory<ValueType>>(*this);
85template<
typename ValueType>
86std::unique_ptr<LpSolverFactory<ValueType>>
getLpSolverFactory(storm::solver::LpSolverTypeSelection solvType) {
87 storm::solver::LpSolverType t;
88 if (solvType == storm::solver::LpSolverTypeSelection::FROMSETTINGS) {
92 if (useExact && t != storm::solver::LpSolverType::Z3 &&
94 t = storm::solver::LpSolverType::Z3;
97 t = convert(solvType);
100 case storm::solver::LpSolverType::Gurobi:
102 case storm::solver::LpSolverType::Glpk:
104 case storm::solver::LpSolverType::Z3:
106 case storm::solver::LpSolverType::Soplex:
112template<
typename ValueType>
113std::unique_ptr<storm::solver::LpSolver<ValueType>>
getLpSolver(std::string
const& name, storm::solver::LpSolverTypeSelection solvType) {
114 std::unique_ptr<storm::utility::solver::LpSolverFactory<ValueType>> factory = getLpSolverFactory<ValueType>(solvType);
115 return factory->create(name);
118template<
typename ValueType>
119std::unique_ptr<storm::solver::LpSolver<ValueType, true>>
getRawLpSolver(std::string
const& name, storm::solver::LpSolverTypeSelection solvType) {
120 std::unique_ptr<storm::utility::solver::LpSolverFactory<ValueType>> factory = getLpSolverFactory<ValueType>(solvType);
121 return factory->createRaw(name);
125 storm::solver::SmtSolverType smtSolverType;
130 smtSolverType = storm::solver::SmtSolverType::Z3;
132 smtSolverType = storm::solver::SmtSolverType::Mathsat;
134 STORM_LOG_THROW(
false, storm::exceptions::InvalidOperationException,
"Requested an SMT solver but none was installed.");
137 switch (smtSolverType) {
138 case storm::solver::SmtSolverType::Z3:
140 case storm::solver::SmtSolverType::Mathsat:
155 std::unique_ptr<storm::utility::solver::SmtSolverFactory> factory(
new SmtSolverFactory());
156 return factory->create(manager);
159template class LpSolverFactory<double>;
160template class LpSolverFactory<storm::RationalNumber>;
161template class GlpkLpSolverFactory<double>;
162template class GlpkLpSolverFactory<storm::RationalNumber>;
163template class GurobiLpSolverFactory<double>;
164template class GurobiLpSolverFactory<storm::RationalNumber>;
165template class Z3LpSolverFactory<double>;
166template class Z3LpSolverFactory<storm::RationalNumber>;
167template class SoplexLpSolverFactory<double>;
168template class SoplexLpSolverFactory<storm::RationalNumber>;
170template std::unique_ptr<LpSolverFactory<double>>
getLpSolverFactory(storm::solver::LpSolverTypeSelection solvType);
171template std::unique_ptr<LpSolverFactory<storm::RationalNumber>>
getLpSolverFactory(storm::solver::LpSolverTypeSelection solvType);
172template std::unique_ptr<storm::solver::LpSolver<double>>
getLpSolver(std::string
const& name, storm::solver::LpSolverTypeSelection solvType);
173template std::unique_ptr<storm::solver::LpSolver<storm::RationalNumber>>
getLpSolver(std::string
const& name, storm::solver::LpSolverTypeSelection solvType);
174template std::unique_ptr<storm::solver::LpSolver<double, true>>
getRawLpSolver(std::string
const& name, storm::solver::LpSolverTypeSelection solvType);
175template std::unique_ptr<storm::solver::LpSolver<storm::RationalNumber, true>>
getRawLpSolver(std::string
const& name,
176 storm::solver::LpSolverTypeSelection solvType);
This class is responsible for managing a set of typed variables and all expressions using these varia...
A class that implements the LpSolver interface using Gurobi.
A class that implements the LpSolver interface using Z3.
virtual std::unique_ptr< LpSolverFactory< ValueType > > clone() const override
virtual std::unique_ptr< storm::solver::LpSolver< ValueType, true > > createRaw(std::string const &name) const override
virtual std::unique_ptr< storm::solver::LpSolver< ValueType, false > > create(std::string const &name) const override
Creates a new linear equation solver instance with the given name.
virtual std::unique_ptr< storm::solver::LpSolver< ValueType, false > > create(std::string const &name) const override
Creates a new linear equation solver instance with the given name.
virtual std::unique_ptr< storm::solver::LpSolver< ValueType, true > > createRaw(std::string const &name) const override
virtual std::unique_ptr< LpSolverFactory< ValueType > > clone() const override
virtual std::unique_ptr< storm::solver::SmtSolver > create(storm::expressions::ExpressionManager &manager) const
Creates a new SMT solver instance.
virtual std::unique_ptr< storm::solver::SmtSolver > create(storm::expressions::ExpressionManager &manager) const
Creates a new SMT solver instance.
virtual std::unique_ptr< LpSolverFactory< ValueType > > clone() const override
virtual std::unique_ptr< storm::solver::LpSolver< ValueType, true > > createRaw(std::string const &name) const override
virtual std::unique_ptr< storm::solver::LpSolver< ValueType, false > > create(std::string const &name) const override
Creates a new linear equation solver instance with the given name.
virtual std::unique_ptr< LpSolverFactory< ValueType > > clone() const override
virtual std::unique_ptr< storm::solver::LpSolver< ValueType, true > > createRaw(std::string const &name) const override
virtual std::unique_ptr< storm::solver::LpSolver< ValueType, false > > create(std::string const &name) const override
Creates a new linear equation solver instance with the given name.
virtual std::unique_ptr< storm::solver::SmtSolver > create(storm::expressions::ExpressionManager &manager) const
Creates a new SMT solver instance.
#define STORM_LOG_THROW(cond, exception, message)
SettingsType const & getModule()
Get module.
std::unique_ptr< storm::solver::LpSolver< ValueType > > getLpSolver(std::string const &name, storm::solver::LpSolverTypeSelection solvType)
std::unique_ptr< storm::solver::SmtSolver > getSmtSolver(storm::expressions::ExpressionManager &manager)
std::unique_ptr< LpSolverFactory< ValueType > > getLpSolverFactory(storm::solver::LpSolverTypeSelection solvType)
std::unique_ptr< storm::solver::LpSolver< ValueType, true > > getRawLpSolver(std::string const &name, storm::solver::LpSolverTypeSelection solvType)