Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm_gtest.cpp
Go to the documentation of this file.
1
#include "
test/storm_gtest.h
"
2
3
#include "
storm/exceptions/GurobiLicenseException.h
"
4
#include "
storm/settings/SettingsManager.h
"
5
#include "
storm/settings/modules/GurobiSettings.h
"
6
#include "
storm/solver/GurobiLpSolver.h
"
7
#include "
storm/utility/solver.h
"
8
9
namespace
storm::test
{
10
bool
noGurobi
=
false
;
11
12
bool
testGurobiLicense
() {
13
#ifdef STORM_HAVE_GUROBI
14
if
(!
storm::settings::hasModule<storm::settings::modules::GurobiSettings>
()) {
15
return
true
;
// Gurobi not relevant for this test suite
16
}
17
try
{
18
auto
lpSolver = storm::utility::solver::getLpSolver<double>(
"test"
, storm::solver::LpSolverTypeSelection::Gurobi);
19
}
catch
(storm::exceptions::GurobiLicenseException) {
20
return
false
;
21
}
22
return
true
;
23
#else
24
return
false
;
25
#endif
26
}
27
}
// namespace storm::test
GurobiLicenseException.h
GurobiLpSolver.h
GurobiSettings.h
SettingsManager.h
storm::settings::getModule
SettingsType const & getModule()
Get module.
Definition
SettingsManager.h:290
storm::test
Definition
storm_gtest.cpp:9
storm::test::testGurobiLicense
bool testGurobiLicense()
Definition
storm_gtest.cpp:12
storm::test::noGurobi
bool noGurobi
Definition
storm_gtest.cpp:10
solver.h
storm_gtest.h
src
test
storm_gtest.cpp
Generated by
1.9.8