Browse Source

Fixed an issue with dropping unexplored states.

tempestpy_adaptions
Tim Quatmann 5 years ago
parent
commit
fcee1d05fa
  1. 5
      src/storm-pomdp/builder/BeliefMdpExplorer.h

5
src/storm-pomdp/builder/BeliefMdpExplorer.h

@ -368,7 +368,8 @@ namespace storm {
{ // beliefIdToMdpStateMap { // beliefIdToMdpStateMap
for (auto belIdToMdpStateIt = beliefIdToMdpStateMap.begin(); belIdToMdpStateIt != beliefIdToMdpStateMap.end();) { for (auto belIdToMdpStateIt = beliefIdToMdpStateMap.begin(); belIdToMdpStateIt != beliefIdToMdpStateMap.end();) {
if (relevantMdpStates.get(belIdToMdpStateIt->second)) { if (relevantMdpStates.get(belIdToMdpStateIt->second)) {
// Keep current entry and move on to the next one.
// Translate current entry and move on to the next one.
belIdToMdpStateIt->second = toRelevantStateIndexMap[belIdToMdpStateIt->second];
++belIdToMdpStateIt; ++belIdToMdpStateIt;
} else { } else {
STORM_LOG_ASSERT(!exploredBeliefIds.get(belIdToMdpStateIt->first), "Inconsistent exploration information: Unexplored MDPState corresponds to explored beliefId"); STORM_LOG_ASSERT(!exploredBeliefIds.get(belIdToMdpStateIt->first), "Inconsistent exploration information: Unexplored MDPState corresponds to explored beliefId");
@ -619,7 +620,7 @@ namespace storm {
return findRes->second; return findRes->second;
} }
} }
// At this poind we need to add a new MDP state
// At this point we need to add a new MDP state
MdpStateType result = getCurrentNumberOfMdpStates(); MdpStateType result = getCurrentNumberOfMdpStates();
assert(getCurrentNumberOfMdpStates() == mdpStateToBeliefIdMap.size()); assert(getCurrentNumberOfMdpStates() == mdpStateToBeliefIdMap.size());
mdpStateToBeliefIdMap.push_back(beliefId); mdpStateToBeliefIdMap.push_back(beliefId);

Loading…
Cancel
Save