Browse Source

Removed obsolete function to create transition matrices from a data structure not used anymore

tempestpy_adaptions
Alexander Bork 5 years ago
parent
commit
877c15ed43
  1. 19
      src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp
  2. 10
      src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.h

19
src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp

@ -791,25 +791,6 @@ namespace storm {
return smb.build();
}
template<typename ValueType, typename RewardModelType>
storm::storage::SparseMatrix<ValueType>
ApproximatePOMDPModelchecker<ValueType, RewardModelType>::buildTransitionMatrix(
std::vector<std::map<uint64_t, ValueType>> transitions) {
uint_fast64_t currentRow = 0;
uint64_t nrEntries = 0;
for (auto const &map : transitions) {
nrEntries += map.size();
}
storm::storage::SparseMatrixBuilder<ValueType> smb(transitions.size(), transitions.size(), nrEntries);
for (auto const &map : transitions) {
for (auto const &transition : map) {
smb.addNextValue(currentRow, transition.first, transition.second);
}
++currentRow;
}
return smb.build();
}
template<typename ValueType, typename RewardModelType>
std::vector<uint64_t> ApproximatePOMDPModelchecker<ValueType, RewardModelType>::extractBestActions(
storm::models::sparse::Pomdp<ValueType, RewardModelType> const &pomdp,

10
src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.h

@ -232,11 +232,11 @@ namespace storm {
uint64_t getBeliefIdInVector(std::vector<storm::pomdp::Belief<ValueType>> const &grid, uint32_t observation,
std::vector<ValueType> probabilities);
storm::storage::SparseMatrix<ValueType>
buildTransitionMatrix(std::vector<std::map<uint64_t, ValueType>> transitions);
storm::storage::SparseMatrix<ValueType>
buildTransitionMatrix(std::vector<std::vector<std::map<uint64_t, ValueType>>> transitions);
/**
* @param transitions data structure that contains the transition information of the form: origin-state -> action -> (successor-state -> probability)
* @return sparseMatrix representing the transitions
*/
storm::storage::SparseMatrix<ValueType> buildTransitionMatrix(std::vector<std::vector<std::map<uint64_t, ValueType>>> transitions);
ValueType getRewardAfterAction(storm::models::sparse::Pomdp<ValueType, RewardModelType> const &pomdp, uint64_t action, storm::pomdp::Belief<ValueType> belief);

Loading…
Cancel
Save