From d53cffab080d53125cd9b458aa7d3fd76df05d2d Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Thu, 22 Oct 2020 22:26:32 -0700 Subject: [PATCH] avoid resize that caused unstable behavior --- src/storm-pomdp/transformer/ObservationTraceUnfolder.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/storm-pomdp/transformer/ObservationTraceUnfolder.cpp b/src/storm-pomdp/transformer/ObservationTraceUnfolder.cpp index 36901c3e9..29c7da99e 100644 --- a/src/storm-pomdp/transformer/ObservationTraceUnfolder.cpp +++ b/src/storm-pomdp/transformer/ObservationTraceUnfolder.cpp @@ -10,7 +10,7 @@ namespace storm { template ObservationTraceUnfolder::ObservationTraceUnfolder(storm::models::sparse::Pomdp const& model, std::vector const& risk, std::shared_ptr& exprManager) : model(model), risk(risk), exprManager(exprManager) { - statesPerObservation = std::vector(model.getNrObservations(), storm::storage::BitVector(model.getNumberOfStates())); + statesPerObservation = std::vector(model.getNrObservations() + 1, storm::storage::BitVector(model.getNumberOfStates())); for (uint64_t state = 0; state < model.getNumberOfStates(); ++state) { statesPerObservation[model.getObservation(state)].set(state, true); } @@ -34,7 +34,6 @@ namespace storm { } STORM_LOG_THROW(actualInitialStates.getNumberOfSetBits() == 1, storm::exceptions::InvalidArgumentException, "Must have unique initial state matching the observation"); // - statesPerObservation.resize(model.getNrObservations() + 1); statesPerObservation[model.getNrObservations()] = actualInitialStates; #ifdef _VERBOSE_OBSERVATION_UNFOLDING