Browse Source

OVI helper: fixed spacing in source code, changed two while loops to for loops

tempestpy_adaptions
Tim Quatmann 4 years ago
parent
commit
fd77b71084
  1. 13
      src/storm/solver/helper/OptimisticValueIterationHelper.h

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

@ -166,7 +166,7 @@ namespace storm {
// Upper bound iteration
singleIterationCallback(upperX, auxVector, overallIterations);
// At this point,h auxVector contains the old values for the upper bound whereas upperX contains the new ones.
// At this point, auxVector contains the old values for the upper bound whereas upperX contains the new ones.
// Compare the new upper bound candidate with the old one
bool newUpperBoundAlwaysHigherEqual = true;
@ -176,30 +176,25 @@ namespace storm {
for (uint64_t i = 0; i < upperX->size() & !cancelOuterScan; ++i) {
if ((*upperX)[i] < (*auxVector)[i]) {
newUpperBoundAlwaysHigherEqual = false;
++i;
while (i < upperX->size()) {
for (++i; i < upperX->size(); ++i) {
if ((*upperX)[i] > (*auxVector)[i]) {
newUpperBoundAlwaysLowerEqual = false;
cancelOuterScan = true;
break;
}
++i;
}
} else if ((*upperX)[i] != (*auxVector)[i]) {
newUpperBoundAlwaysLowerEqual = false;
++i;
while (i < upperX->size()) {
for (++i; i < upperX->size(); ++i) {
if ((*upperX)[i] < (*auxVector)[i]) {
newUpperBoundAlwaysHigherEqual = false;
cancelOuterScan = true;
break;
}
++i;
}
}
}
}
else {
} else {
for (uint64_t i = 0; i < upperX->size(); ++i) {
if ((*upperX)[i] < (*auxVector)[i]) {
newUpperBoundAlwaysHigherEqual = false;

Loading…
Cancel
Save