You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.4 KiB

  1. ***************
  2. Building Models
  3. ***************
  4. Background
  5. =====================
  6. Storm supports a wide range of formalisms. Stormpy can be used to build models from some of these formalisms.
  7. Moreover, during construction, various options can be set. This document yields information about the most important options.
  8. Building different formalisms
  9. ===============================
  10. We use some standard examples::
  11. >>> import stormpy.examples
  12. >>> import stormpy.examples.files
  13. Storm supports the DRN format.
  14. From this, models can be built directly::
  15. >>> path = stormpy.examples.files.drn_ctmc_dft
  16. >>> model = stormpy.build_model_from_drn(path)
  17. >>> print(model.model_type)
  18. ModelType.CTMC
  19. And the same for parametric models::
  20. >>> path = stormpy.examples.files.drn_pdtmc_die
  21. >>> model = stormpy.build_parametric_model_from_drn(path)
  22. >>> print(model.model_type)
  23. ModelType.DTMC
  24. Another option are JANI descriptions. These are another high-level description format.
  25. Building models from JANI is done in two steps. First the Jani-description is parsed, and then the model is built from this description.
  26. >>> path = stormpy.examples.files.jani_dtmc_die
  27. >>> jani_program, properties = stormpy.parse_jani_model(path)
  28. >>> model = stormpy.build_model(jani_program)
  29. >>> print(model.model_type)
  30. ModelType.DTMC
  31. Notice that parsing JANI files also returns properties. In JANI, properties can be embedded in the model file.