From 7ba3b6b8d6416f02e2630041e80702aacc1bc845 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Tue, 14 Apr 2020 14:21:50 -0700 Subject: [PATCH] Canonic POMDP in -> Canonic POMDP out --- src/storm-pomdp/transformer/PomdpMemoryUnfolder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/storm-pomdp/transformer/PomdpMemoryUnfolder.cpp b/src/storm-pomdp/transformer/PomdpMemoryUnfolder.cpp index c23c828ab..1f7235108 100644 --- a/src/storm-pomdp/transformer/PomdpMemoryUnfolder.cpp +++ b/src/storm-pomdp/transformer/PomdpMemoryUnfolder.cpp @@ -19,6 +19,7 @@ namespace storm { template std::shared_ptr> PomdpMemoryUnfolder::transform() const { // For simplicity we first build the 'full' product of pomdp and memory (with pomdp.numStates * memory.numStates states). + STORM_LOG_THROW(pomdp.isCanonic() , storm::exceptions::InvalidArgumentException, "POMDP must be canonical to unfold memory into it"); storm::storage::sparse::ModelComponents components; components.transitionMatrix = transformTransitions(); components.stateLabeling = transformStateLabeling(); @@ -34,7 +35,8 @@ namespace storm { for (auto const& rewModel : pomdp.getRewardModels()) { components.rewardModels.emplace(rewModel.first, transformRewardModel(rewModel.second, reachableStates)); } - return std::make_shared>(std::move(components)); + + return std::make_shared>(std::move(components), true); } template