POMDP Solver
Public Member Functions | Public Attributes | List of all members
pomdp_solver.POMDP Class Reference

Class to build and explore a POMDP model. More...

Public Member Functions

def __init__ (self)
 The constuctor.
 
def load_model (self, model_file)
 Load a POMDP model. More...
 
def parse_properties (self, properties)
 Parse property string. More...
 
def set_undefined_constants (self, constants)
 Instantiate undefined constants of a pomdp model. More...
 
def build_model (self)
 Build the POMDP model.
 
def build_pmc (self, nr_memory_state, pomdp_memory_pattern=stormpy.pomdp.PomdpMemoryPattern.selective_counter, fsc_application_mode=stormpy.pomdp.PomdpFscApplicationMode.simple_linear)
 Unfold memory into the POMDP model and apply a FSC to obtain a pMC. More...
 
def inspect_model (self)
 Inspect the POMDP model for invalid or missing components.
 
def has_transition_matrix (self)
 Check if the POMDP model has a transition matrix. More...
 
def has_state_labels (self)
 Check if the POMDP model has a state labels. More...
 
def has_reward_model (self)
 Check if the POMDP model has a reward model. More...
 
def has_undefined_constants (self)
 Check if the POMDP model has undefined constants. More...
 
def get_model_type (self)
 Get the POMDP model type. More...
 
def get_states (self)
 Get the states of the POMDP model. More...
 
def get_nr_states (self)
 Get the number of states in the POMDP model. More...
 
def get_state_labels (self)
 Get the state labels of the POMDP model. More...
 
def get_reward_models (self)
 Get the reward model of the POMDP model. More...
 
def get_observations (self)
 Get the observations of the POMDP model. More...
 
def print_model_type (self)
 Print the model type.
 
def print_nr_states (self)
 Print the number of states.
 
def print_actions (self)
 Print the actions.
 
def print_transitions (self)
 Print the transitions of the model.
 
def print_observations (self)
 Print the observations of the model.
 
def print_rewards (self)
 Print the reward model.
 
def print_state_reward (self, reward)
 Print the state rewards.
 
def print_state_action_reward (self, reward)
 Print the state action rewards.
 
def print_constants (self)
 Print constants of the model.
 

Public Attributes

 file_type
 Can be drn, prism or jani. More...
 
 file_path
 Path to the model.
 
 properties
 
 program
 Parsed pomdp model.
 
 model
 Build pomdp model. More...
 

Detailed Description

Class to build and explore a POMDP model.

Supports DRN and Prism models. The use of Jani files has not been tested to give any guarantees.

Member Function Documentation

◆ build_pmc()

def pomdp_solver.POMDP.build_pmc (   self,
  nr_memory_state,
  pomdp_memory_pattern = stormpy.pomdp.PomdpMemoryPattern.selective_counter,
  fsc_application_mode = stormpy.pomdp.PomdpFscApplicationMode.simple_linear 
)

Unfold memory into the POMDP model and apply a FSC to obtain a pMC.

Parameters
nr_memory_stateNumber of memory nodes.
pomdp_memory_patternMemory pattern.
fsc_application_modeApplication mode for the FSC.
Returns
A pMC model.

◆ get_model_type()

def pomdp_solver.POMDP.get_model_type (   self)

Get the POMDP model type.

Returns
Model type.

◆ get_nr_states()

def pomdp_solver.POMDP.get_nr_states (   self)

Get the number of states in the POMDP model.

Returns
Number of states.

◆ get_observations()

def pomdp_solver.POMDP.get_observations (   self)

Get the observations of the POMDP model.

Returns
List of observations.

◆ get_reward_models()

def pomdp_solver.POMDP.get_reward_models (   self)

Get the reward model of the POMDP model.

Returns
reward model.

◆ get_state_labels()

def pomdp_solver.POMDP.get_state_labels (   self)

Get the state labels of the POMDP model.

Returns
List of state labels.

◆ get_states()

def pomdp_solver.POMDP.get_states (   self)

Get the states of the POMDP model.

Returns
List of states.

◆ has_reward_model()

def pomdp_solver.POMDP.has_reward_model (   self)

Check if the POMDP model has a reward model.

Returns
Boolean.

◆ has_state_labels()

def pomdp_solver.POMDP.has_state_labels (   self)

Check if the POMDP model has a state labels.

Returns
Boolean.

◆ has_transition_matrix()

def pomdp_solver.POMDP.has_transition_matrix (   self)

Check if the POMDP model has a transition matrix.

Returns
Boolean.

◆ has_undefined_constants()

def pomdp_solver.POMDP.has_undefined_constants (   self)

Check if the POMDP model has undefined constants.

Returns
Boolean.

◆ load_model()

def pomdp_solver.POMDP.load_model (   self,
  model_file 
)

Load a POMDP model.

Parameters
model_filePath to a pomdp model

◆ parse_properties()

def pomdp_solver.POMDP.parse_properties (   self,
  properties 
)

Parse property string.

Parameters
propertiesProperty string

◆ set_undefined_constants()

def pomdp_solver.POMDP.set_undefined_constants (   self,
  constants 
)

Instantiate undefined constants of a pomdp model.

Parameters
constantsa String containing a variable name and its value(e.g. "K=4, T=2")

Member Data Documentation

◆ file_type

pomdp_solver.POMDP.file_type

Can be drn, prism or jani.

Different build functions depending on the model format.

Parse the pomdp model.

Obtain the file type from the path.

◆ model

pomdp_solver.POMDP.model

Build pomdp model.

Make POMDP model simple.

Unfold memory into the POMDP model.

Make the pomdp model canonical.

Defining build options to ensure that choice labels remain.


The documentation for this class was generated from the following file: