16 std::map<uint64_t, uint64_t> stateMap;
17 std::map<uint32_t, uint32_t> observationMap;
19 uint64_t nrNewStates = prob0States.
empty() ? 1 : 2;
24 std::vector<uint32_t> newObservations;
27 for (
auto const iter : prob1States) {
31 for (
auto const &label : labelSet) {
39 for (
auto const iter : prob0States) {
51 uint64_t newId = prob0States.
empty() ? 1 : 2;
52 uint64_t nextObservation = prob0States.
empty() ? 1 : 2;
53 for (
auto const iter : unknownStates) {
54 stateMap[iter] = newId;
70 uint64_t currentRow = 0;
71 uint64_t currentRowGroup = 0;
75 smb.
addNextValue(currentRow, 0, storm::utility::one<ValueType>());
76 newObservations.push_back(0);
79 if (!prob0States.
empty()) {
81 smb.
addNextValue(currentRow, 1, storm::utility::one<ValueType>());
84 newObservations.push_back(1);
89 for (
auto const iter : unknownStates) {
93 for (uint64_t row = 0; row < transitionMatrix.getRowGroupSize(iter); ++row) {
94 std::map<uint64_t, ValueType> transitionsInAction;
95 for (
auto const &entry : transitionMatrix.getRow(iter, row)) {
97 transitionsInAction[stateMap[entry.getColumn()]] += entry.getValue();
99 for (
auto const &transition : transitionsInAction) {
100 smb.
addNextValue(currentRow, transition.first, transition.second);
105 newObservations.push_back(observationMap[pomdp.
getObservation(iter)]);
108 auto newTransitionMatrix = smb.
build(currentRow, newNrOfStates, currentRowGroup);
113 return std::make_shared<storm::models::sparse::Pomdp<ValueType>>(std::move(components),
true);