Browse Source

Handle no change after verification iterations by re-guessing

This may lead to some testcases breaking. Needs further investigation
Handle only no change by re-guessing, instead of all other cases
tempestpy_adaptions
Jan Erik Karuc 5 years ago
parent
commit
c07734d80a
  1. 5
      src/storm/solver/helper/OptimisticValueIterationHelper.h

5
src/storm/solver/helper/OptimisticValueIterationHelper.h

@ -183,7 +183,7 @@ namespace storm {
// Set lowerX to the upper bound candidate // Set lowerX to the upper bound candidate
std::swap(lowerX, upperX); std::swap(lowerX, upperX);
break; break;
} else if (newUpperBoundAlwaysLowerEqual) {
} else if (newUpperBoundAlwaysLowerEqual &! newUpperBoundAlwaysHigherEqual) {
// All values moved down or stayed the same and we have a maximum difference of twice the requested precision // All values moved down or stayed the same and we have a maximum difference of twice the requested precision
// We can safely use twice the requested precision, as we calculate the center of both vectors // We can safely use twice the requested precision, as we calculate the center of both vectors
bool reachedPrecision; bool reachedPrecision;
@ -199,6 +199,9 @@ namespace storm {
// From now on, we keep updating both bounds // From now on, we keep updating both bounds
intervalIterationNeeded = true; intervalIterationNeeded = true;
} }
} else if (newUpperBoundAlwaysHigherEqual && newUpperBoundAlwaysLowerEqual) {
// All values stayed the same. For safety we guess above this value again and check, if all values move down
break;
} }
// At this point, the old upper bounds (auxVector) are not needed anymore. // At this point, the old upper bounds (auxVector) are not needed anymore.

Loading…
Cancel
Save