From 5996961b7f2120b800254347a4f139f2d4cc6d1f Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Wed, 16 Sep 2020 09:06:52 -0700 Subject: [PATCH] better trace unfolder --- src/pomdp/transformations.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pomdp/transformations.cpp b/src/pomdp/transformations.cpp index ed03de4..21a7cd9 100644 --- a/src/pomdp/transformations.cpp +++ b/src/pomdp/transformations.cpp @@ -4,6 +4,7 @@ #include #include #include +#include template std::shared_ptr> make_canonic(storm::models::sparse::Pomdp const& pomdp) { @@ -30,8 +31,8 @@ std::shared_ptr> apply_unk } template -std::shared_ptr> unfold_trace(storm::models::sparse::Pomdp const& pomdp, std::vector const& observationTrace, std::vector const& riskDef ) { - storm::pomdp::ObservationTraceUnfolder transformer(pomdp); +std::shared_ptr> unfold_trace(storm::models::sparse::Pomdp const& pomdp, std::shared_ptr& exprManager, std::vector const& observationTrace, std::vector const& riskDef ) { + storm::pomdp::ObservationTraceUnfolder transformer(pomdp, exprManager); return transformer.transform(observationTrace, riskDef); } @@ -53,7 +54,7 @@ void define_transformations(py::module& m, std::string const& vtSuffix) { m.def(("_unfold_memory_" + vtSuffix).c_str(), &unfold_memory, "Unfold memory into a POMDP", py::arg("pomdp"), py::arg("memorystructure"), py::arg("memorylabels") = false, py::arg("keep_state_valuations")=false); m.def(("_make_simple_"+ vtSuffix).c_str(), &make_simple, "Make POMDP simple", py::arg("pomdp"), py::arg("keep_state_valuations")=false); m.def(("_apply_unknown_fsc_" + vtSuffix).c_str(), &apply_unknown_fsc, "Apply unknown FSC",py::arg("pomdp"), py::arg("application_mode")=storm::transformer::PomdpFscApplicationMode::SIMPLE_LINEAR); - m.def(("_unfold_trace_" + vtSuffix).c_str(), &unfold_trace, "Unfold observed trace", py::arg("pomdp"), py::arg("observation_trace"), py::arg("risk_definition")); + m.def(("_unfold_trace_" + vtSuffix).c_str(), &unfold_trace, "Unfold observed trace", py::arg("pomdp"), py::arg("expression_manager"),py::arg("observation_trace"), py::arg("risk_definition")); } template void define_transformations(py::module& m, std::string const& vtSuffix);