example.gno
0.96 Kb ยท 31 lines
1package pflow
2
3var frame = `
4 {
5 "gnoMark": "petrinet",
6 "petrinet": {
7 "modelType": "PetriNet",
8 "version": "v1",
9 "tokens": ["black"],
10 "places": {
11 "place0": { "offset": 0, "initial": [1], "capacity": [3], "x": 130, "y": 207 }
12 },
13 "transitions": {
14 "txn0": { "x": 46, "y": 116 },
15 "txn1": { "x": 227, "y": 112 },
16 "txn2": { "x": 43, "y": 307 },
17 "txn3": { "x": 235, "y": 306 }
18 },
19 "arcs": [
20 { "source": "txn0", "target": "place0", "weight": [1] },
21 { "source": "place0", "target": "txn1", "weight": [3] },
22 { "source": "txn2", "target": "place0", "weight": [3], "inhibit": true },
23 { "source": "place0", "target": "txn3", "weight": [1], "inhibit": true }
24 ]
25 }
26 }
27`
28
29func RenderExample(path string) string {
30 return "## Example Model\n```gnomark\n" + frame + "\n```"
31}