@ -8,6 +8,8 @@ template<typename ValueType> using SparsePomdp = storm::models::sparse::Pomdp<Va
template < typename ValueType > using SparsePomdpTracker = storm : : generator : : BeliefSupportTracker < ValueType > ;
template < typename ValueType > using SparsePomdpTracker = storm : : generator : : BeliefSupportTracker < ValueType > ;
template < typename ValueType > using NDPomdpTrackerSparse = storm : : generator : : NondeterministicBeliefTracker < double , storm : : generator : : SparseBeliefState < double > > ;
template < typename ValueType > using NDPomdpTrackerSparse = storm : : generator : : NondeterministicBeliefTracker < double , storm : : generator : : SparseBeliefState < double > > ;
template < typename ValueType > using NDPomdpTrackerDense = storm : : generator : : NondeterministicBeliefTracker < double , storm : : generator : : ObservationDenseBeliefState < double > > ;
void define_tracker ( py : : module & m ) {
void define_tracker ( py : : module & m ) {
py : : class_ < storm : : generator : : BeliefSupportTracker < double > > tracker ( m , " BeliefSupportTrackerDouble " , " Tracker for BeliefSupports " ) ;
py : : class_ < storm : : generator : : BeliefSupportTracker < double > > tracker ( m , " BeliefSupportTrackerDouble " , " Tracker for BeliefSupports " ) ;
@ -20,6 +22,11 @@ void define_tracker(py::module& m) {
sbel . def_property_readonly ( " risk " , & storm : : generator : : SparseBeliefState < double > : : getRisk ) ;
sbel . def_property_readonly ( " risk " , & storm : : generator : : SparseBeliefState < double > : : getRisk ) ;
sbel . def ( " __str__ " , & storm : : generator : : SparseBeliefState < double > : : toString ) ;
sbel . def ( " __str__ " , & storm : : generator : : SparseBeliefState < double > : : toString ) ;
sbel . def_property_readonly ( " is_valid " , & storm : : generator : : SparseBeliefState < double > : : isValid ) ;
sbel . def_property_readonly ( " is_valid " , & storm : : generator : : SparseBeliefState < double > : : isValid ) ;
//
// py::class_<storm::generator::ObservationDenseBeliefState<double>> dbel(m, "DenseBeliefStateDouble", "Belief state in dense format");
// dbel.def("get", &storm::generator::ObservationDenseBeliefState<double>::get, py::arg("state"));
// dbel.def_property_readonly("risk", &storm::generator::ObservationDenseBeliefState<double>::getRisk);
// dbel.def("__str__", &storm::generator::ObservationDenseBeliefState<double>::toString);
py : : class_ < NDPomdpTrackerSparse < double > > ndetbelieftracker ( m , " NondeterministicBeliefTrackerDoubleSparse " , " Tracker for belief states and uncontrollable actions " ) ;
py : : class_ < NDPomdpTrackerSparse < double > > ndetbelieftracker ( m , " NondeterministicBeliefTrackerDoubleSparse " , " Tracker for belief states and uncontrollable actions " ) ;
ndetbelieftracker . def ( py : : init < SparsePomdp < double > const & > ( ) , py : : arg ( " pomdp " ) ) ;
ndetbelieftracker . def ( py : : init < SparsePomdp < double > const & > ( ) , py : : arg ( " pomdp " ) ) ;
@ -29,5 +36,17 @@ void define_tracker(py::module& m) {
ndetbelieftracker . def ( " track " , & NDPomdpTrackerSparse < double > : : track , py : : arg ( " observation " ) ) ;
ndetbelieftracker . def ( " track " , & NDPomdpTrackerSparse < double > : : track , py : : arg ( " observation " ) ) ;
ndetbelieftracker . def ( " obtain_beliefs " , & NDPomdpTrackerSparse < double > : : getCurrentBeliefs ) ;
ndetbelieftracker . def ( " obtain_beliefs " , & NDPomdpTrackerSparse < double > : : getCurrentBeliefs ) ;
ndetbelieftracker . def ( " obtain_last_observation " , & NDPomdpTrackerSparse < double > : : getCurrentObservation ) ;
ndetbelieftracker . def ( " obtain_last_observation " , & NDPomdpTrackerSparse < double > : : getCurrentObservation ) ;
ndetbelieftracker . def ( " reduce " , & NDPomdpTrackerSparse < double > : : reduce ) ;
// py::class_<NDPomdpTrackerDense<double>> ndetbelieftrackerd(m, "NondeterministicBeliefTrackerDoubleDense", "Tracker for belief states and uncontrollable actions");
// ndetbelieftrackerd.def(py::init<SparsePomdp<double> const&>(), py::arg("pomdp"));
// ndetbelieftrackerd.def("reset", &NDPomdpTrackerDense<double>::reset);
// ndetbelieftrackerd.def("set_risk", &NDPomdpTrackerDense<double>::setRisk, py::arg("risk"));
// ndetbelieftrackerd.def("obtain_current_risk",&NDPomdpTrackerDense<double>::getCurrentRisk, py::arg("max")=true);
// ndetbelieftrackerd.def("track", &NDPomdpTrackerDense<double>::track, py::arg("observation"));
// ndetbelieftrackerd.def("obtain_beliefs", &NDPomdpTrackerDense<double>::getCurrentBeliefs);
// ndetbelieftrackerd.def("obtain_last_observation", &NDPomdpTrackerDense<double>::getCurrentObservation);
// ndetbelieftrackerd.def("reduce",&NDPomdpTrackerDense<double>::reduce);
}
}