build_model_from_drn

build_model_from_drn[ValueType](
path: PathLike,
*,
options: stormpy.io.DirectEncodingParserOptions | None = None,
)

Select a specialization with build_model_from_drn[ValueType](...).

The default specialization is build_model_from_drn[float].

Template arguments:

  • ValueType (type)

Supported specializations: build_model_from_drn[float], build_model_from_drn[stormpy.numbers.Rational], build_model_from_drn[stormpy.numbers.RationalFunction], build_model_from_drn[stormpy.numbers.Interval], build_model_from_drn[stormpy.numbers.RationalInterval].

Build a model in sparse representation from a file in the explicit DRN format.

The value type of the model is selected via subscript, e.g. build_model_from_drn[stormpy.Rational](path): float (default), Rational (exact), RationalFunction (parametric), Interval or RationalInterval (exact interval).

Parameters:
  • path – Path to the DRN file (string or path-like object).

  • options – (optional) Options for the DRN parser.

Returns:

The model in sparse representation.

Raises:

TypeError – If the value type is not supported.