TimQu
7 years ago
19 changed files with 299 additions and 140 deletions
-
6src/storm-pars/modelchecker/region/SparseDtmcParameterLiftingModelChecker.cpp
-
6src/storm/modelchecker/csl/helper/SparseCtmcCslHelper.cpp
-
8src/storm/modelchecker/csl/helper/SparseMarkovAutomatonCslHelper.cpp
-
4src/storm/modelchecker/multiobjective/pcaa/RewardBoundedMdpPcaaWeightVectorChecker.cpp
-
2src/storm/modelchecker/multiobjective/pcaa/StandardMaPcaaWeightVectorChecker.cpp
-
9src/storm/modelchecker/multiobjective/pcaa/StandardPcaaWeightVectorChecker.cpp
-
6src/storm/modelchecker/prctl/helper/HybridDtmcPrctlHelper.cpp
-
34src/storm/modelchecker/prctl/helper/HybridMdpPrctlHelper.cpp
-
6src/storm/modelchecker/prctl/helper/SparseDtmcPrctlHelper.cpp
-
16src/storm/modelchecker/prctl/helper/SparseMdpPrctlHelper.cpp
-
16src/storm/modelchecker/prctl/helper/SymbolicMdpPrctlHelper.cpp
-
64src/storm/solver/LinearEquationSolverRequirements.cpp
-
29src/storm/solver/LinearEquationSolverRequirements.h
-
103src/storm/solver/MinMaxLinearEquationSolverRequirements.cpp
-
41src/storm/solver/MinMaxLinearEquationSolverRequirements.h
-
32src/storm/solver/SolverRequirement.cpp
-
39src/storm/solver/SolverRequirement.h
-
16src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp
-
2src/test/storm/solver/MinMaxLinearEquationSolverTest.cpp
@ -0,0 +1,32 @@ |
|||
#include "storm/solver/SolverRequirement.h"
|
|||
|
|||
#include <vector>
|
|||
|
|||
#include "storm/utility/vector.h"
|
|||
|
|||
namespace storm { |
|||
namespace solver { |
|||
SolverRequirement::SolverRequirement() : enabled(false), critical(false) { |
|||
// Intentionally left empty
|
|||
} |
|||
|
|||
SolverRequirement::operator bool() const { |
|||
return enabled; |
|||
} |
|||
|
|||
void SolverRequirement::enable(bool critical) { |
|||
this->enabled = true; |
|||
this->critical = critical; |
|||
} |
|||
|
|||
void SolverRequirement::clear() { |
|||
enabled = false; |
|||
critical = false; |
|||
} |
|||
|
|||
bool SolverRequirement::isCritical() const { |
|||
return this->critical; |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,39 @@ |
|||
#pragma once |
|||
|
|||
namespace storm { |
|||
namespace solver { |
|||
|
|||
class SolverRequirement { |
|||
public: |
|||
|
|||
SolverRequirement(); |
|||
SolverRequirement(SolverRequirement const& other) = default; |
|||
|
|||
/*! |
|||
* Returns true if this is a requirement of the considered solver. |
|||
*/ |
|||
operator bool() const; |
|||
|
|||
/*! |
|||
* Enables this requirement. |
|||
* @param critical if set, it is assumed that the solver will fail in case this requirement is not met |
|||
*/ |
|||
void enable(bool critical = true); |
|||
|
|||
/*! |
|||
* Clears this requirement. |
|||
*/ |
|||
void clear(); |
|||
|
|||
/*! |
|||
* Returns true if the solver fails in case this requirement is not met. |
|||
*/ |
|||
bool isCritical() const; |
|||
|
|||
private: |
|||
bool enabled; |
|||
bool critical; |
|||
}; |
|||
|
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue