Browse Source

changed detection of terminal states a bit

Former-commit-id: a9229fa174
tempestpy_adaptions
dehnert 9 years ago
parent
commit
8ea869ef14
  1. 15
      src/modelchecker/reachability/SparseMdpLearningModelChecker.cpp

15
src/modelchecker/reachability/SparseMdpLearningModelChecker.cpp

@ -216,17 +216,16 @@ namespace storm {
STORM_LOG_TRACE("State has " << behavior.getNumberOfChoices() << " choices.");
// Clumsily check whether we have found a state that forms a trivial BMEC.
if (behavior.getNumberOfChoices() == 0) {
isTerminalState = true;
} else if (behavior.getNumberOfChoices() == 1) {
auto const& onlyChoice = *behavior.begin();
if (onlyChoice.size() == 1) {
auto const& onlyEntry = *onlyChoice.begin();
if (onlyEntry.first == currentStateId) {
isTerminalState = true;
bool otherSuccessor = false;
for (auto const& choice : behavior) {
for (auto const& entry : choice) {
if (entry.first != currentStateId) {
otherSuccessor = true;
break;
}
}
}
isTerminalState = !otherSuccessor;
// If the state was neither a trivial (non-accepting) terminal state nor a target state, we
// need to store its behavior.

Loading…
Cancel
Save