25 typedef boost::container::flat_map<StateType, BeliefValueType>
BeliefType;
33 void setRewardModel(std::optional<std::string> rewardModelName = std::nullopt);
40 uint64_t
size()
const;
62 std::pair<bool, ValueType>
getWeightedSum(
BeliefId const &beliefId, std::unordered_map<StateType, ValueType>
const &summands);
81 template<
typename DistributionType>
82 void addToDistribution(DistributionType &distr, StateType
const &state, BeliefValueType
const &value);
89 std::vector<BeliefValueType>
const &observationResolutions);
91 std::vector<std::pair<BeliefId, ValueType>>
expandAndClip(
BeliefId const &beliefId, uint64_t actionIndex,
92 std::vector<uint64_t>
const &observationResolutions);
94 std::vector<std::pair<BeliefId, ValueType>>
expand(
BeliefId const &beliefId, uint64_t actionIndex);
103 std::vector<BeliefValueType> getBeliefAsVector(
BeliefId const &beliefId);
105 std::vector<BeliefValueType> getBeliefAsVector(
const BeliefType &belief);
109 template<
typename DistributionType>
110 void adjustDistribution(DistributionType &distr);
113 std::size_t operator()(
const BeliefType &belief)
const;
116 struct Belief_equal_to {
120 struct FreudenthalDiff {
121 FreudenthalDiff(StateType
const &dimension, BeliefValueType diff);
124 BeliefValueType diff;
125 bool operator>(FreudenthalDiff
const &other)
const;
136 bool assertBelief(
BeliefType const &belief)
const;
138 bool assertTriangulation(
BeliefType const &belief, Triangulation
const &triangulation)
const;
142 void triangulateBeliefFreudenthal(
BeliefType const &belief, BeliefValueType
const &resolution, Triangulation &result);
144 void triangulateBeliefDynamic(
BeliefType const &belief, BeliefValueType
const &resolution, Triangulation &result);
148 std::vector<std::pair<BeliefId, ValueType>> expandInternal(
149 BeliefId const &beliefId, uint64_t actionIndex, std::optional<std::vector<BeliefValueType>>
const &observationTriangulationResolutions = std::nullopt,
150 std::optional<std::vector<uint64_t>>
const &observationGridClippingResolutions = std::nullopt);
156 PomdpType
const &pomdp;
157 std::vector<ValueType> pomdpActionRewardVector;
159 std::vector<BeliefType> beliefs;
160 std::vector<std::unordered_map<BeliefType, BeliefId, BeliefHash, Belief_equal_to>> beliefToIdMap;
165 std::shared_ptr<storm::solver::LpSolver<BeliefValueType>> lpSolver;