30 changed files with 654 additions and 99 deletions
-
12src/storm/exceptions/InvalidSolverSettingsException.h
-
12src/storm/exceptions/UnmetRequirementException.h
-
5src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp
-
15src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp
-
4src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp
-
9src/storm/settings/modules/EigenEquationSolverSettings.cpp
-
2src/storm/settings/modules/EigenEquationSolverSettings.h
-
6src/storm/settings/modules/GeneralSettings.cpp
-
14src/storm/settings/modules/GeneralSettings.h
-
14src/storm/settings/modules/NativeEquationSolverSettings.cpp
-
4src/storm/settings/modules/NativeEquationSolverSettings.h
-
43src/storm/solver/EigenLinearEquationSolver.cpp
-
11src/storm/solver/EigenLinearEquationSolver.h
-
4src/storm/solver/EliminationLinearEquationSolver.cpp
-
4src/storm/solver/EliminationLinearEquationSolver.h
-
29src/storm/solver/GmmxxLinearEquationSolver.cpp
-
10src/storm/solver/GmmxxLinearEquationSolver.h
-
139src/storm/solver/IterativeMinMaxLinearEquationSolver.cpp
-
7src/storm/solver/IterativeMinMaxLinearEquationSolver.h
-
35src/storm/solver/LinearEquationSolver.cpp
-
37src/storm/solver/LinearEquationSolver.h
-
48src/storm/solver/LinearEquationSolverRequirements.cpp
-
35src/storm/solver/LinearEquationSolverRequirements.h
-
20src/storm/solver/MinMaxLinearEquationSolver.cpp
-
20src/storm/solver/MinMaxLinearEquationSolver.h
-
64src/storm/solver/MinMaxLinearEquationSolverRequirements.cpp
-
37src/storm/solver/MinMaxLinearEquationSolverRequirements.h
-
97src/storm/solver/NativeLinearEquationSolver.cpp
-
12src/storm/solver/NativeLinearEquationSolver.h
-
4src/storm/solver/SymbolicMinMaxLinearEquationSolver.cpp
@ -0,0 +1,12 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/exceptions/BaseException.h" |
||||
|
#include "storm/exceptions/ExceptionMacros.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace exceptions { |
||||
|
|
||||
|
STORM_NEW_EXCEPTION(InvalidSolverSettingsException) |
||||
|
|
||||
|
} // namespace exceptions |
||||
|
} // namespace storm |
@ -0,0 +1,12 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm/exceptions/BaseException.h" |
||||
|
#include "storm/exceptions/ExceptionMacros.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace exceptions { |
||||
|
|
||||
|
STORM_NEW_EXCEPTION(UnmetRequirementException) |
||||
|
|
||||
|
} // namespace exceptions |
||||
|
} // namespace storm |
@ -0,0 +1,48 @@ |
|||||
|
#include "storm/solver/LinearEquationSolverRequirements.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace solver { |
||||
|
|
||||
|
LinearEquationSolverRequirements::LinearEquationSolverRequirements() : globalLowerBound(false), globalUpperBound(false) { |
||||
|
// Intentionally left empty.
|
||||
|
} |
||||
|
|
||||
|
LinearEquationSolverRequirements& LinearEquationSolverRequirements::requireGlobalLowerBound() { |
||||
|
globalLowerBound = true; |
||||
|
return *this; |
||||
|
} |
||||
|
|
||||
|
LinearEquationSolverRequirements& LinearEquationSolverRequirements::requireGlobalUpperBound() { |
||||
|
globalUpperBound = true; |
||||
|
return *this; |
||||
|
} |
||||
|
|
||||
|
bool LinearEquationSolverRequirements::requiresGlobalLowerBound() const { |
||||
|
return globalLowerBound; |
||||
|
} |
||||
|
|
||||
|
bool LinearEquationSolverRequirements::requiresGlobalUpperBound() const { |
||||
|
return globalUpperBound; |
||||
|
} |
||||
|
|
||||
|
bool LinearEquationSolverRequirements::requires(Element const& element) const { |
||||
|
switch (element) { |
||||
|
case Element::GlobalLowerBound: return globalLowerBound; break; |
||||
|
case Element::GlobalUpperBound: return globalUpperBound; break; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
void LinearEquationSolverRequirements::clearGlobalLowerBound() { |
||||
|
globalLowerBound = false; |
||||
|
} |
||||
|
|
||||
|
void LinearEquationSolverRequirements::clearGlobalUpperBound() { |
||||
|
globalUpperBound = false; |
||||
|
} |
||||
|
|
||||
|
bool LinearEquationSolverRequirements::empty() const { |
||||
|
return !globalLowerBound && !globalUpperBound; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace solver { |
||||
|
|
||||
|
class LinearEquationSolverRequirements { |
||||
|
public: |
||||
|
// The different requirements a solver can have. |
||||
|
enum class Element { |
||||
|
// Requirements that are related to bounds for the actual solution. |
||||
|
GlobalLowerBound, |
||||
|
GlobalUpperBound |
||||
|
}; |
||||
|
|
||||
|
LinearEquationSolverRequirements(); |
||||
|
|
||||
|
LinearEquationSolverRequirements& requireGlobalLowerBound(); |
||||
|
LinearEquationSolverRequirements& requireGlobalUpperBound(); |
||||
|
|
||||
|
bool requiresGlobalLowerBound() const; |
||||
|
bool requiresGlobalUpperBound() const; |
||||
|
bool requires(Element const& element) const; |
||||
|
|
||||
|
void clearGlobalLowerBound(); |
||||
|
void clearGlobalUpperBound(); |
||||
|
|
||||
|
bool empty() const; |
||||
|
|
||||
|
private: |
||||
|
bool globalLowerBound; |
||||
|
bool globalUpperBound; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue