Browse Source

Added some more trace output for sound value iteration.

tempestpy_adaptions
Tim Quatmann 5 years ago
parent
commit
8d99ae4f4c
  1. 1
      src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp
  2. 5
      src/storm/solver/helper/SoundValueIterationHelper.cpp

1
src/storm/solver/TopologicalMinMaxLinearEquationSolver.cpp

@ -81,6 +81,7 @@ namespace storm {
if (scc.size() == 1) { if (scc.size() == 1) {
returnValue = solveTrivialScc(*scc.begin(), dir, x, b) && returnValue; returnValue = solveTrivialScc(*scc.begin(), dir, x, b) && returnValue;
} else { } else {
STORM_LOG_TRACE("Solving SCC of size " << scc.size() << ".");
sccRowGroupsAsBitVector.clear(); sccRowGroupsAsBitVector.clear();
sccRowsAsBitVector.clear(); sccRowsAsBitVector.clear();
for (auto const& group : scc) { for (auto const& group : scc) {

5
src/storm/solver/helper/SoundValueIterationHelper.cpp

@ -54,12 +54,14 @@ namespace storm {
template<typename ValueType> template<typename ValueType>
void SoundValueIterationHelper<ValueType>::setLowerBound(ValueType const& value) { void SoundValueIterationHelper<ValueType>::setLowerBound(ValueType const& value) {
STORM_LOG_TRACE("Set lower bound to " << value << ".");
hasLowerBound = true; hasLowerBound = true;
lowerBound = value; lowerBound = value;
} }
template<typename ValueType> template<typename ValueType>
void SoundValueIterationHelper<ValueType>::setUpperBound(ValueType const& value) { void SoundValueIterationHelper<ValueType>::setUpperBound(ValueType const& value) {
STORM_LOG_TRACE("Set upper bound to " << value << ".");
hasUpperBound = true; hasUpperBound = true;
upperBound = value; upperBound = value;
} }
@ -223,6 +225,7 @@ namespace storm {
ValueType newDecisionValue = (xTmp[i] - xBest) / deltaY; ValueType newDecisionValue = (xTmp[i] - xBest) / deltaY;
if (!hasDecisionValue || better<dir>(newDecisionValue, decisionValue)) { if (!hasDecisionValue || better<dir>(newDecisionValue, decisionValue)) {
decisionValue = std::move(newDecisionValue); decisionValue = std::move(newDecisionValue);
STORM_LOG_TRACE("Update decision value to " << decisionValue);
hasDecisionValue = true; hasDecisionValue = true;
} }
} }
@ -347,6 +350,7 @@ namespace storm {
} }
} }
} }
STORM_LOG_TRACE("Phase 1 converged: all y values are < 1.");
convergencePhase1 = false; convergencePhase1 = false;
return true; return true;
} }
@ -415,6 +419,7 @@ namespace storm {
if (!decisionValueBlocks && hasDecisionValue && better<dir>(decisionValue, getPrimaryBound<dir>())) { if (!decisionValueBlocks && hasDecisionValue && better<dir>(decisionValue, getPrimaryBound<dir>())) {
getPrimaryBound<dir>() = decisionValue; getPrimaryBound<dir>() = decisionValue;
decisionValueBlocks = true; decisionValueBlocks = true;
STORM_LOG_TRACE("Decision value blocks primary bound to " << decisionValue << ".");
} }
} }

Loading…
Cancel
Save