Browse Source

Merge branch 'master' into deterministicScheds

tempestpy_adaptions
TimQu 6 years ago
parent
commit
c27e542bf1
  1. 2
      src/storm/solver/TopologicalLinearEquationSolver.cpp
  2. 2
      src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp
  3. 2
      src/storm/storage/StronglyConnectedComponentDecomposition.h

2
src/storm/solver/TopologicalLinearEquationSolver.cpp

@ -105,7 +105,7 @@ namespace storm {
template<typename ValueType> template<typename ValueType>
void TopologicalLinearEquationSolver<ValueType>::createSortedSccDecomposition(bool needLongestChainSize) const { void TopologicalLinearEquationSolver<ValueType>::createSortedSccDecomposition(bool needLongestChainSize) const {
// Obtain the scc decomposition // Obtain the scc decomposition
this->sortedSccDecomposition = std::make_unique<storm::storage::StronglyConnectedComponentDecomposition<ValueType>>(*this->A, storm::storage::StronglyConnectedComponentDecompositionOptions().forceTobologicalSort().computeSccDepths(needLongestChainSize));
this->sortedSccDecomposition = std::make_unique<storm::storage::StronglyConnectedComponentDecomposition<ValueType>>(*this->A, storm::storage::StronglyConnectedComponentDecompositionOptions().forceTopologicalSort().computeSccDepths(needLongestChainSize));
if (needLongestChainSize) { if (needLongestChainSize) {
this->longestSccChainSize = this->sortedSccDecomposition->getMaxSccDepth() + 1; this->longestSccChainSize = this->sortedSccDecomposition->getMaxSccDepth() + 1;
} }

2
src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp

@ -113,7 +113,7 @@ namespace storm {
template<typename ValueType> template<typename ValueType>
void TopologicalMinMaxLinearEquationSolver<ValueType>::createSortedSccDecomposition(bool needLongestChainSize) const { void TopologicalMinMaxLinearEquationSolver<ValueType>::createSortedSccDecomposition(bool needLongestChainSize) const {
// Obtain the scc decomposition // Obtain the scc decomposition
this->sortedSccDecomposition = std::make_unique<storm::storage::StronglyConnectedComponentDecomposition<ValueType>>(*this->A, storm::storage::StronglyConnectedComponentDecompositionOptions().forceTobologicalSort().computeSccDepths(needLongestChainSize));
this->sortedSccDecomposition = std::make_unique<storm::storage::StronglyConnectedComponentDecomposition<ValueType>>(*this->A, storm::storage::StronglyConnectedComponentDecompositionOptions().forceTopologicalSort().computeSccDepths(needLongestChainSize));
if (needLongestChainSize) { if (needLongestChainSize) {
this->longestSccChainSize = this->sortedSccDecomposition->getMaxSccDepth() + 1; this->longestSccChainSize = this->sortedSccDecomposition->getMaxSccDepth() + 1;
} }

2
src/storm/storage/StronglyConnectedComponentDecomposition.h

@ -28,7 +28,7 @@ namespace storm {
/// Sets if only bottom SCCs, i.e. SCCs in which all states have no way of leaving the SCC), are kept. /// Sets if only bottom SCCs, i.e. SCCs in which all states have no way of leaving the SCC), are kept.
StronglyConnectedComponentDecompositionOptions& onlyBottomSccs(bool value = true) { areOnlyBottomSccsConsidered = value; return *this; } StronglyConnectedComponentDecompositionOptions& onlyBottomSccs(bool value = true) { areOnlyBottomSccsConsidered = value; return *this; }
/// Enforces that the returned SCCs are sorted in a topological order. /// Enforces that the returned SCCs are sorted in a topological order.
StronglyConnectedComponentDecompositionOptions& forceTobologicalSort(bool value = true) { isTopologicalSortForced = value; return *this; }
StronglyConnectedComponentDecompositionOptions& forceTopologicalSort(bool value = true) { isTopologicalSortForced = value; return *this; }
/// Sets if scc depths can be retrieved. /// Sets if scc depths can be retrieved.
StronglyConnectedComponentDecompositionOptions& computeSccDepths(bool value = true) { isComputeSccDepthsSet = value; return *this; } StronglyConnectedComponentDecompositionOptions& computeSccDepths(bool value = true) { isComputeSccDepthsSet = value; return *this; }

Loading…
Cancel
Save