diff --git a/src/pomdp/tracker.cpp b/src/pomdp/tracker.cpp index cffae0e..6798be4 100644 --- a/src/pomdp/tracker.cpp +++ b/src/pomdp/tracker.cpp @@ -35,6 +35,8 @@ void define_tracker(py::module& m) { ndetbelieftracker.def("obtain_current_risk",&NDPomdpTrackerSparse::getCurrentRisk, py::arg("max")=true); ndetbelieftracker.def("track", &NDPomdpTrackerSparse::track, py::arg("observation")); ndetbelieftracker.def("obtain_beliefs", &NDPomdpTrackerSparse::getCurrentBeliefs); + ndetbelieftracker.def("size", &NDPomdpTrackerSparse::getNumberOfBeliefs); + ndetbelieftracker.def("dimension", &NDPomdpTrackerSparse::getCurrentDimension); ndetbelieftracker.def("obtain_last_observation", &NDPomdpTrackerSparse::getCurrentObservation); ndetbelieftracker.def("reduce",&NDPomdpTrackerSparse::reduce); diff --git a/src/pomdp/transformations.cpp b/src/pomdp/transformations.cpp index 21a7cd9..91131a5 100644 --- a/src/pomdp/transformations.cpp +++ b/src/pomdp/transformations.cpp @@ -46,6 +46,13 @@ void define_transformations_nt(py::module &m) { .value("full", storm::transformer::PomdpFscApplicationMode::FULL) ; + + py::class_> unfolder(m, "ObservationTraceUnfolderDouble", "Unfolds observation traces in models"); + unfolder.def(py::init const&, std::vector const&, std::shared_ptr&>(), py::arg("model"), py::arg("risk"), py::arg("expression_manager")); + unfolder.def("transform", &storm::pomdp::ObservationTraceUnfolder::transform, py::arg("trace")); + unfolder.def("extend", &storm::pomdp::ObservationTraceUnfolder::extend, py::arg("new_observation")); + unfolder.def("reset", &storm::pomdp::ObservationTraceUnfolder::reset, py::arg("new_observation")); + } template @@ -54,7 +61,9 @@ 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("expression_manager"),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);