Storm 2.0.0.3
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::pomdp::api Namespace Reference

Functions

template<typename ValueType>
void exportPolicyAsJson (storm::pomdp::policy::ObservationBasedFiniteStateController< ValueType > const &policy, std::string const &filename)
 Exports an observation-based finite-state controller to a JSON file.
template<typename ValueType>
void exportPolicyAsDot (storm::pomdp::policy::ObservationBasedFiniteStateController< ValueType > const &policy, std::string const &filename)
 Exports an observation-based finite-state controller to a Graphviz DOT file.
template void exportPolicyAsJson (storm::pomdp::policy::ObservationBasedFiniteStateController< double > const &, std::string const &)
template void exportPolicyAsJson (storm::pomdp::policy::ObservationBasedFiniteStateController< storm::RationalNumber > const &, std::string const &)
template void exportPolicyAsDot (storm::pomdp::policy::ObservationBasedFiniteStateController< double > const &, std::string const &)
template void exportPolicyAsDot (storm::pomdp::policy::ObservationBasedFiniteStateController< storm::RationalNumber > const &, std::string const &)
template<typename PomdpValueType, typename BeliefValueType, typename BeliefMdpValueType, typename PolicyValueType>
beliefs::BeliefBasedModelCheckerResult< BeliefMdpValueType, PolicyValueType > verifyWithBeliefUnfolding (storm::Environment const &env, storm::models::sparse::Pomdp< PomdpValueType > const &pomdp, storm::logic::Formula const &formula, beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const &options)
 Approximates an unbounded reachability probability or expected reachability reward by unfolding the belief MDP.
template<typename PomdpValueType, typename BeliefValueType, typename BeliefMdpValueType, typename PolicyValueType>
beliefs::BeliefBasedModelCheckerResult< BeliefMdpValueType, PolicyValueType > verifyWithBeliefDiscretization (storm::Environment const &env, storm::models::sparse::Pomdp< PomdpValueType > const &pomdp, storm::logic::Formula const &formula, uint64_t resolution=2, bool useDynamic=false, beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const &options={})
 Approximates an unbounded reachability probability or expected reachability reward by Freudenthal discretization.
template beliefs::BeliefBasedModelCheckerResult< double > verifyWithBeliefUnfolding< double, double, double > (storm::Environment const &, storm::models::sparse::Pomdp< double > const &, storm::logic::Formula const &, beliefs::BeliefBasedModelCheckerOptions< double > const &)
template beliefs::BeliefBasedModelCheckerResult< double > verifyWithBeliefDiscretization< double, double, double > (storm::Environment const &, storm::models::sparse::Pomdp< double > const &, storm::logic::Formula const &, uint64_t, bool, beliefs::BeliefBasedModelCheckerOptions< double > const &)
template beliefs::BeliefBasedModelCheckerResult< double > verifyWithBeliefUnfolding< double, storm::RationalNumber, double > (storm::Environment const &, storm::models::sparse::Pomdp< double > const &, storm::logic::Formula const &, beliefs::BeliefBasedModelCheckerOptions< double > const &)
template beliefs::BeliefBasedModelCheckerResult< double > verifyWithBeliefDiscretization< double, storm::RationalNumber, double > (storm::Environment const &, storm::models::sparse::Pomdp< double > const &, storm::logic::Formula const &, uint64_t, bool, beliefs::BeliefBasedModelCheckerOptions< double > const &)
template beliefs::BeliefBasedModelCheckerResult< storm::RationalNumber > verifyWithBeliefUnfolding< storm::RationalNumber, storm::RationalNumber, storm::RationalNumber > (storm::Environment const &, storm::models::sparse::Pomdp< storm::RationalNumber > const &, storm::logic::Formula const &, beliefs::BeliefBasedModelCheckerOptions< storm::RationalNumber > const &)
template beliefs::BeliefBasedModelCheckerResult< storm::RationalNumber > verifyWithBeliefDiscretization< storm::RationalNumber, storm::RationalNumber, storm::RationalNumber > (storm::Environment const &, storm::models::sparse::Pomdp< storm::RationalNumber > const &, storm::logic::Formula const &, uint64_t, bool, beliefs::BeliefBasedModelCheckerOptions< storm::RationalNumber > const &)
template beliefs::BeliefBasedModelCheckerResult< double > verifyWithBeliefUnfolding< storm::RationalNumber, storm::RationalNumber, double > (storm::Environment const &, storm::models::sparse::Pomdp< storm::RationalNumber > const &, storm::logic::Formula const &, beliefs::BeliefBasedModelCheckerOptions< double > const &)
template beliefs::BeliefBasedModelCheckerResult< double > verifyWithBeliefDiscretization< storm::RationalNumber, storm::RationalNumber, double > (storm::Environment const &, storm::models::sparse::Pomdp< storm::RationalNumber > const &, storm::logic::Formula const &, uint64_t, bool, beliefs::BeliefBasedModelCheckerOptions< double > const &)
template beliefs::BeliefBasedModelCheckerResult< storm::RationalNumber > verifyWithBeliefUnfolding< double, double, storm::RationalNumber > (storm::Environment const &, storm::models::sparse::Pomdp< double > const &, storm::logic::Formula const &, beliefs::BeliefBasedModelCheckerOptions< storm::RationalNumber > const &)
template beliefs::BeliefBasedModelCheckerResult< storm::RationalNumber > verifyWithBeliefDiscretization< double, double, storm::RationalNumber > (storm::Environment const &, storm::models::sparse::Pomdp< double > const &, storm::logic::Formula const &, uint64_t, bool, beliefs::BeliefBasedModelCheckerOptions< storm::RationalNumber > const &)
template beliefs::BeliefBasedModelCheckerResult< double, storm::RationalNumber > verifyWithBeliefUnfolding< double, double, double, storm::RationalNumber > (storm::Environment const &, storm::models::sparse::Pomdp< double > const &, storm::logic::Formula const &, beliefs::BeliefBasedModelCheckerOptions< double > const &)
template beliefs::BeliefBasedModelCheckerResult< double, storm::RationalNumber > verifyWithBeliefDiscretization< double, double, double, storm::RationalNumber > (storm::Environment const &, storm::models::sparse::Pomdp< double > const &, storm::logic::Formula const &, uint64_t, bool, beliefs::BeliefBasedModelCheckerOptions< double > const &)
template<typename PomdpValueType, typename BeliefValueType = PomdpValueType, typename BeliefMdpValueType = PomdpValueType, typename PolicyValueType = BeliefMdpValueType>
beliefs::BeliefBasedModelCheckerResult< BeliefMdpValueType, PolicyValueType > verifyWithBeliefUnfolding (storm::models::sparse::Pomdp< PomdpValueType > const &pomdp, storm::logic::Formula const &formula, beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const &options)
 Uses a default Environment; otherwise identical to the environment-taking overload.
template<typename PomdpValueType, typename BeliefValueType = PomdpValueType, typename BeliefMdpValueType = PomdpValueType, typename PolicyValueType = BeliefMdpValueType>
beliefs::BeliefBasedModelCheckerResult< BeliefMdpValueType, PolicyValueType > verifyWithBeliefDiscretization (storm::models::sparse::Pomdp< PomdpValueType > const &pomdp, storm::logic::Formula const &formula, uint64_t resolution=2, bool useDynamic=false, beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const &options={})
 Uses a default Environment; otherwise identical to the environment-taking overload.

Function Documentation

◆ exportPolicyAsDot() [1/3]

template void storm::pomdp::api::exportPolicyAsDot ( storm::pomdp::policy::ObservationBasedFiniteStateController< double > const & ,
std::string const &  )

◆ exportPolicyAsDot() [2/3]

template void storm::pomdp::api::exportPolicyAsDot ( storm::pomdp::policy::ObservationBasedFiniteStateController< storm::RationalNumber > const & ,
std::string const &  )

◆ exportPolicyAsDot() [3/3]

template<typename ValueType>
void storm::pomdp::api::exportPolicyAsDot ( storm::pomdp::policy::ObservationBasedFiniteStateController< ValueType > const & policy,
std::string const & filename )

Exports an observation-based finite-state controller to a Graphviz DOT file.

Parameters
policyThe controller to export.
filenameThe output filename. An existing file is overwritten.
Exceptions
storm::exceptions::FileIoExceptionIf the output file cannot be opened.

Definition at line 20 of file export.cpp.

◆ exportPolicyAsJson() [1/3]

template void storm::pomdp::api::exportPolicyAsJson ( storm::pomdp::policy::ObservationBasedFiniteStateController< double > const & ,
std::string const &  )

◆ exportPolicyAsJson() [2/3]

template void storm::pomdp::api::exportPolicyAsJson ( storm::pomdp::policy::ObservationBasedFiniteStateController< storm::RationalNumber > const & ,
std::string const &  )

◆ exportPolicyAsJson() [3/3]

template<typename ValueType>
void storm::pomdp::api::exportPolicyAsJson ( storm::pomdp::policy::ObservationBasedFiniteStateController< ValueType > const & policy,
std::string const & filename )

Exports an observation-based finite-state controller to a JSON file.

Parameters
policyThe controller to export.
filenameThe output filename. An existing file is overwritten.
Exceptions
storm::exceptions::FileIoExceptionIf the output file cannot be opened.

Definition at line 12 of file export.cpp.

◆ verifyWithBeliefDiscretization() [1/2]

template<typename PomdpValueType, typename BeliefValueType, typename BeliefMdpValueType, typename PolicyValueType>
beliefs::BeliefBasedModelCheckerResult< BeliefMdpValueType, PolicyValueType > storm::pomdp::api::verifyWithBeliefDiscretization ( storm::Environment const & env,
storm::models::sparse::Pomdp< PomdpValueType > const & pomdp,
storm::logic::Formula const & formula,
uint64_t resolution = 2,
bool useDynamic = false,
beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const & options = {} )

Approximates an unbounded reachability probability or expected reachability reward by Freudenthal discretization.

Preparation and numeric support match verifyWithBeliefUnfolding. The value is an upper bound for maximization and a lower bound for minimization. Complete exploration describes the discretized MDP and does not imply exactness.

Parameters
resolutionPositive integer grid resolution (default 2).
useDynamicSelect per-belief resolutions using dynamic triangulation (default false).
optionsExploration settings. Size/time limits, useClipping, and generatePolicy are rejected. cutZeroGap, buildChoiceLabeling, and explorationQueueOrder are forwarded to the belief model checker and honored as in unfolding. clippingResolutions is ignored because clipping is disabled.
Returns
The bound, exploration completion status, and statistics; result.policy is unset.
auto result = storm::pomdp::api::verifyWithBeliefDiscretization(env, pomdp, formula, 10, true);
beliefs::BeliefBasedModelCheckerResult< BeliefMdpValueType, PolicyValueType > verifyWithBeliefDiscretization(storm::Environment const &env, storm::models::sparse::Pomdp< PomdpValueType > const &pomdp, storm::logic::Formula const &formula, uint64_t resolution, bool useDynamic, beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const &options)
Approximates an unbounded reachability probability or expected reachability reward by Freudenthal dis...

Definition at line 120 of file verification.cpp.

◆ verifyWithBeliefDiscretization() [2/2]

template<typename PomdpValueType, typename BeliefValueType = PomdpValueType, typename BeliefMdpValueType = PomdpValueType, typename PolicyValueType = BeliefMdpValueType>
beliefs::BeliefBasedModelCheckerResult< BeliefMdpValueType, PolicyValueType > storm::pomdp::api::verifyWithBeliefDiscretization ( storm::models::sparse::Pomdp< PomdpValueType > const & pomdp,
storm::logic::Formula const & formula,
uint64_t resolution = 2,
bool useDynamic = false,
beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const & options = {} )

Uses a default Environment; otherwise identical to the environment-taking overload.

Definition at line 101 of file verification.h.

◆ verifyWithBeliefDiscretization< double, double, double >()

template beliefs::BeliefBasedModelCheckerResult< double > storm::pomdp::api::verifyWithBeliefDiscretization< double, double, double > ( storm::Environment const & ,
storm::models::sparse::Pomdp< double > const & ,
storm::logic::Formula const & ,
uint64_t ,
bool ,
beliefs::BeliefBasedModelCheckerOptions< double > const &  )

◆ verifyWithBeliefDiscretization< double, double, double, storm::RationalNumber >()

template beliefs::BeliefBasedModelCheckerResult< double, storm::RationalNumber > storm::pomdp::api::verifyWithBeliefDiscretization< double, double, double, storm::RationalNumber > ( storm::Environment const & ,
storm::models::sparse::Pomdp< double > const & ,
storm::logic::Formula const & ,
uint64_t ,
bool ,
beliefs::BeliefBasedModelCheckerOptions< double > const &  )

◆ verifyWithBeliefDiscretization< double, double, storm::RationalNumber >()

template beliefs::BeliefBasedModelCheckerResult< storm::RationalNumber > storm::pomdp::api::verifyWithBeliefDiscretization< double, double, storm::RationalNumber > ( storm::Environment const & ,
storm::models::sparse::Pomdp< double > const & ,
storm::logic::Formula const & ,
uint64_t ,
bool ,
beliefs::BeliefBasedModelCheckerOptions< storm::RationalNumber > const &  )

◆ verifyWithBeliefDiscretization< double, storm::RationalNumber, double >()

template beliefs::BeliefBasedModelCheckerResult< double > storm::pomdp::api::verifyWithBeliefDiscretization< double, storm::RationalNumber, double > ( storm::Environment const & ,
storm::models::sparse::Pomdp< double > const & ,
storm::logic::Formula const & ,
uint64_t ,
bool ,
beliefs::BeliefBasedModelCheckerOptions< double > const &  )

◆ verifyWithBeliefDiscretization< storm::RationalNumber, storm::RationalNumber, double >()

template beliefs::BeliefBasedModelCheckerResult< double > storm::pomdp::api::verifyWithBeliefDiscretization< storm::RationalNumber, storm::RationalNumber, double > ( storm::Environment const & ,
storm::models::sparse::Pomdp< storm::RationalNumber > const & ,
storm::logic::Formula const & ,
uint64_t ,
bool ,
beliefs::BeliefBasedModelCheckerOptions< double > const &  )

◆ verifyWithBeliefDiscretization< storm::RationalNumber, storm::RationalNumber, storm::RationalNumber >()

template beliefs::BeliefBasedModelCheckerResult< storm::RationalNumber > storm::pomdp::api::verifyWithBeliefDiscretization< storm::RationalNumber, storm::RationalNumber, storm::RationalNumber > ( storm::Environment const & ,
storm::models::sparse::Pomdp< storm::RationalNumber > const & ,
storm::logic::Formula const & ,
uint64_t ,
bool ,
beliefs::BeliefBasedModelCheckerOptions< storm::RationalNumber > const &  )

◆ verifyWithBeliefUnfolding() [1/2]

template<typename PomdpValueType, typename BeliefValueType, typename BeliefMdpValueType, typename PolicyValueType>
beliefs::BeliefBasedModelCheckerResult< BeliefMdpValueType, PolicyValueType > storm::pomdp::api::verifyWithBeliefUnfolding ( storm::Environment const & env,
storm::models::sparse::Pomdp< PomdpValueType > const & pomdp,
storm::logic::Formula const & formula,
beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const & options )

Approximates an unbounded reachability probability or expected reachability reward by unfolding the belief MDP.

Preparation canonicalizes the POMDP if needed (requiring choice labels), refines observations to identify targets, makes until-failure states absorbing, and computes frontier value bounds. Exactly one initial state and an explicit min/max optimization direction are required. Only non-nested formulae without thresholds are supported; the result is quantitative. Solver precision and arithmetic follow the supplied environment and numeric types.

The returned value is a lower bound for maximization and an upper bound for minimization. Without clipping, complete exploration gives the unabstracted belief MDP value, subject to numerical model checking. Completion with clipping does not imply exactness.

Parameters
optionsAll unfolding settings. Unset size/time limits mean unlimited exploration; no heuristic budget is selected. maxExplorationSize counts discovered beliefs, not transition depth, and is checked between expansions, so one expansion's successors can exceed it. Zero uses preprocessing cut-offs without expanding any belief. maxExplorationTime is in seconds and applies to exploration, not preprocessing or MDP verification. Building choice labels requires input choice labels, even for an already canonical POMDP; otherwise disable buildChoiceLabeling. When clipping is enabled, clippingResolutions must contain one positive entry per input observation. Observations introduced by target refinement inherit their original observation's resolution.

The supported (POMDP, belief, belief MDP) value types are (double, double, double), (double, RationalNumber, double), (RationalNumber, RationalNumber, RationalNumber), (RationalNumber, RationalNumber, double), and (double, double, RationalNumber). PolicyValueType defaults to BeliefMdpValueType for these combinations. Additionally, (double, double, double, RationalNumber) is supported when specifying all four value types.

Setting options.generatePolicy returns a finite-state controller in result.policy. Policy generation requires options.buildChoiceLabeling and is incompatible with options.cutZeroGap. PolicyValueType determines the type of policy probabilities independently of BeliefMdpValueType.

The returned policy refers to the prepared POMDP: its local action indices follow canonicalization, its observation IDs include target refinement, and until-failure states are absorbing. The API returns neither the prepared model nor a mapping back to the input model. Callers must account for these transformations before applying the policy to the input. With clipping, redirected probability mass has no reconstructed continuation policy, so the controller may be partial and its value on the input POMDP may differ from result.value.

Returns
The bound, exploration completion status, statistics, and optional policy. result.policy is unset unless options.generatePolicy is enabled.

Example:

options.maxExplorationSize = 1000;
options.maxExplorationTime = 10;
auto result = storm::pomdp::api::verifyWithBeliefUnfolding(env, pomdp, formula, options);
beliefs::BeliefBasedModelCheckerResult< BeliefMdpValueType, PolicyValueType > verifyWithBeliefUnfolding(storm::Environment const &env, storm::models::sparse::Pomdp< PomdpValueType > const &pomdp, storm::logic::Formula const &formula, beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const &options)
Approximates an unbounded reachability probability or expected reachability reward by unfolding the b...

Definition at line 111 of file verification.cpp.

◆ verifyWithBeliefUnfolding() [2/2]

template<typename PomdpValueType, typename BeliefValueType = PomdpValueType, typename BeliefMdpValueType = PomdpValueType, typename PolicyValueType = BeliefMdpValueType>
beliefs::BeliefBasedModelCheckerResult< BeliefMdpValueType, PolicyValueType > storm::pomdp::api::verifyWithBeliefUnfolding ( storm::models::sparse::Pomdp< PomdpValueType > const & pomdp,
storm::logic::Formula const & formula,
beliefs::BeliefBasedModelCheckerOptions< BeliefMdpValueType > const & options )

Uses a default Environment; otherwise identical to the environment-taking overload.

Definition at line 69 of file verification.h.

◆ verifyWithBeliefUnfolding< double, double, double >()

◆ verifyWithBeliefUnfolding< double, double, double, storm::RationalNumber >()

template beliefs::BeliefBasedModelCheckerResult< double, storm::RationalNumber > storm::pomdp::api::verifyWithBeliefUnfolding< double, double, double, storm::RationalNumber > ( storm::Environment const & ,
storm::models::sparse::Pomdp< double > const & ,
storm::logic::Formula const & ,
beliefs::BeliefBasedModelCheckerOptions< double > const &  )

◆ verifyWithBeliefUnfolding< double, double, storm::RationalNumber >()

template beliefs::BeliefBasedModelCheckerResult< storm::RationalNumber > storm::pomdp::api::verifyWithBeliefUnfolding< double, double, storm::RationalNumber > ( storm::Environment const & ,
storm::models::sparse::Pomdp< double > const & ,
storm::logic::Formula const & ,
beliefs::BeliefBasedModelCheckerOptions< storm::RationalNumber > const &  )

◆ verifyWithBeliefUnfolding< double, storm::RationalNumber, double >()

template beliefs::BeliefBasedModelCheckerResult< double > storm::pomdp::api::verifyWithBeliefUnfolding< double, storm::RationalNumber, double > ( storm::Environment const & ,
storm::models::sparse::Pomdp< double > const & ,
storm::logic::Formula const & ,
beliefs::BeliefBasedModelCheckerOptions< double > const &  )

◆ verifyWithBeliefUnfolding< storm::RationalNumber, storm::RationalNumber, double >()

template beliefs::BeliefBasedModelCheckerResult< double > storm::pomdp::api::verifyWithBeliefUnfolding< storm::RationalNumber, storm::RationalNumber, double > ( storm::Environment const & ,
storm::models::sparse::Pomdp< storm::RationalNumber > const & ,
storm::logic::Formula const & ,
beliefs::BeliefBasedModelCheckerOptions< double > const &  )

◆ verifyWithBeliefUnfolding< storm::RationalNumber, storm::RationalNumber, storm::RationalNumber >()

template beliefs::BeliefBasedModelCheckerResult< storm::RationalNumber > storm::pomdp::api::verifyWithBeliefUnfolding< storm::RationalNumber, storm::RationalNumber, storm::RationalNumber > ( storm::Environment const & ,
storm::models::sparse::Pomdp< storm::RationalNumber > const & ,
storm::logic::Formula const & ,
beliefs::BeliefBasedModelCheckerOptions< storm::RationalNumber > const &  )