From 42d2f1be01cc6b6ecc08340d28a42eed26fbf702 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Sun, 24 May 2020 17:10:18 +0200 Subject: [PATCH] Small revision in GSPN doc --- doc/source/doc/gspns.rst | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/doc/source/doc/gspns.rst b/doc/source/doc/gspns.rst index e02769e..1af0fae 100644 --- a/doc/source/doc/gspns.rst +++ b/doc/source/doc/gspns.rst @@ -4,10 +4,7 @@ Generalized Stochastic Petri Nets Loading GSPNs ============== - -.. - .. seealso:: `01-gspn.py `_ -.. +.. seealso:: `01-gspn.py `_ Generalized stochastic Petri nets can be given either in the PNPRO format or in the PNML format. @@ -35,12 +32,10 @@ After loading, we can display some properties of the GSPN:: Building GSPNs ============================= -.. - todo .. seealso:: `02-gspn.py `_ -.. +.. seealso:: `02-gspn.py `_ -In the following, we describe how to construct GSPNs via the GSPNBuilder. -First, we create an instance of the GSPNBuilder and set the name of the GSPN:: +In the following, we describe how to construct GSPNs via the ``GSPNBuilder``. +First, we create an instance of the ``GSPNBuilder`` and set the name of the GSPN:: >>> builder = stormpy.gspn.GSPNBuilder() >>> builder.set_name("my_gspn") @@ -68,7 +63,7 @@ Next, we add two places to the GSPN and set their layouts:: >>> p2_layout = stormpy.gspn.LayoutInfo(18.5, 2.0) >>> builder.set_place_layout_info(place_2, p2_layout) -Places and transitions can be linked by output, inhibition or input arcs. +Places and transitions can be linked by input, output and inhibition arcs. We add the arcs of our GSPN as follows:: >>> builder.add_output_arc(it_1, place_1) @@ -80,7 +75,7 @@ We can now build the GSPN:: >>> gspn = builder.build_gspn() -After building, we can export the GSPN. +After building, we export the GSPN. GSPNs can be saved in the PNPRO format via ``export_gspn_pnpro_file(path)`` and in the PNML format via ``export_gspn_pnml_file(path)``. We export the GSPN into the PNPRO format::