SparseMdp

class SparseMdp[ValueType](other_model: stormpy.models.SparseMdp[ValueType])
class SparseMdp[ValueType](components, type: stormpy.models.ModelType = <ModelType.MDP: 2>)

MDP in sparse representation

Template arguments:

  • ValueType (type)

Available specializations:

  • SparseMdp[float]

  • SparseMdp[stormpy.numbers.Rational]

  • SparseMdp[stormpy.numbers.Interval]

  • SparseMdp[stormpy.numbers.RationalFunction]

  • SparseMdp[stormpy.numbers.RationalInterval]

Construction

The specialization can be inferred from the first positional constructor argument (alternatively, the components or other_model keyword argument).

Members

SparseMdp.add_reward_model(self: stormpy.models.SparseModel[ValueType], arg0: str, arg1) → None
SparseMdp.apply_scheduler(
self: stormpy.models.SparseMdp[ValueType],
scheduler,
drop_unreachable_states: bool = True,
) → stormpy.models.SparseModel[ValueType]

apply scheduler

property SparseMdp.backward_transition_matrix

Backward transition matrix

property SparseMdp.choice_labeling

get choice labelling

property SparseMdp.choice_origins
SparseMdp.collect_all_parameters(
self: stormpy.models.SparseModel[stormpy.numbers.RationalFunction],
) → set[stormpy.numbers.Variable]

Available only for: SparseMdp[stormpy.numbers.RationalFunction].

Collect all parameters

SparseMdp.collect_probability_parameters(
self: stormpy.models.SparseModel[stormpy.numbers.RationalFunction],
) → set[stormpy.numbers.Variable]

Available only for: SparseMdp[stormpy.numbers.RationalFunction].

Collect probability parameters

SparseMdp.collect_rate_parameters(
self: stormpy.models.SparseModel[stormpy.numbers.RationalFunction],
) → set[stormpy.numbers.Variable]

Available only for: SparseMdp[stormpy.numbers.RationalFunction].

Collect rate parameters

SparseMdp.collect_reward_parameters(
self: stormpy.models.SparseModel[stormpy.numbers.RationalFunction],
) → set[stormpy.numbers.Variable]

Available only for: SparseMdp[stormpy.numbers.RationalFunction].

Collect reward parameters

SparseMdp.get_choice_index(
self: stormpy.models.SparseMdp[ValueType],
state: SupportsInt | SupportsIndex,
action_offset: SupportsInt | SupportsIndex,
) → int

gets the choice index for the offset action from the given state.

SparseMdp.get_labels_of_state(
self: stormpy.models.SparseModel[ValueType],
state: SupportsInt | SupportsIndex,
) → set[str]

Get labels of state

SparseMdp.get_nr_available_actions(
self: stormpy.models.SparseMdp[ValueType],
state: SupportsInt | SupportsIndex,
) → int
SparseMdp.get_reward_model(self: stormpy.models.SparseModel[ValueType], name: str)

Reward model

SparseMdp.get_states_with_parameter(
self: stormpy.models.SparseModel[stormpy.numbers.RationalFunction],
parameter: stormpy.numbers.Variable,
) → stormpy.datastructures.BitVector

Available only for: SparseMdp[stormpy.numbers.RationalFunction].

Find states with a particular parameter

SparseMdp.has_choice_labeling(self: stormpy.models.SparseModel[ValueType]) → bool

Does the model have an associated choice labelling?

SparseMdp.has_choice_origins(self: stormpy.models.SparseModel[ValueType]) → bool

has choice origins?

property SparseMdp.has_parameters

Flag whether model has parameters

SparseMdp.has_reward_model(self: stormpy.models.SparseModel[ValueType], name: str) → bool
SparseMdp.has_state_valuations(self: stormpy.models.SparseModel[ValueType]) → bool

has state valuation?

property SparseMdp.initial_states

Initial states

property SparseMdp.initial_states_as_bitvector
property SparseMdp.is_discrete_time_model

Flag whether the model is a discrete time model

property SparseMdp.is_exact

Flag whether model is exact

property SparseMdp.is_nondeterministic_model

Flag whether the model contains nondeterminism

property SparseMdp.is_partially_observable

Flag whether the model has observation labels

SparseMdp.is_sink_state(
self: stormpy.models.SparseModel[ValueType],
state: SupportsInt | SupportsIndex,
) → bool
property SparseMdp.is_sparse_model

Flag whether the model is stored as a sparse model

property SparseMdp.is_symbolic_model

Flag whether the model is stored using decision diagrams

property SparseMdp.labeling

Labels

property SparseMdp.model_type

Model type

property SparseMdp.nondeterministic_choice_indices
property SparseMdp.nr_choices

Number of choices

property SparseMdp.nr_states

Number of states

property SparseMdp.nr_transitions

Number of transitions

SparseMdp.reduce_to_state_based_rewards(self: stormpy.models.SparseModel[ValueType]) → None
property SparseMdp.reward_models

Reward models

SparseMdp.set_initial_states(
self: stormpy.models.SparseModel[ValueType],
states: stormpy.datastructures.BitVector,
) → None

Set initial states

property SparseMdp.state_valuations

state valuations

property SparseMdp.states

Get states

property SparseMdp.supports_parameters

Flag whether model supports parameters

property SparseMdp.supports_uncertainty

Flag whether model supports uncertainty via intervals

SparseMdp.to_dot(self: stormpy.models.SparseModel[ValueType]) → str

Write dot to a string

property SparseMdp.transition_matrix

Transition matrix