The source code and dockerfile for the GSW2024 AI Lab.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

21 lines
675 B

4 weeks ago
  1. import stormpy
  2. import stormpy.gspn
  3. import stormpy.examples
  4. import stormpy.examples.files
  5. def example_gspns_01():
  6. # Load a GSPN from file (PNML format)
  7. import_path = stormpy.examples.files.gspn_pnml_simple
  8. gspn_parser = stormpy.gspn.GSPNParser()
  9. gspn = gspn_parser.parse(import_path)
  10. print("Name of GSPN: {}.".format(gspn.get_name()))
  11. print("Number of places: {}.".format(gspn.get_number_of_places()))
  12. print("Number of immediate transitions: {}.".format(gspn.get_number_of_immediate_transitions()))
  13. print("Number of timed transitions: {}.".format(gspn.get_number_of_timed_transitions()))
  14. if __name__ == '__main__':
  15. example_gspns_01()