dzakybd commited on
Commit
deefdbe
·
verified ·
1 Parent(s): aa0efbd

Showcase: precomputed pid-parser results on synthetic PID2Graph sheets

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ data/synth-0/drawing.jpg filter=lfs diff=lfs merge=lfs -text
37
+ data/synth-1/drawing.jpg filter=lfs diff=lfs merge=lfs -text
38
+ data/synth-2/drawing.jpg filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,10 +1,18 @@
1
  ---
2
- title: Pid Parser
3
- emoji: 📉
4
- colorFrom: gray
5
- colorTo: purple
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
1
  ---
2
+ title: pid-parser
3
+ emoji: 🛠️
4
+ colorFrom: green
5
+ colorTo: gray
6
  sdk: static
7
  pinned: false
8
+ license: cc-by-sa-4.0
9
+ short_description: P&ID image to tables and a graph with a vision LLM
10
  ---
11
 
12
+ # pid-parser showcase
13
+
14
+ Precomputed results of [pid-parser](https://github.com/dzakybd/pid-parser) on three synthetic P&ID sheets: the drawing with what the model read, the graph, the tables, and the SQL, CSV, GraphML and Cypher exports. The page calls no model.
15
+
16
+ Install the skill in your own agent with `npx skills add dzakybd/pid-parser`.
17
+
18
+ Drawings: synthetic sheets from [PID2Graph](https://zenodo.org/records/14803338) ([paper](https://arxiv.org/abs/2411.13929)), CC BY-SA 4.0. The drawings and the outputs derived from them are shared under CC BY-SA 4.0. The pid-parser code is MIT licensed.
data/sheets.json ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": "synth-0",
4
+ "title": "Synthetic sheet 1",
5
+ "model": "gpt-6.1-sol",
6
+ "effort": "low",
7
+ "seconds": 357,
8
+ "score": {
9
+ "symbols": {
10
+ "pred": 21,
11
+ "gt": 20,
12
+ "matched": 20,
13
+ "precision": 0.9523809523809523,
14
+ "recall": 1.0,
15
+ "f1": 0.975609756097561,
16
+ "class_accuracy": 0.7
17
+ },
18
+ "connections": {
19
+ "pred": 21,
20
+ "gt": 38,
21
+ "correct": 20,
22
+ "precision": 0.9523809523809523,
23
+ "recall": 0.5263157894736842,
24
+ "f1": 0.6779661016949152
25
+ }
26
+ }
27
+ },
28
+ {
29
+ "id": "synth-1",
30
+ "title": "Synthetic sheet 2",
31
+ "model": "gpt-6.1-sol",
32
+ "effort": "low",
33
+ "seconds": 232,
34
+ "score": {
35
+ "symbols": {
36
+ "pred": 23,
37
+ "gt": 23,
38
+ "matched": 23,
39
+ "precision": 1.0,
40
+ "recall": 1.0,
41
+ "f1": 1.0,
42
+ "class_accuracy": 0.6956521739130435
43
+ },
44
+ "connections": {
45
+ "pred": 27,
46
+ "gt": 27,
47
+ "correct": 27,
48
+ "precision": 1.0,
49
+ "recall": 1.0,
50
+ "f1": 1.0
51
+ }
52
+ }
53
+ },
54
+ {
55
+ "id": "synth-2",
56
+ "title": "Synthetic sheet 3",
57
+ "model": "gpt-6.1-sol",
58
+ "effort": "low",
59
+ "seconds": 224,
60
+ "score": {
61
+ "symbols": {
62
+ "pred": 23,
63
+ "gt": 23,
64
+ "matched": 23,
65
+ "precision": 1.0,
66
+ "recall": 1.0,
67
+ "f1": 1.0,
68
+ "class_accuracy": 0.8260869565217391
69
+ },
70
+ "connections": {
71
+ "pred": 50,
72
+ "gt": 74,
73
+ "correct": 50,
74
+ "precision": 1.0,
75
+ "recall": 0.6756756756756757,
76
+ "f1": 0.8064516129032258
77
+ }
78
+ }
79
+ }
80
+ ]
data/synth-0/drawing.jpg ADDED

Git LFS Details

  • SHA256: 2c4ab377f4e80cadd61b45a80fe2834dc754146cd24af4ecf90299672b13e25d
  • Pointer size: 131 Bytes
  • Size of remote file: 140 kB
data/synth-0/graph.json ADDED
@@ -0,0 +1,370 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image": {
3
+ "file": "drawing.jpg",
4
+ "width": 7000,
5
+ "height": 4500
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "s1",
10
+ "type": "control_valve",
11
+ "tag": null,
12
+ "bbox": [
13
+ 5050,
14
+ 1895,
15
+ 5125,
16
+ 2035
17
+ ]
18
+ },
19
+ {
20
+ "id": "s2",
21
+ "type": "vessel",
22
+ "tag": null,
23
+ "bbox": [
24
+ 3105.112,
25
+ 1848.2240000000002,
26
+ 3261.4230000000002,
27
+ 2079.191
28
+ ]
29
+ },
30
+ {
31
+ "id": "s4",
32
+ "type": "equipment",
33
+ "tag": null,
34
+ "bbox": [
35
+ 6234.776,
36
+ 534.2570000000001,
37
+ 6475.075,
38
+ 662.572
39
+ ]
40
+ },
41
+ {
42
+ "id": "s5",
43
+ "type": "equipment",
44
+ "tag": null,
45
+ "bbox": [
46
+ 5616.531,
47
+ 1215.4930000000002,
48
+ 5821.835,
49
+ 1348.4740000000002
50
+ ]
51
+ },
52
+ {
53
+ "id": "s6",
54
+ "type": "heat_exchanger",
55
+ "tag": null,
56
+ "bbox": [
57
+ 4373.153,
58
+ 3647.455,
59
+ 4529.464,
60
+ 3810.7650000000003
61
+ ]
62
+ },
63
+ {
64
+ "id": "s7",
65
+ "type": "fitting",
66
+ "tag": null,
67
+ "bbox": [
68
+ 1236.49,
69
+ 2585.452,
70
+ 1322.8110000000001,
71
+ 2823.418
72
+ ]
73
+ },
74
+ {
75
+ "id": "s8",
76
+ "type": "vessel",
77
+ "tag": null,
78
+ "bbox": [
79
+ 4398.816,
80
+ 3299.838,
81
+ 4506.134,
82
+ 3479.4790000000003
83
+ ]
84
+ },
85
+ {
86
+ "id": "s9",
87
+ "type": "off_page",
88
+ "tag": null,
89
+ "bbox": [
90
+ 1838.4040000000002,
91
+ 4013.736,
92
+ 1987.7160000000001,
93
+ 4125.72
94
+ ]
95
+ },
96
+ {
97
+ "id": "s10",
98
+ "type": "off_page",
99
+ "tag": null,
100
+ "bbox": [
101
+ 5644.527,
102
+ 886.5400000000001,
103
+ 5798.505,
104
+ 993.8580000000001
105
+ ]
106
+ },
107
+ {
108
+ "id": "s11",
109
+ "type": "equipment",
110
+ "tag": null,
111
+ "bbox": [
112
+ 3771.239,
113
+ 2966.219,
114
+ 3864.559,
115
+ 3129.529
116
+ ]
117
+ },
118
+ {
119
+ "id": "s12",
120
+ "type": "valve",
121
+ "tag": null,
122
+ "bbox": [
123
+ 2475.202,
124
+ 3005.392,
125
+ 2622.181,
126
+ 3084.714
127
+ ]
128
+ },
129
+ {
130
+ "id": "s13",
131
+ "type": "valve",
132
+ "tag": null,
133
+ "bbox": [
134
+ 3130.775,
135
+ 2653.597,
136
+ 3235.76,
137
+ 2756.249
138
+ ]
139
+ },
140
+ {
141
+ "id": "s14",
142
+ "type": "pump",
143
+ "tag": null,
144
+ "bbox": [
145
+ 3780.571,
146
+ 2293.827,
147
+ 3855.227,
148
+ 2433.807
149
+ ]
150
+ },
151
+ {
152
+ "id": "s15",
153
+ "type": "valve",
154
+ "tag": null,
155
+ "bbox": [
156
+ 2503.1980000000003,
157
+ 2308.313,
158
+ 2594.1850000000004,
159
+ 2417.964
160
+ ]
161
+ },
162
+ {
163
+ "id": "s16",
164
+ "type": "fitting",
165
+ "tag": null,
166
+ "bbox": [
167
+ 6286.102,
168
+ 1929.391,
169
+ 6423.749,
170
+ 2001.7140000000002
171
+ ]
172
+ },
173
+ {
174
+ "id": "s17",
175
+ "type": "heat_exchanger",
176
+ "tag": null,
177
+ "bbox": [
178
+ 4415.147,
179
+ 1556.5990000000002,
180
+ 4487.47,
181
+ 1691.913
182
+ ]
183
+ },
184
+ {
185
+ "id": "s18",
186
+ "type": "fitting",
187
+ "tag": null,
188
+ "bbox": [
189
+ 578.5840000000001,
190
+ 905.2040000000001,
191
+ 711.565,
192
+ 975.1940000000001
193
+ ]
194
+ },
195
+ {
196
+ "id": "s19",
197
+ "type": "fitting",
198
+ "tag": null,
199
+ "bbox": [
200
+ 5019.283,
201
+ 907.537,
202
+ 5154.597,
203
+ 975.1940000000001
204
+ ]
205
+ },
206
+ {
207
+ "id": "s20",
208
+ "type": "off_page",
209
+ "tag": null,
210
+ "bbox": [
211
+ 618.245,
212
+ 3682.45,
213
+ 669.571,
214
+ 3780.436
215
+ ]
216
+ },
217
+ {
218
+ "id": "s21",
219
+ "type": "fitting",
220
+ "tag": "G",
221
+ "bbox": [
222
+ 1875.7320000000002,
223
+ 566.9190000000001,
224
+ 1952.7210000000002,
225
+ 629.9100000000001
226
+ ]
227
+ },
228
+ {
229
+ "id": "s22",
230
+ "type": "equipment",
231
+ "tag": null,
232
+ "bbox": [
233
+ 5005,
234
+ 1572,
235
+ 5155,
236
+ 1675
237
+ ]
238
+ },
239
+ {
240
+ "id": "j1",
241
+ "type": "junction",
242
+ "tag": null,
243
+ "bbox": [
244
+ 2540,
245
+ 1957,
246
+ 2556,
247
+ 1973
248
+ ]
249
+ },
250
+ {
251
+ "id": "j2",
252
+ "type": "junction",
253
+ "tag": null,
254
+ "bbox": [
255
+ 3175,
256
+ 2355,
257
+ 3191,
258
+ 2371
259
+ ]
260
+ }
261
+ ],
262
+ "edges": [
263
+ {
264
+ "source": "s21",
265
+ "target": "s4",
266
+ "kind": "process"
267
+ },
268
+ {
269
+ "source": "s4",
270
+ "target": "s16",
271
+ "kind": "process"
272
+ },
273
+ {
274
+ "source": "s16",
275
+ "target": "s1",
276
+ "kind": "process"
277
+ },
278
+ {
279
+ "source": "s18",
280
+ "target": "s19",
281
+ "kind": "process"
282
+ },
283
+ {
284
+ "source": "s19",
285
+ "target": "s10",
286
+ "kind": "process"
287
+ },
288
+ {
289
+ "source": "s10",
290
+ "target": "s5",
291
+ "kind": "process"
292
+ },
293
+ {
294
+ "source": "s5",
295
+ "target": "s7",
296
+ "kind": "process"
297
+ },
298
+ {
299
+ "source": "s7",
300
+ "target": "s13",
301
+ "kind": "process"
302
+ },
303
+ {
304
+ "source": "s13",
305
+ "target": "j2",
306
+ "kind": "process"
307
+ },
308
+ {
309
+ "source": "s2",
310
+ "target": "j2",
311
+ "kind": "process"
312
+ },
313
+ {
314
+ "source": "j2",
315
+ "target": "s14",
316
+ "kind": "process"
317
+ },
318
+ {
319
+ "source": "s14",
320
+ "target": "s11",
321
+ "kind": "process"
322
+ },
323
+ {
324
+ "source": "s11",
325
+ "target": "s12",
326
+ "kind": "process"
327
+ },
328
+ {
329
+ "source": "s15",
330
+ "target": "j1",
331
+ "kind": "process"
332
+ },
333
+ {
334
+ "source": "j1",
335
+ "target": "s17",
336
+ "kind": "process"
337
+ },
338
+ {
339
+ "source": "s17",
340
+ "target": "s8",
341
+ "kind": "process"
342
+ },
343
+ {
344
+ "source": "s21",
345
+ "target": "s9",
346
+ "kind": "process"
347
+ },
348
+ {
349
+ "source": "s22",
350
+ "target": "s1",
351
+ "kind": "signal"
352
+ },
353
+ {
354
+ "source": "j1",
355
+ "target": "s2",
356
+ "kind": "signal"
357
+ },
358
+ {
359
+ "source": "s8",
360
+ "target": "s6",
361
+ "kind": "signal"
362
+ },
363
+ {
364
+ "source": "s20",
365
+ "target": "s6",
366
+ "kind": "signal",
367
+ "notes": "Mixed line styling: dashed from s20 to x\u22481914 at y\u22483730, solid thereafter to s6. Classified signal because of dashed source segment; process/signal semantics unresolved. Crossing with s21\u2013s9 is not connected (no dot or tee)."
368
+ }
369
+ ]
370
+ }
data/synth-0/out/edges.csv ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ source,target,kind,line
2
+ s21,s4,process,
3
+ s4,s16,process,
4
+ s16,s1,process,
5
+ s18,s19,process,
6
+ s19,s10,process,
7
+ s10,s5,process,
8
+ s5,s7,process,
9
+ s7,s13,process,
10
+ s13,j2,process,
11
+ s2,j2,process,
12
+ j2,s14,process,
13
+ s14,s11,process,
14
+ s11,s12,process,
15
+ s15,j1,process,
16
+ j1,s17,process,
17
+ s17,s8,process,
18
+ s21,s9,process,
19
+ s22,s1,signal,
20
+ j1,s2,signal,
21
+ s8,s6,signal,
22
+ s20,s6,signal,
data/synth-0/out/graph.cypher ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CREATE (:Component {id: 's1', type: 'control_valve', x1: 5050, y1: 1895, x2: 5125, y2: 2035});
2
+ CREATE (:Component {id: 's2', type: 'vessel', x1: 3105.112, y1: 1848.2240000000002, x2: 3261.4230000000002, y2: 2079.191});
3
+ CREATE (:Component {id: 's4', type: 'equipment', x1: 6234.776, y1: 534.2570000000001, x2: 6475.075, y2: 662.572});
4
+ CREATE (:Component {id: 's5', type: 'equipment', x1: 5616.531, y1: 1215.4930000000002, x2: 5821.835, y2: 1348.4740000000002});
5
+ CREATE (:Component {id: 's6', type: 'heat_exchanger', x1: 4373.153, y1: 3647.455, x2: 4529.464, y2: 3810.7650000000003});
6
+ CREATE (:Component {id: 's7', type: 'fitting', x1: 1236.49, y1: 2585.452, x2: 1322.8110000000001, y2: 2823.418});
7
+ CREATE (:Component {id: 's8', type: 'vessel', x1: 4398.816, y1: 3299.838, x2: 4506.134, y2: 3479.4790000000003});
8
+ CREATE (:Component {id: 's9', type: 'off_page', x1: 1838.4040000000002, y1: 4013.736, x2: 1987.7160000000001, y2: 4125.72});
9
+ CREATE (:Component {id: 's10', type: 'off_page', x1: 5644.527, y1: 886.5400000000001, x2: 5798.505, y2: 993.8580000000001});
10
+ CREATE (:Component {id: 's11', type: 'equipment', x1: 3771.239, y1: 2966.219, x2: 3864.559, y2: 3129.529});
11
+ CREATE (:Component {id: 's12', type: 'valve', x1: 2475.202, y1: 3005.392, x2: 2622.181, y2: 3084.714});
12
+ CREATE (:Component {id: 's13', type: 'valve', x1: 3130.775, y1: 2653.597, x2: 3235.76, y2: 2756.249});
13
+ CREATE (:Component {id: 's14', type: 'pump', x1: 3780.571, y1: 2293.827, x2: 3855.227, y2: 2433.807});
14
+ CREATE (:Component {id: 's15', type: 'valve', x1: 2503.1980000000003, y1: 2308.313, x2: 2594.1850000000004, y2: 2417.964});
15
+ CREATE (:Component {id: 's16', type: 'fitting', x1: 6286.102, y1: 1929.391, x2: 6423.749, y2: 2001.7140000000002});
16
+ CREATE (:Component {id: 's17', type: 'heat_exchanger', x1: 4415.147, y1: 1556.5990000000002, x2: 4487.47, y2: 1691.913});
17
+ CREATE (:Component {id: 's18', type: 'fitting', x1: 578.5840000000001, y1: 905.2040000000001, x2: 711.565, y2: 975.1940000000001});
18
+ CREATE (:Component {id: 's19', type: 'fitting', x1: 5019.283, y1: 907.537, x2: 5154.597, y2: 975.1940000000001});
19
+ CREATE (:Component {id: 's20', type: 'off_page', x1: 618.245, y1: 3682.45, x2: 669.571, y2: 3780.436});
20
+ CREATE (:Component {id: 's21', type: 'fitting', tag: 'G', x1: 1875.7320000000002, y1: 566.9190000000001, x2: 1952.7210000000002, y2: 629.9100000000001});
21
+ CREATE (:Component {id: 's22', type: 'equipment', x1: 5005, y1: 1572, x2: 5155, y2: 1675});
22
+ CREATE (:Junction {id: 'j1', type: 'junction', x1: 2540, y1: 1957, x2: 2556, y2: 1973});
23
+ CREATE (:Junction {id: 'j2', type: 'junction', x1: 3175, y1: 2355, x2: 3191, y2: 2371});
24
+ MATCH (a {id: 's21'}), (b {id: 's4'}) CREATE (a)-[:PIPE]->(b);
25
+ MATCH (a {id: 's4'}), (b {id: 's16'}) CREATE (a)-[:PIPE]->(b);
26
+ MATCH (a {id: 's16'}), (b {id: 's1'}) CREATE (a)-[:PIPE]->(b);
27
+ MATCH (a {id: 's18'}), (b {id: 's19'}) CREATE (a)-[:PIPE]->(b);
28
+ MATCH (a {id: 's19'}), (b {id: 's10'}) CREATE (a)-[:PIPE]->(b);
29
+ MATCH (a {id: 's10'}), (b {id: 's5'}) CREATE (a)-[:PIPE]->(b);
30
+ MATCH (a {id: 's5'}), (b {id: 's7'}) CREATE (a)-[:PIPE]->(b);
31
+ MATCH (a {id: 's7'}), (b {id: 's13'}) CREATE (a)-[:PIPE]->(b);
32
+ MATCH (a {id: 's13'}), (b {id: 'j2'}) CREATE (a)-[:PIPE]->(b);
33
+ MATCH (a {id: 's2'}), (b {id: 'j2'}) CREATE (a)-[:PIPE]->(b);
34
+ MATCH (a {id: 'j2'}), (b {id: 's14'}) CREATE (a)-[:PIPE]->(b);
35
+ MATCH (a {id: 's14'}), (b {id: 's11'}) CREATE (a)-[:PIPE]->(b);
36
+ MATCH (a {id: 's11'}), (b {id: 's12'}) CREATE (a)-[:PIPE]->(b);
37
+ MATCH (a {id: 's15'}), (b {id: 'j1'}) CREATE (a)-[:PIPE]->(b);
38
+ MATCH (a {id: 'j1'}), (b {id: 's17'}) CREATE (a)-[:PIPE]->(b);
39
+ MATCH (a {id: 's17'}), (b {id: 's8'}) CREATE (a)-[:PIPE]->(b);
40
+ MATCH (a {id: 's21'}), (b {id: 's9'}) CREATE (a)-[:PIPE]->(b);
41
+ MATCH (a {id: 's22'}), (b {id: 's1'}) CREATE (a)-[:SIGNAL]->(b);
42
+ MATCH (a {id: 'j1'}), (b {id: 's2'}) CREATE (a)-[:SIGNAL]->(b);
43
+ MATCH (a {id: 's8'}), (b {id: 's6'}) CREATE (a)-[:SIGNAL]->(b);
44
+ MATCH (a {id: 's20'}), (b {id: 's6'}) CREATE (a)-[:SIGNAL]->(b);
data/synth-0/out/graph.graphml ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <graphml xmlns="http://graphml.graphdrawing.org/xmlns">
3
+ <key id="node_type" for="node" attr.name="type" attr.type="string" />
4
+ <key id="node_tag" for="node" attr.name="tag" attr.type="string" />
5
+ <key id="node_x1" for="node" attr.name="x1" attr.type="double" />
6
+ <key id="node_y1" for="node" attr.name="y1" attr.type="double" />
7
+ <key id="node_x2" for="node" attr.name="x2" attr.type="double" />
8
+ <key id="node_y2" for="node" attr.name="y2" attr.type="double" />
9
+ <key id="edge_kind" for="edge" attr.name="kind" attr.type="string" />
10
+ <key id="edge_line" for="edge" attr.name="line" attr.type="string" />
11
+ <graph edgedefault="undirected">
12
+ <node id="s1">
13
+ <data key="node_type">control_valve</data>
14
+ <data key="node_x1">5050</data>
15
+ <data key="node_y1">1895</data>
16
+ <data key="node_x2">5125</data>
17
+ <data key="node_y2">2035</data>
18
+ </node>
19
+ <node id="s2">
20
+ <data key="node_type">vessel</data>
21
+ <data key="node_x1">3105.112</data>
22
+ <data key="node_y1">1848.2240000000002</data>
23
+ <data key="node_x2">3261.4230000000002</data>
24
+ <data key="node_y2">2079.191</data>
25
+ </node>
26
+ <node id="s4">
27
+ <data key="node_type">equipment</data>
28
+ <data key="node_x1">6234.776</data>
29
+ <data key="node_y1">534.2570000000001</data>
30
+ <data key="node_x2">6475.075</data>
31
+ <data key="node_y2">662.572</data>
32
+ </node>
33
+ <node id="s5">
34
+ <data key="node_type">equipment</data>
35
+ <data key="node_x1">5616.531</data>
36
+ <data key="node_y1">1215.4930000000002</data>
37
+ <data key="node_x2">5821.835</data>
38
+ <data key="node_y2">1348.4740000000002</data>
39
+ </node>
40
+ <node id="s6">
41
+ <data key="node_type">heat_exchanger</data>
42
+ <data key="node_x1">4373.153</data>
43
+ <data key="node_y1">3647.455</data>
44
+ <data key="node_x2">4529.464</data>
45
+ <data key="node_y2">3810.7650000000003</data>
46
+ </node>
47
+ <node id="s7">
48
+ <data key="node_type">fitting</data>
49
+ <data key="node_x1">1236.49</data>
50
+ <data key="node_y1">2585.452</data>
51
+ <data key="node_x2">1322.8110000000001</data>
52
+ <data key="node_y2">2823.418</data>
53
+ </node>
54
+ <node id="s8">
55
+ <data key="node_type">vessel</data>
56
+ <data key="node_x1">4398.816</data>
57
+ <data key="node_y1">3299.838</data>
58
+ <data key="node_x2">4506.134</data>
59
+ <data key="node_y2">3479.4790000000003</data>
60
+ </node>
61
+ <node id="s9">
62
+ <data key="node_type">off_page</data>
63
+ <data key="node_x1">1838.4040000000002</data>
64
+ <data key="node_y1">4013.736</data>
65
+ <data key="node_x2">1987.7160000000001</data>
66
+ <data key="node_y2">4125.72</data>
67
+ </node>
68
+ <node id="s10">
69
+ <data key="node_type">off_page</data>
70
+ <data key="node_x1">5644.527</data>
71
+ <data key="node_y1">886.5400000000001</data>
72
+ <data key="node_x2">5798.505</data>
73
+ <data key="node_y2">993.8580000000001</data>
74
+ </node>
75
+ <node id="s11">
76
+ <data key="node_type">equipment</data>
77
+ <data key="node_x1">3771.239</data>
78
+ <data key="node_y1">2966.219</data>
79
+ <data key="node_x2">3864.559</data>
80
+ <data key="node_y2">3129.529</data>
81
+ </node>
82
+ <node id="s12">
83
+ <data key="node_type">valve</data>
84
+ <data key="node_x1">2475.202</data>
85
+ <data key="node_y1">3005.392</data>
86
+ <data key="node_x2">2622.181</data>
87
+ <data key="node_y2">3084.714</data>
88
+ </node>
89
+ <node id="s13">
90
+ <data key="node_type">valve</data>
91
+ <data key="node_x1">3130.775</data>
92
+ <data key="node_y1">2653.597</data>
93
+ <data key="node_x2">3235.76</data>
94
+ <data key="node_y2">2756.249</data>
95
+ </node>
96
+ <node id="s14">
97
+ <data key="node_type">pump</data>
98
+ <data key="node_x1">3780.571</data>
99
+ <data key="node_y1">2293.827</data>
100
+ <data key="node_x2">3855.227</data>
101
+ <data key="node_y2">2433.807</data>
102
+ </node>
103
+ <node id="s15">
104
+ <data key="node_type">valve</data>
105
+ <data key="node_x1">2503.1980000000003</data>
106
+ <data key="node_y1">2308.313</data>
107
+ <data key="node_x2">2594.1850000000004</data>
108
+ <data key="node_y2">2417.964</data>
109
+ </node>
110
+ <node id="s16">
111
+ <data key="node_type">fitting</data>
112
+ <data key="node_x1">6286.102</data>
113
+ <data key="node_y1">1929.391</data>
114
+ <data key="node_x2">6423.749</data>
115
+ <data key="node_y2">2001.7140000000002</data>
116
+ </node>
117
+ <node id="s17">
118
+ <data key="node_type">heat_exchanger</data>
119
+ <data key="node_x1">4415.147</data>
120
+ <data key="node_y1">1556.5990000000002</data>
121
+ <data key="node_x2">4487.47</data>
122
+ <data key="node_y2">1691.913</data>
123
+ </node>
124
+ <node id="s18">
125
+ <data key="node_type">fitting</data>
126
+ <data key="node_x1">578.5840000000001</data>
127
+ <data key="node_y1">905.2040000000001</data>
128
+ <data key="node_x2">711.565</data>
129
+ <data key="node_y2">975.1940000000001</data>
130
+ </node>
131
+ <node id="s19">
132
+ <data key="node_type">fitting</data>
133
+ <data key="node_x1">5019.283</data>
134
+ <data key="node_y1">907.537</data>
135
+ <data key="node_x2">5154.597</data>
136
+ <data key="node_y2">975.1940000000001</data>
137
+ </node>
138
+ <node id="s20">
139
+ <data key="node_type">off_page</data>
140
+ <data key="node_x1">618.245</data>
141
+ <data key="node_y1">3682.45</data>
142
+ <data key="node_x2">669.571</data>
143
+ <data key="node_y2">3780.436</data>
144
+ </node>
145
+ <node id="s21">
146
+ <data key="node_type">fitting</data>
147
+ <data key="node_tag">G</data>
148
+ <data key="node_x1">1875.7320000000002</data>
149
+ <data key="node_y1">566.9190000000001</data>
150
+ <data key="node_x2">1952.7210000000002</data>
151
+ <data key="node_y2">629.9100000000001</data>
152
+ </node>
153
+ <node id="s22">
154
+ <data key="node_type">equipment</data>
155
+ <data key="node_x1">5005</data>
156
+ <data key="node_y1">1572</data>
157
+ <data key="node_x2">5155</data>
158
+ <data key="node_y2">1675</data>
159
+ </node>
160
+ <node id="j1">
161
+ <data key="node_type">junction</data>
162
+ <data key="node_x1">2540</data>
163
+ <data key="node_y1">1957</data>
164
+ <data key="node_x2">2556</data>
165
+ <data key="node_y2">1973</data>
166
+ </node>
167
+ <node id="j2">
168
+ <data key="node_type">junction</data>
169
+ <data key="node_x1">3175</data>
170
+ <data key="node_y1">2355</data>
171
+ <data key="node_x2">3191</data>
172
+ <data key="node_y2">2371</data>
173
+ </node>
174
+ <edge id="e0" source="s21" target="s4">
175
+ <data key="edge_kind">process</data>
176
+ </edge>
177
+ <edge id="e1" source="s4" target="s16">
178
+ <data key="edge_kind">process</data>
179
+ </edge>
180
+ <edge id="e2" source="s16" target="s1">
181
+ <data key="edge_kind">process</data>
182
+ </edge>
183
+ <edge id="e3" source="s18" target="s19">
184
+ <data key="edge_kind">process</data>
185
+ </edge>
186
+ <edge id="e4" source="s19" target="s10">
187
+ <data key="edge_kind">process</data>
188
+ </edge>
189
+ <edge id="e5" source="s10" target="s5">
190
+ <data key="edge_kind">process</data>
191
+ </edge>
192
+ <edge id="e6" source="s5" target="s7">
193
+ <data key="edge_kind">process</data>
194
+ </edge>
195
+ <edge id="e7" source="s7" target="s13">
196
+ <data key="edge_kind">process</data>
197
+ </edge>
198
+ <edge id="e8" source="s13" target="j2">
199
+ <data key="edge_kind">process</data>
200
+ </edge>
201
+ <edge id="e9" source="s2" target="j2">
202
+ <data key="edge_kind">process</data>
203
+ </edge>
204
+ <edge id="e10" source="j2" target="s14">
205
+ <data key="edge_kind">process</data>
206
+ </edge>
207
+ <edge id="e11" source="s14" target="s11">
208
+ <data key="edge_kind">process</data>
209
+ </edge>
210
+ <edge id="e12" source="s11" target="s12">
211
+ <data key="edge_kind">process</data>
212
+ </edge>
213
+ <edge id="e13" source="s15" target="j1">
214
+ <data key="edge_kind">process</data>
215
+ </edge>
216
+ <edge id="e14" source="j1" target="s17">
217
+ <data key="edge_kind">process</data>
218
+ </edge>
219
+ <edge id="e15" source="s17" target="s8">
220
+ <data key="edge_kind">process</data>
221
+ </edge>
222
+ <edge id="e16" source="s21" target="s9">
223
+ <data key="edge_kind">process</data>
224
+ </edge>
225
+ <edge id="e17" source="s22" target="s1">
226
+ <data key="edge_kind">signal</data>
227
+ </edge>
228
+ <edge id="e18" source="j1" target="s2">
229
+ <data key="edge_kind">signal</data>
230
+ </edge>
231
+ <edge id="e19" source="s8" target="s6">
232
+ <data key="edge_kind">signal</data>
233
+ </edge>
234
+ <edge id="e20" source="s20" target="s6">
235
+ <data key="edge_kind">signal</data>
236
+ </edge>
237
+ </graph>
238
+ </graphml>
data/synth-0/out/graph.json ADDED
@@ -0,0 +1,370 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image": {
3
+ "file": "drawing.jpg",
4
+ "width": 7000,
5
+ "height": 4500
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "s1",
10
+ "type": "control_valve",
11
+ "tag": null,
12
+ "bbox": [
13
+ 5050,
14
+ 1895,
15
+ 5125,
16
+ 2035
17
+ ]
18
+ },
19
+ {
20
+ "id": "s2",
21
+ "type": "vessel",
22
+ "tag": null,
23
+ "bbox": [
24
+ 3105.112,
25
+ 1848.2240000000002,
26
+ 3261.4230000000002,
27
+ 2079.191
28
+ ]
29
+ },
30
+ {
31
+ "id": "s4",
32
+ "type": "equipment",
33
+ "tag": null,
34
+ "bbox": [
35
+ 6234.776,
36
+ 534.2570000000001,
37
+ 6475.075,
38
+ 662.572
39
+ ]
40
+ },
41
+ {
42
+ "id": "s5",
43
+ "type": "equipment",
44
+ "tag": null,
45
+ "bbox": [
46
+ 5616.531,
47
+ 1215.4930000000002,
48
+ 5821.835,
49
+ 1348.4740000000002
50
+ ]
51
+ },
52
+ {
53
+ "id": "s6",
54
+ "type": "heat_exchanger",
55
+ "tag": null,
56
+ "bbox": [
57
+ 4373.153,
58
+ 3647.455,
59
+ 4529.464,
60
+ 3810.7650000000003
61
+ ]
62
+ },
63
+ {
64
+ "id": "s7",
65
+ "type": "fitting",
66
+ "tag": null,
67
+ "bbox": [
68
+ 1236.49,
69
+ 2585.452,
70
+ 1322.8110000000001,
71
+ 2823.418
72
+ ]
73
+ },
74
+ {
75
+ "id": "s8",
76
+ "type": "vessel",
77
+ "tag": null,
78
+ "bbox": [
79
+ 4398.816,
80
+ 3299.838,
81
+ 4506.134,
82
+ 3479.4790000000003
83
+ ]
84
+ },
85
+ {
86
+ "id": "s9",
87
+ "type": "off_page",
88
+ "tag": null,
89
+ "bbox": [
90
+ 1838.4040000000002,
91
+ 4013.736,
92
+ 1987.7160000000001,
93
+ 4125.72
94
+ ]
95
+ },
96
+ {
97
+ "id": "s10",
98
+ "type": "off_page",
99
+ "tag": null,
100
+ "bbox": [
101
+ 5644.527,
102
+ 886.5400000000001,
103
+ 5798.505,
104
+ 993.8580000000001
105
+ ]
106
+ },
107
+ {
108
+ "id": "s11",
109
+ "type": "equipment",
110
+ "tag": null,
111
+ "bbox": [
112
+ 3771.239,
113
+ 2966.219,
114
+ 3864.559,
115
+ 3129.529
116
+ ]
117
+ },
118
+ {
119
+ "id": "s12",
120
+ "type": "valve",
121
+ "tag": null,
122
+ "bbox": [
123
+ 2475.202,
124
+ 3005.392,
125
+ 2622.181,
126
+ 3084.714
127
+ ]
128
+ },
129
+ {
130
+ "id": "s13",
131
+ "type": "valve",
132
+ "tag": null,
133
+ "bbox": [
134
+ 3130.775,
135
+ 2653.597,
136
+ 3235.76,
137
+ 2756.249
138
+ ]
139
+ },
140
+ {
141
+ "id": "s14",
142
+ "type": "pump",
143
+ "tag": null,
144
+ "bbox": [
145
+ 3780.571,
146
+ 2293.827,
147
+ 3855.227,
148
+ 2433.807
149
+ ]
150
+ },
151
+ {
152
+ "id": "s15",
153
+ "type": "valve",
154
+ "tag": null,
155
+ "bbox": [
156
+ 2503.1980000000003,
157
+ 2308.313,
158
+ 2594.1850000000004,
159
+ 2417.964
160
+ ]
161
+ },
162
+ {
163
+ "id": "s16",
164
+ "type": "fitting",
165
+ "tag": null,
166
+ "bbox": [
167
+ 6286.102,
168
+ 1929.391,
169
+ 6423.749,
170
+ 2001.7140000000002
171
+ ]
172
+ },
173
+ {
174
+ "id": "s17",
175
+ "type": "heat_exchanger",
176
+ "tag": null,
177
+ "bbox": [
178
+ 4415.147,
179
+ 1556.5990000000002,
180
+ 4487.47,
181
+ 1691.913
182
+ ]
183
+ },
184
+ {
185
+ "id": "s18",
186
+ "type": "fitting",
187
+ "tag": null,
188
+ "bbox": [
189
+ 578.5840000000001,
190
+ 905.2040000000001,
191
+ 711.565,
192
+ 975.1940000000001
193
+ ]
194
+ },
195
+ {
196
+ "id": "s19",
197
+ "type": "fitting",
198
+ "tag": null,
199
+ "bbox": [
200
+ 5019.283,
201
+ 907.537,
202
+ 5154.597,
203
+ 975.1940000000001
204
+ ]
205
+ },
206
+ {
207
+ "id": "s20",
208
+ "type": "off_page",
209
+ "tag": null,
210
+ "bbox": [
211
+ 618.245,
212
+ 3682.45,
213
+ 669.571,
214
+ 3780.436
215
+ ]
216
+ },
217
+ {
218
+ "id": "s21",
219
+ "type": "fitting",
220
+ "tag": "G",
221
+ "bbox": [
222
+ 1875.7320000000002,
223
+ 566.9190000000001,
224
+ 1952.7210000000002,
225
+ 629.9100000000001
226
+ ]
227
+ },
228
+ {
229
+ "id": "s22",
230
+ "type": "equipment",
231
+ "tag": null,
232
+ "bbox": [
233
+ 5005,
234
+ 1572,
235
+ 5155,
236
+ 1675
237
+ ]
238
+ },
239
+ {
240
+ "id": "j1",
241
+ "type": "junction",
242
+ "tag": null,
243
+ "bbox": [
244
+ 2540,
245
+ 1957,
246
+ 2556,
247
+ 1973
248
+ ]
249
+ },
250
+ {
251
+ "id": "j2",
252
+ "type": "junction",
253
+ "tag": null,
254
+ "bbox": [
255
+ 3175,
256
+ 2355,
257
+ 3191,
258
+ 2371
259
+ ]
260
+ }
261
+ ],
262
+ "edges": [
263
+ {
264
+ "source": "s21",
265
+ "target": "s4",
266
+ "kind": "process"
267
+ },
268
+ {
269
+ "source": "s4",
270
+ "target": "s16",
271
+ "kind": "process"
272
+ },
273
+ {
274
+ "source": "s16",
275
+ "target": "s1",
276
+ "kind": "process"
277
+ },
278
+ {
279
+ "source": "s18",
280
+ "target": "s19",
281
+ "kind": "process"
282
+ },
283
+ {
284
+ "source": "s19",
285
+ "target": "s10",
286
+ "kind": "process"
287
+ },
288
+ {
289
+ "source": "s10",
290
+ "target": "s5",
291
+ "kind": "process"
292
+ },
293
+ {
294
+ "source": "s5",
295
+ "target": "s7",
296
+ "kind": "process"
297
+ },
298
+ {
299
+ "source": "s7",
300
+ "target": "s13",
301
+ "kind": "process"
302
+ },
303
+ {
304
+ "source": "s13",
305
+ "target": "j2",
306
+ "kind": "process"
307
+ },
308
+ {
309
+ "source": "s2",
310
+ "target": "j2",
311
+ "kind": "process"
312
+ },
313
+ {
314
+ "source": "j2",
315
+ "target": "s14",
316
+ "kind": "process"
317
+ },
318
+ {
319
+ "source": "s14",
320
+ "target": "s11",
321
+ "kind": "process"
322
+ },
323
+ {
324
+ "source": "s11",
325
+ "target": "s12",
326
+ "kind": "process"
327
+ },
328
+ {
329
+ "source": "s15",
330
+ "target": "j1",
331
+ "kind": "process"
332
+ },
333
+ {
334
+ "source": "j1",
335
+ "target": "s17",
336
+ "kind": "process"
337
+ },
338
+ {
339
+ "source": "s17",
340
+ "target": "s8",
341
+ "kind": "process"
342
+ },
343
+ {
344
+ "source": "s21",
345
+ "target": "s9",
346
+ "kind": "process"
347
+ },
348
+ {
349
+ "source": "s22",
350
+ "target": "s1",
351
+ "kind": "signal"
352
+ },
353
+ {
354
+ "source": "j1",
355
+ "target": "s2",
356
+ "kind": "signal"
357
+ },
358
+ {
359
+ "source": "s8",
360
+ "target": "s6",
361
+ "kind": "signal"
362
+ },
363
+ {
364
+ "source": "s20",
365
+ "target": "s6",
366
+ "kind": "signal",
367
+ "notes": "Mixed line styling: dashed from s20 to x\u22481914 at y\u22483730, solid thereafter to s6. Classified signal because of dashed source segment; process/signal semantics unresolved. Crossing with s21\u2013s9 is not connected (no dot or tee)."
368
+ }
369
+ ]
370
+ }
data/synth-0/out/nodes.csv ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ id,type,tag,x1,y1,x2,y2
2
+ s1,control_valve,,5050,1895,5125,2035
3
+ s2,vessel,,3105.112,1848.2240000000002,3261.4230000000002,2079.191
4
+ s4,equipment,,6234.776,534.2570000000001,6475.075,662.572
5
+ s5,equipment,,5616.531,1215.4930000000002,5821.835,1348.4740000000002
6
+ s6,heat_exchanger,,4373.153,3647.455,4529.464,3810.7650000000003
7
+ s7,fitting,,1236.49,2585.452,1322.8110000000001,2823.418
8
+ s8,vessel,,4398.816,3299.838,4506.134,3479.4790000000003
9
+ s9,off_page,,1838.4040000000002,4013.736,1987.7160000000001,4125.72
10
+ s10,off_page,,5644.527,886.5400000000001,5798.505,993.8580000000001
11
+ s11,equipment,,3771.239,2966.219,3864.559,3129.529
12
+ s12,valve,,2475.202,3005.392,2622.181,3084.714
13
+ s13,valve,,3130.775,2653.597,3235.76,2756.249
14
+ s14,pump,,3780.571,2293.827,3855.227,2433.807
15
+ s15,valve,,2503.1980000000003,2308.313,2594.1850000000004,2417.964
16
+ s16,fitting,,6286.102,1929.391,6423.749,2001.7140000000002
17
+ s17,heat_exchanger,,4415.147,1556.5990000000002,4487.47,1691.913
18
+ s18,fitting,,578.5840000000001,905.2040000000001,711.565,975.1940000000001
19
+ s19,fitting,,5019.283,907.537,5154.597,975.1940000000001
20
+ s20,off_page,,618.245,3682.45,669.571,3780.436
21
+ s21,fitting,G,1875.7320000000002,566.9190000000001,1952.7210000000002,629.9100000000001
22
+ s22,equipment,,5005,1572,5155,1675
23
+ j1,junction,,2540,1957,2556,1973
24
+ j2,junction,,3175,2355,3191,2371
data/synth-0/out/notes.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Connection pass and review
2
+
3
+ All 12 marked tiles reviewed by row (0_0–0_3, 1_0–1_3, 2_0–2_3), with overlap continuations checked. Tile 2_3 blank.
4
+
5
+ ## Traces
6
+ Row 0: s21–s4–s16–s1; s18–s19–s10–s5. Split s1 oversized detection into lower control valve s1 and upper equipment s22, joined by dashed signal. Upper symbol type uncertain; no readable tag.
7
+ Row 1: s5–s7–s13–j2; s2–j2–s14–s11–s12. j2 at (3183,2363) is a three-way process tee. Removed s3, a false detection around the upper leg of the pipe loop feeding s14. s15–j1–s17–s8; j1 at (2548,1965) is a takeoff with dashed signal to s2.
8
+ Row 2: s8–s6 dashed signal. s21–s9 solid process continuation. s20–s6 route changes from dashed to solid at approximately (1914,3730); retained as signal with explicit mixed-style note. That four-way crossing has neither a dot nor a tee; not connected to the vertical s21–s9 route. At (1914,2705), the vertical has a clear gap; also not connected. Unmarked upper crossings are not tees.
9
+
10
+ ## Limitations
11
+ Printed annotations are unusual and their exact role/readings are uncertain; no guessed line identifiers added. s12 and s15 each have only one connected pipe as drawn; no fabricated second ports. s22 specific symbol identification unresolved. Mixed style on s20–s6 is documented in graph edge notes; binary kind is signal based on dashed origin, not a claim that all its segments are dashed. Edge orientation is tracing order, not verified flow direction.
data/synth-0/out/pid.sql ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -- P&ID graph: SQLite and PostgreSQL compatible
2
+ CREATE TABLE components (id TEXT PRIMARY KEY, type TEXT NOT NULL, tag TEXT, x1 REAL, y1 REAL, x2 REAL, y2 REAL);
3
+ CREATE TABLE connections (source TEXT NOT NULL REFERENCES components(id), target TEXT NOT NULL REFERENCES components(id), kind TEXT NOT NULL, line TEXT);
4
+ INSERT INTO components VALUES ('s1', 'control_valve', NULL, 5050, 1895, 5125, 2035);
5
+ INSERT INTO components VALUES ('s2', 'vessel', NULL, 3105.112, 1848.2240000000002, 3261.4230000000002, 2079.191);
6
+ INSERT INTO components VALUES ('s4', 'equipment', NULL, 6234.776, 534.2570000000001, 6475.075, 662.572);
7
+ INSERT INTO components VALUES ('s5', 'equipment', NULL, 5616.531, 1215.4930000000002, 5821.835, 1348.4740000000002);
8
+ INSERT INTO components VALUES ('s6', 'heat_exchanger', NULL, 4373.153, 3647.455, 4529.464, 3810.7650000000003);
9
+ INSERT INTO components VALUES ('s7', 'fitting', NULL, 1236.49, 2585.452, 1322.8110000000001, 2823.418);
10
+ INSERT INTO components VALUES ('s8', 'vessel', NULL, 4398.816, 3299.838, 4506.134, 3479.4790000000003);
11
+ INSERT INTO components VALUES ('s9', 'off_page', NULL, 1838.4040000000002, 4013.736, 1987.7160000000001, 4125.72);
12
+ INSERT INTO components VALUES ('s10', 'off_page', NULL, 5644.527, 886.5400000000001, 5798.505, 993.8580000000001);
13
+ INSERT INTO components VALUES ('s11', 'equipment', NULL, 3771.239, 2966.219, 3864.559, 3129.529);
14
+ INSERT INTO components VALUES ('s12', 'valve', NULL, 2475.202, 3005.392, 2622.181, 3084.714);
15
+ INSERT INTO components VALUES ('s13', 'valve', NULL, 3130.775, 2653.597, 3235.76, 2756.249);
16
+ INSERT INTO components VALUES ('s14', 'pump', NULL, 3780.571, 2293.827, 3855.227, 2433.807);
17
+ INSERT INTO components VALUES ('s15', 'valve', NULL, 2503.1980000000003, 2308.313, 2594.1850000000004, 2417.964);
18
+ INSERT INTO components VALUES ('s16', 'fitting', NULL, 6286.102, 1929.391, 6423.749, 2001.7140000000002);
19
+ INSERT INTO components VALUES ('s17', 'heat_exchanger', NULL, 4415.147, 1556.5990000000002, 4487.47, 1691.913);
20
+ INSERT INTO components VALUES ('s18', 'fitting', NULL, 578.5840000000001, 905.2040000000001, 711.565, 975.1940000000001);
21
+ INSERT INTO components VALUES ('s19', 'fitting', NULL, 5019.283, 907.537, 5154.597, 975.1940000000001);
22
+ INSERT INTO components VALUES ('s20', 'off_page', NULL, 618.245, 3682.45, 669.571, 3780.436);
23
+ INSERT INTO components VALUES ('s21', 'fitting', 'G', 1875.7320000000002, 566.9190000000001, 1952.7210000000002, 629.9100000000001);
24
+ INSERT INTO components VALUES ('s22', 'equipment', NULL, 5005, 1572, 5155, 1675);
25
+ INSERT INTO components VALUES ('j1', 'junction', NULL, 2540, 1957, 2556, 1973);
26
+ INSERT INTO components VALUES ('j2', 'junction', NULL, 3175, 2355, 3191, 2371);
27
+ INSERT INTO connections VALUES ('s21', 's4', 'process', NULL);
28
+ INSERT INTO connections VALUES ('s4', 's16', 'process', NULL);
29
+ INSERT INTO connections VALUES ('s16', 's1', 'process', NULL);
30
+ INSERT INTO connections VALUES ('s18', 's19', 'process', NULL);
31
+ INSERT INTO connections VALUES ('s19', 's10', 'process', NULL);
32
+ INSERT INTO connections VALUES ('s10', 's5', 'process', NULL);
33
+ INSERT INTO connections VALUES ('s5', 's7', 'process', NULL);
34
+ INSERT INTO connections VALUES ('s7', 's13', 'process', NULL);
35
+ INSERT INTO connections VALUES ('s13', 'j2', 'process', NULL);
36
+ INSERT INTO connections VALUES ('s2', 'j2', 'process', NULL);
37
+ INSERT INTO connections VALUES ('j2', 's14', 'process', NULL);
38
+ INSERT INTO connections VALUES ('s14', 's11', 'process', NULL);
39
+ INSERT INTO connections VALUES ('s11', 's12', 'process', NULL);
40
+ INSERT INTO connections VALUES ('s15', 'j1', 'process', NULL);
41
+ INSERT INTO connections VALUES ('j1', 's17', 'process', NULL);
42
+ INSERT INTO connections VALUES ('s17', 's8', 'process', NULL);
43
+ INSERT INTO connections VALUES ('s21', 's9', 'process', NULL);
44
+ INSERT INTO connections VALUES ('s22', 's1', 'signal', NULL);
45
+ INSERT INTO connections VALUES ('j1', 's2', 'signal', NULL);
46
+ INSERT INTO connections VALUES ('s8', 's6', 'signal', NULL);
47
+ INSERT INTO connections VALUES ('s20', 's6', 'signal', NULL);
data/synth-0/out/validation.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ WARN node s21: unusual tag 'G' (retained as drawn)
2
+ 23 nodes, 21 edges, 0 errors, 1 warnings
3
+ OK
data/synth-1/drawing.jpg ADDED

Git LFS Details

  • SHA256: ae5681583ed5936fb6442b50b75bd793f4338af6e82f3a730025b62aaffbf08a
  • Pointer size: 131 Bytes
  • Size of remote file: 137 kB
data/synth-1/graph.json ADDED
@@ -0,0 +1,416 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image": {
3
+ "file": "drawing.jpg",
4
+ "width": 7000,
5
+ "height": 4500
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "s1",
10
+ "type": "vessel",
11
+ "tag": null,
12
+ "bbox": [
13
+ 4076.862,
14
+ 1083.0,
15
+ 4230.84,
16
+ 1358.294
17
+ ]
18
+ },
19
+ {
20
+ "id": "s2",
21
+ "type": "equipment",
22
+ "tag": null,
23
+ "bbox": [
24
+ 5180.371,
25
+ 478.26500000000004,
26
+ 5325.017,
27
+ 718.5640000000001
28
+ ]
29
+ },
30
+ {
31
+ "id": "s3",
32
+ "type": "equipment",
33
+ "tag": null,
34
+ "bbox": [
35
+ 1800.9650000000001,
36
+ 3346.498,
37
+ 1966.6080000000002,
38
+ 3544.803
39
+ ]
40
+ },
41
+ {
42
+ "id": "s4",
43
+ "type": "equipment",
44
+ "tag": null,
45
+ "bbox": [
46
+ 2902.141,
47
+ 1134.326,
48
+ 3067.784,
49
+ 1316.3
50
+ ]
51
+ },
52
+ {
53
+ "id": "s5",
54
+ "type": "equipment",
55
+ "tag": null,
56
+ "bbox": [
57
+ 2349.2200000000003,
58
+ 3026.389,
59
+ 2519.529,
60
+ 3178.034
61
+ ]
62
+ },
63
+ {
64
+ "id": "s6",
65
+ "type": "equipment",
66
+ "tag": null,
67
+ "bbox": [
68
+ 1794.0770000000002,
69
+ 2746.917,
70
+ 1971.3850000000002,
71
+ 2891.563
72
+ ]
73
+ },
74
+ {
75
+ "id": "s7",
76
+ "type": "equipment",
77
+ "tag": null,
78
+ "bbox": [
79
+ 2349.2200000000003,
80
+ 3661.4530000000004,
81
+ 2519.529,
82
+ 3799.1000000000004
83
+ ]
84
+ },
85
+ {
86
+ "id": "s8",
87
+ "type": "heat_exchanger",
88
+ "tag": null,
89
+ "bbox": [
90
+ 4662.445,
91
+ 1717.576,
92
+ 4746.433,
93
+ 1985.871
94
+ ]
95
+ },
96
+ {
97
+ "id": "s9",
98
+ "type": "equipment",
99
+ "tag": null,
100
+ "bbox": [
101
+ 5180.371,
102
+ 1498.2740000000001,
103
+ 5329.683,
104
+ 1635.921
105
+ ]
106
+ },
107
+ {
108
+ "id": "s10",
109
+ "type": "equipment",
110
+ "tag": null,
111
+ "bbox": [
112
+ 2916.139,
113
+ 1498.2740000000001,
114
+ 3053.786,
115
+ 1635.921
116
+ ]
117
+ },
118
+ {
119
+ "id": "s11",
120
+ "type": "equipment",
121
+ "tag": null,
122
+ "bbox": [
123
+ 3450.396,
124
+ 1512.272,
125
+ 3620.7050000000004,
126
+ 1619.5900000000001
127
+ ]
128
+ },
129
+ {
130
+ "id": "s12",
131
+ "type": "valve",
132
+ "tag": null,
133
+ "bbox": [
134
+ 5751.845,
135
+ 1764.236,
136
+ 5856.83,
137
+ 1936.8780000000002
138
+ ]
139
+ },
140
+ {
141
+ "id": "s13",
142
+ "type": "fitting",
143
+ "tag": null,
144
+ "bbox": [
145
+ 1245.8220000000001,
146
+ 3677.784,
147
+ 1416.131,
148
+ 3780.436
149
+ ]
150
+ },
151
+ {
152
+ "id": "s14",
153
+ "type": "equipment",
154
+ "tag": null,
155
+ "bbox": [
156
+ 6269.771000000001,
157
+ 4023.068,
158
+ 6440.08,
159
+ 4118.7210000000005
160
+ ]
161
+ },
162
+ {
163
+ "id": "s15",
164
+ "type": "fitting",
165
+ "tag": "Tb6VAhFrl",
166
+ "bbox": [
167
+ 727.8960000000001,
168
+ 515.5930000000001,
169
+ 835.214,
170
+ 667.238
171
+ ]
172
+ },
173
+ {
174
+ "id": "s16",
175
+ "type": "off_page",
176
+ "tag": null,
177
+ "bbox": [
178
+ 6279.103,
179
+ 3393.1580000000004,
180
+ 6433.081,
181
+ 3498.143
182
+ ]
183
+ },
184
+ {
185
+ "id": "s17",
186
+ "type": "fitting",
187
+ "tag": null,
188
+ "bbox": [
189
+ 734.8950000000001,
190
+ 860.8770000000001,
191
+ 830.5480000000001,
192
+ 1019.5210000000001
193
+ ]
194
+ },
195
+ {
196
+ "id": "s18",
197
+ "type": "check_valve",
198
+ "tag": null,
199
+ "bbox": [
200
+ 1294.815,
201
+ 837.547,
202
+ 1369.471,
203
+ 1040.518
204
+ ]
205
+ },
206
+ {
207
+ "id": "s19",
208
+ "type": "heat_exchanger",
209
+ "tag": null,
210
+ "bbox": [
211
+ 4095.526,
212
+ 2413.2980000000002,
213
+ 4209.843,
214
+ 2543.946
215
+ ]
216
+ },
217
+ {
218
+ "id": "s20",
219
+ "type": "equipment",
220
+ "tag": null,
221
+ "bbox": [
222
+ 5205.923,
223
+ 2125.851,
224
+ 5303.909,
225
+ 2258.8320000000003
226
+ ]
227
+ },
228
+ {
229
+ "id": "s21",
230
+ "type": "equipment",
231
+ "tag": null,
232
+ "bbox": [
233
+ 3479.614,
234
+ 2149.181,
235
+ 3589.265,
236
+ 2235.5020000000004
237
+ ]
238
+ },
239
+ {
240
+ "id": "s22",
241
+ "type": "equipment",
242
+ "tag": null,
243
+ "bbox": [
244
+ 4643.781,
245
+ 1530.9360000000001,
246
+ 4762.764,
247
+ 1600.926
248
+ ]
249
+ },
250
+ {
251
+ "id": "s23",
252
+ "type": "valve",
253
+ "tag": null,
254
+ "bbox": [
255
+ 4128.188,
256
+ 2805.242,
257
+ 4174.848,
258
+ 2830.905
259
+ ]
260
+ },
261
+ {
262
+ "id": "j1",
263
+ "type": "junction",
264
+ "tag": null,
265
+ "bbox": [
266
+ 5250,
267
+ 1847,
268
+ 5260,
269
+ 1857
270
+ ]
271
+ },
272
+ {
273
+ "id": "j2",
274
+ "type": "junction",
275
+ "tag": null,
276
+ "bbox": [
277
+ 2429,
278
+ 3442,
279
+ 2439,
280
+ 3452
281
+ ]
282
+ }
283
+ ],
284
+ "edges": [
285
+ {
286
+ "source": "s15",
287
+ "target": "s17",
288
+ "kind": "process"
289
+ },
290
+ {
291
+ "source": "s17",
292
+ "target": "s18",
293
+ "kind": "process"
294
+ },
295
+ {
296
+ "source": "s15",
297
+ "target": "s2",
298
+ "kind": "process"
299
+ },
300
+ {
301
+ "source": "s2",
302
+ "target": "s9",
303
+ "kind": "process"
304
+ },
305
+ {
306
+ "source": "s9",
307
+ "target": "s22",
308
+ "kind": "process"
309
+ },
310
+ {
311
+ "source": "s4",
312
+ "target": "s1",
313
+ "kind": "process"
314
+ },
315
+ {
316
+ "source": "s4",
317
+ "target": "s10",
318
+ "kind": "signal"
319
+ },
320
+ {
321
+ "source": "s10",
322
+ "target": "s11",
323
+ "kind": "process",
324
+ "line": "q=B81"
325
+ },
326
+ {
327
+ "source": "s11",
328
+ "target": "s21",
329
+ "kind": "process"
330
+ },
331
+ {
332
+ "source": "s21",
333
+ "target": "s20",
334
+ "kind": "process"
335
+ },
336
+ {
337
+ "source": "s1",
338
+ "target": "s19",
339
+ "kind": "process"
340
+ },
341
+ {
342
+ "source": "s19",
343
+ "target": "s23",
344
+ "kind": "process",
345
+ "line": "c)5VDT"
346
+ },
347
+ {
348
+ "source": "s23",
349
+ "target": "s6",
350
+ "kind": "process",
351
+ "line": "z4=B("
352
+ },
353
+ {
354
+ "source": "s22",
355
+ "target": "s8",
356
+ "kind": "signal"
357
+ },
358
+ {
359
+ "source": "s8",
360
+ "target": "j1",
361
+ "kind": "signal"
362
+ },
363
+ {
364
+ "source": "j1",
365
+ "target": "s12",
366
+ "kind": "signal"
367
+ },
368
+ {
369
+ "source": "j1",
370
+ "target": "s20",
371
+ "kind": "signal"
372
+ },
373
+ {
374
+ "source": "s18",
375
+ "target": "s13",
376
+ "kind": "process"
377
+ },
378
+ {
379
+ "source": "s13",
380
+ "target": "s7",
381
+ "kind": "process",
382
+ "line": "%d2!+t15r"
383
+ },
384
+ {
385
+ "source": "s6",
386
+ "target": "s3",
387
+ "kind": "signal"
388
+ },
389
+ {
390
+ "source": "s3",
391
+ "target": "j2",
392
+ "kind": "process"
393
+ },
394
+ {
395
+ "source": "s5",
396
+ "target": "j2",
397
+ "kind": "signal"
398
+ },
399
+ {
400
+ "source": "j2",
401
+ "target": "s7",
402
+ "kind": "process"
403
+ },
404
+ {
405
+ "source": "j2",
406
+ "target": "s16",
407
+ "kind": "process"
408
+ },
409
+ {
410
+ "source": "s16",
411
+ "target": "s14",
412
+ "kind": "process",
413
+ "line": "=Lst@H"
414
+ }
415
+ ]
416
+ }
data/synth-1/out/edges.csv ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ source,target,kind,line
2
+ s15,s17,process,
3
+ s17,s18,process,
4
+ s15,s2,process,
5
+ s2,s9,process,
6
+ s9,s22,process,
7
+ s4,s1,process,
8
+ s4,s10,signal,
9
+ s10,s11,process,q=B81
10
+ s11,s21,process,
11
+ s21,s20,process,
12
+ s1,s19,process,
13
+ s19,s23,process,c)5VDT
14
+ s23,s6,process,z4=B(
15
+ s22,s8,signal,
16
+ s8,j1,signal,
17
+ j1,s12,signal,
18
+ j1,s20,signal,
19
+ s18,s13,process,
20
+ s13,s7,process,%d2!+t15r
21
+ s6,s3,signal,
22
+ s3,j2,process,
23
+ s5,j2,signal,
24
+ j2,s7,process,
25
+ j2,s16,process,
26
+ s16,s14,process,=Lst@H
data/synth-1/out/graph.cypher ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CREATE (:Component {id: 's1', type: 'vessel', x1: 4076.862, y1: 1083.0, x2: 4230.84, y2: 1358.294});
2
+ CREATE (:Component {id: 's2', type: 'equipment', x1: 5180.371, y1: 478.26500000000004, x2: 5325.017, y2: 718.5640000000001});
3
+ CREATE (:Component {id: 's3', type: 'equipment', x1: 1800.9650000000001, y1: 3346.498, x2: 1966.6080000000002, y2: 3544.803});
4
+ CREATE (:Component {id: 's4', type: 'equipment', x1: 2902.141, y1: 1134.326, x2: 3067.784, y2: 1316.3});
5
+ CREATE (:Component {id: 's5', type: 'equipment', x1: 2349.2200000000003, y1: 3026.389, x2: 2519.529, y2: 3178.034});
6
+ CREATE (:Component {id: 's6', type: 'equipment', x1: 1794.0770000000002, y1: 2746.917, x2: 1971.3850000000002, y2: 2891.563});
7
+ CREATE (:Component {id: 's7', type: 'equipment', x1: 2349.2200000000003, y1: 3661.4530000000004, x2: 2519.529, y2: 3799.1000000000004});
8
+ CREATE (:Component {id: 's8', type: 'heat_exchanger', x1: 4662.445, y1: 1717.576, x2: 4746.433, y2: 1985.871});
9
+ CREATE (:Component {id: 's9', type: 'equipment', x1: 5180.371, y1: 1498.2740000000001, x2: 5329.683, y2: 1635.921});
10
+ CREATE (:Component {id: 's10', type: 'equipment', x1: 2916.139, y1: 1498.2740000000001, x2: 3053.786, y2: 1635.921});
11
+ CREATE (:Component {id: 's11', type: 'equipment', x1: 3450.396, y1: 1512.272, x2: 3620.7050000000004, y2: 1619.5900000000001});
12
+ CREATE (:Component {id: 's12', type: 'valve', x1: 5751.845, y1: 1764.236, x2: 5856.83, y2: 1936.8780000000002});
13
+ CREATE (:Component {id: 's13', type: 'fitting', x1: 1245.8220000000001, y1: 3677.784, x2: 1416.131, y2: 3780.436});
14
+ CREATE (:Component {id: 's14', type: 'equipment', x1: 6269.771000000001, y1: 4023.068, x2: 6440.08, y2: 4118.7210000000005});
15
+ CREATE (:Component {id: 's15', type: 'fitting', tag: 'Tb6VAhFrl', x1: 727.8960000000001, y1: 515.5930000000001, x2: 835.214, y2: 667.238});
16
+ CREATE (:Component {id: 's16', type: 'off_page', x1: 6279.103, y1: 3393.1580000000004, x2: 6433.081, y2: 3498.143});
17
+ CREATE (:Component {id: 's17', type: 'fitting', x1: 734.8950000000001, y1: 860.8770000000001, x2: 830.5480000000001, y2: 1019.5210000000001});
18
+ CREATE (:Component {id: 's18', type: 'check_valve', x1: 1294.815, y1: 837.547, x2: 1369.471, y2: 1040.518});
19
+ CREATE (:Component {id: 's19', type: 'heat_exchanger', x1: 4095.526, y1: 2413.2980000000002, x2: 4209.843, y2: 2543.946});
20
+ CREATE (:Component {id: 's20', type: 'equipment', x1: 5205.923, y1: 2125.851, x2: 5303.909, y2: 2258.8320000000003});
21
+ CREATE (:Component {id: 's21', type: 'equipment', x1: 3479.614, y1: 2149.181, x2: 3589.265, y2: 2235.5020000000004});
22
+ CREATE (:Component {id: 's22', type: 'equipment', x1: 4643.781, y1: 1530.9360000000001, x2: 4762.764, y2: 1600.926});
23
+ CREATE (:Component {id: 's23', type: 'valve', x1: 4128.188, y1: 2805.242, x2: 4174.848, y2: 2830.905});
24
+ CREATE (:Junction {id: 'j1', type: 'junction', x1: 5250, y1: 1847, x2: 5260, y2: 1857});
25
+ CREATE (:Junction {id: 'j2', type: 'junction', x1: 2429, y1: 3442, x2: 2439, y2: 3452});
26
+ MATCH (a {id: 's15'}), (b {id: 's17'}) CREATE (a)-[:PIPE]->(b);
27
+ MATCH (a {id: 's17'}), (b {id: 's18'}) CREATE (a)-[:PIPE]->(b);
28
+ MATCH (a {id: 's15'}), (b {id: 's2'}) CREATE (a)-[:PIPE]->(b);
29
+ MATCH (a {id: 's2'}), (b {id: 's9'}) CREATE (a)-[:PIPE]->(b);
30
+ MATCH (a {id: 's9'}), (b {id: 's22'}) CREATE (a)-[:PIPE]->(b);
31
+ MATCH (a {id: 's4'}), (b {id: 's1'}) CREATE (a)-[:PIPE]->(b);
32
+ MATCH (a {id: 's4'}), (b {id: 's10'}) CREATE (a)-[:SIGNAL]->(b);
33
+ MATCH (a {id: 's10'}), (b {id: 's11'}) CREATE (a)-[:PIPE {line: 'q=B81'}]->(b);
34
+ MATCH (a {id: 's11'}), (b {id: 's21'}) CREATE (a)-[:PIPE]->(b);
35
+ MATCH (a {id: 's21'}), (b {id: 's20'}) CREATE (a)-[:PIPE]->(b);
36
+ MATCH (a {id: 's1'}), (b {id: 's19'}) CREATE (a)-[:PIPE]->(b);
37
+ MATCH (a {id: 's19'}), (b {id: 's23'}) CREATE (a)-[:PIPE {line: 'c)5VDT'}]->(b);
38
+ MATCH (a {id: 's23'}), (b {id: 's6'}) CREATE (a)-[:PIPE {line: 'z4=B('}]->(b);
39
+ MATCH (a {id: 's22'}), (b {id: 's8'}) CREATE (a)-[:SIGNAL]->(b);
40
+ MATCH (a {id: 's8'}), (b {id: 'j1'}) CREATE (a)-[:SIGNAL]->(b);
41
+ MATCH (a {id: 'j1'}), (b {id: 's12'}) CREATE (a)-[:SIGNAL]->(b);
42
+ MATCH (a {id: 'j1'}), (b {id: 's20'}) CREATE (a)-[:SIGNAL]->(b);
43
+ MATCH (a {id: 's18'}), (b {id: 's13'}) CREATE (a)-[:PIPE]->(b);
44
+ MATCH (a {id: 's13'}), (b {id: 's7'}) CREATE (a)-[:PIPE {line: '%d2!+t15r'}]->(b);
45
+ MATCH (a {id: 's6'}), (b {id: 's3'}) CREATE (a)-[:SIGNAL]->(b);
46
+ MATCH (a {id: 's3'}), (b {id: 'j2'}) CREATE (a)-[:PIPE]->(b);
47
+ MATCH (a {id: 's5'}), (b {id: 'j2'}) CREATE (a)-[:SIGNAL]->(b);
48
+ MATCH (a {id: 'j2'}), (b {id: 's7'}) CREATE (a)-[:PIPE]->(b);
49
+ MATCH (a {id: 'j2'}), (b {id: 's16'}) CREATE (a)-[:PIPE]->(b);
50
+ MATCH (a {id: 's16'}), (b {id: 's14'}) CREATE (a)-[:PIPE {line: '=Lst@H'}]->(b);
data/synth-1/out/graph.graphml ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <graphml xmlns="http://graphml.graphdrawing.org/xmlns">
3
+ <key id="node_type" for="node" attr.name="type" attr.type="string" />
4
+ <key id="node_tag" for="node" attr.name="tag" attr.type="string" />
5
+ <key id="node_x1" for="node" attr.name="x1" attr.type="double" />
6
+ <key id="node_y1" for="node" attr.name="y1" attr.type="double" />
7
+ <key id="node_x2" for="node" attr.name="x2" attr.type="double" />
8
+ <key id="node_y2" for="node" attr.name="y2" attr.type="double" />
9
+ <key id="edge_kind" for="edge" attr.name="kind" attr.type="string" />
10
+ <key id="edge_line" for="edge" attr.name="line" attr.type="string" />
11
+ <graph edgedefault="undirected">
12
+ <node id="s1">
13
+ <data key="node_type">vessel</data>
14
+ <data key="node_x1">4076.862</data>
15
+ <data key="node_y1">1083.0</data>
16
+ <data key="node_x2">4230.84</data>
17
+ <data key="node_y2">1358.294</data>
18
+ </node>
19
+ <node id="s2">
20
+ <data key="node_type">equipment</data>
21
+ <data key="node_x1">5180.371</data>
22
+ <data key="node_y1">478.26500000000004</data>
23
+ <data key="node_x2">5325.017</data>
24
+ <data key="node_y2">718.5640000000001</data>
25
+ </node>
26
+ <node id="s3">
27
+ <data key="node_type">equipment</data>
28
+ <data key="node_x1">1800.9650000000001</data>
29
+ <data key="node_y1">3346.498</data>
30
+ <data key="node_x2">1966.6080000000002</data>
31
+ <data key="node_y2">3544.803</data>
32
+ </node>
33
+ <node id="s4">
34
+ <data key="node_type">equipment</data>
35
+ <data key="node_x1">2902.141</data>
36
+ <data key="node_y1">1134.326</data>
37
+ <data key="node_x2">3067.784</data>
38
+ <data key="node_y2">1316.3</data>
39
+ </node>
40
+ <node id="s5">
41
+ <data key="node_type">equipment</data>
42
+ <data key="node_x1">2349.2200000000003</data>
43
+ <data key="node_y1">3026.389</data>
44
+ <data key="node_x2">2519.529</data>
45
+ <data key="node_y2">3178.034</data>
46
+ </node>
47
+ <node id="s6">
48
+ <data key="node_type">equipment</data>
49
+ <data key="node_x1">1794.0770000000002</data>
50
+ <data key="node_y1">2746.917</data>
51
+ <data key="node_x2">1971.3850000000002</data>
52
+ <data key="node_y2">2891.563</data>
53
+ </node>
54
+ <node id="s7">
55
+ <data key="node_type">equipment</data>
56
+ <data key="node_x1">2349.2200000000003</data>
57
+ <data key="node_y1">3661.4530000000004</data>
58
+ <data key="node_x2">2519.529</data>
59
+ <data key="node_y2">3799.1000000000004</data>
60
+ </node>
61
+ <node id="s8">
62
+ <data key="node_type">heat_exchanger</data>
63
+ <data key="node_x1">4662.445</data>
64
+ <data key="node_y1">1717.576</data>
65
+ <data key="node_x2">4746.433</data>
66
+ <data key="node_y2">1985.871</data>
67
+ </node>
68
+ <node id="s9">
69
+ <data key="node_type">equipment</data>
70
+ <data key="node_x1">5180.371</data>
71
+ <data key="node_y1">1498.2740000000001</data>
72
+ <data key="node_x2">5329.683</data>
73
+ <data key="node_y2">1635.921</data>
74
+ </node>
75
+ <node id="s10">
76
+ <data key="node_type">equipment</data>
77
+ <data key="node_x1">2916.139</data>
78
+ <data key="node_y1">1498.2740000000001</data>
79
+ <data key="node_x2">3053.786</data>
80
+ <data key="node_y2">1635.921</data>
81
+ </node>
82
+ <node id="s11">
83
+ <data key="node_type">equipment</data>
84
+ <data key="node_x1">3450.396</data>
85
+ <data key="node_y1">1512.272</data>
86
+ <data key="node_x2">3620.7050000000004</data>
87
+ <data key="node_y2">1619.5900000000001</data>
88
+ </node>
89
+ <node id="s12">
90
+ <data key="node_type">valve</data>
91
+ <data key="node_x1">5751.845</data>
92
+ <data key="node_y1">1764.236</data>
93
+ <data key="node_x2">5856.83</data>
94
+ <data key="node_y2">1936.8780000000002</data>
95
+ </node>
96
+ <node id="s13">
97
+ <data key="node_type">fitting</data>
98
+ <data key="node_x1">1245.8220000000001</data>
99
+ <data key="node_y1">3677.784</data>
100
+ <data key="node_x2">1416.131</data>
101
+ <data key="node_y2">3780.436</data>
102
+ </node>
103
+ <node id="s14">
104
+ <data key="node_type">equipment</data>
105
+ <data key="node_x1">6269.771000000001</data>
106
+ <data key="node_y1">4023.068</data>
107
+ <data key="node_x2">6440.08</data>
108
+ <data key="node_y2">4118.7210000000005</data>
109
+ </node>
110
+ <node id="s15">
111
+ <data key="node_type">fitting</data>
112
+ <data key="node_tag">Tb6VAhFrl</data>
113
+ <data key="node_x1">727.8960000000001</data>
114
+ <data key="node_y1">515.5930000000001</data>
115
+ <data key="node_x2">835.214</data>
116
+ <data key="node_y2">667.238</data>
117
+ </node>
118
+ <node id="s16">
119
+ <data key="node_type">off_page</data>
120
+ <data key="node_x1">6279.103</data>
121
+ <data key="node_y1">3393.1580000000004</data>
122
+ <data key="node_x2">6433.081</data>
123
+ <data key="node_y2">3498.143</data>
124
+ </node>
125
+ <node id="s17">
126
+ <data key="node_type">fitting</data>
127
+ <data key="node_x1">734.8950000000001</data>
128
+ <data key="node_y1">860.8770000000001</data>
129
+ <data key="node_x2">830.5480000000001</data>
130
+ <data key="node_y2">1019.5210000000001</data>
131
+ </node>
132
+ <node id="s18">
133
+ <data key="node_type">check_valve</data>
134
+ <data key="node_x1">1294.815</data>
135
+ <data key="node_y1">837.547</data>
136
+ <data key="node_x2">1369.471</data>
137
+ <data key="node_y2">1040.518</data>
138
+ </node>
139
+ <node id="s19">
140
+ <data key="node_type">heat_exchanger</data>
141
+ <data key="node_x1">4095.526</data>
142
+ <data key="node_y1">2413.2980000000002</data>
143
+ <data key="node_x2">4209.843</data>
144
+ <data key="node_y2">2543.946</data>
145
+ </node>
146
+ <node id="s20">
147
+ <data key="node_type">equipment</data>
148
+ <data key="node_x1">5205.923</data>
149
+ <data key="node_y1">2125.851</data>
150
+ <data key="node_x2">5303.909</data>
151
+ <data key="node_y2">2258.8320000000003</data>
152
+ </node>
153
+ <node id="s21">
154
+ <data key="node_type">equipment</data>
155
+ <data key="node_x1">3479.614</data>
156
+ <data key="node_y1">2149.181</data>
157
+ <data key="node_x2">3589.265</data>
158
+ <data key="node_y2">2235.5020000000004</data>
159
+ </node>
160
+ <node id="s22">
161
+ <data key="node_type">equipment</data>
162
+ <data key="node_x1">4643.781</data>
163
+ <data key="node_y1">1530.9360000000001</data>
164
+ <data key="node_x2">4762.764</data>
165
+ <data key="node_y2">1600.926</data>
166
+ </node>
167
+ <node id="s23">
168
+ <data key="node_type">valve</data>
169
+ <data key="node_x1">4128.188</data>
170
+ <data key="node_y1">2805.242</data>
171
+ <data key="node_x2">4174.848</data>
172
+ <data key="node_y2">2830.905</data>
173
+ </node>
174
+ <node id="j1">
175
+ <data key="node_type">junction</data>
176
+ <data key="node_x1">5250</data>
177
+ <data key="node_y1">1847</data>
178
+ <data key="node_x2">5260</data>
179
+ <data key="node_y2">1857</data>
180
+ </node>
181
+ <node id="j2">
182
+ <data key="node_type">junction</data>
183
+ <data key="node_x1">2429</data>
184
+ <data key="node_y1">3442</data>
185
+ <data key="node_x2">2439</data>
186
+ <data key="node_y2">3452</data>
187
+ </node>
188
+ <edge id="e0" source="s15" target="s17">
189
+ <data key="edge_kind">process</data>
190
+ </edge>
191
+ <edge id="e1" source="s17" target="s18">
192
+ <data key="edge_kind">process</data>
193
+ </edge>
194
+ <edge id="e2" source="s15" target="s2">
195
+ <data key="edge_kind">process</data>
196
+ </edge>
197
+ <edge id="e3" source="s2" target="s9">
198
+ <data key="edge_kind">process</data>
199
+ </edge>
200
+ <edge id="e4" source="s9" target="s22">
201
+ <data key="edge_kind">process</data>
202
+ </edge>
203
+ <edge id="e5" source="s4" target="s1">
204
+ <data key="edge_kind">process</data>
205
+ </edge>
206
+ <edge id="e6" source="s4" target="s10">
207
+ <data key="edge_kind">signal</data>
208
+ </edge>
209
+ <edge id="e7" source="s10" target="s11">
210
+ <data key="edge_kind">process</data>
211
+ <data key="edge_line">q=B81</data>
212
+ </edge>
213
+ <edge id="e8" source="s11" target="s21">
214
+ <data key="edge_kind">process</data>
215
+ </edge>
216
+ <edge id="e9" source="s21" target="s20">
217
+ <data key="edge_kind">process</data>
218
+ </edge>
219
+ <edge id="e10" source="s1" target="s19">
220
+ <data key="edge_kind">process</data>
221
+ </edge>
222
+ <edge id="e11" source="s19" target="s23">
223
+ <data key="edge_kind">process</data>
224
+ <data key="edge_line">c)5VDT</data>
225
+ </edge>
226
+ <edge id="e12" source="s23" target="s6">
227
+ <data key="edge_kind">process</data>
228
+ <data key="edge_line">z4=B(</data>
229
+ </edge>
230
+ <edge id="e13" source="s22" target="s8">
231
+ <data key="edge_kind">signal</data>
232
+ </edge>
233
+ <edge id="e14" source="s8" target="j1">
234
+ <data key="edge_kind">signal</data>
235
+ </edge>
236
+ <edge id="e15" source="j1" target="s12">
237
+ <data key="edge_kind">signal</data>
238
+ </edge>
239
+ <edge id="e16" source="j1" target="s20">
240
+ <data key="edge_kind">signal</data>
241
+ </edge>
242
+ <edge id="e17" source="s18" target="s13">
243
+ <data key="edge_kind">process</data>
244
+ </edge>
245
+ <edge id="e18" source="s13" target="s7">
246
+ <data key="edge_kind">process</data>
247
+ <data key="edge_line">%d2!+t15r</data>
248
+ </edge>
249
+ <edge id="e19" source="s6" target="s3">
250
+ <data key="edge_kind">signal</data>
251
+ </edge>
252
+ <edge id="e20" source="s3" target="j2">
253
+ <data key="edge_kind">process</data>
254
+ </edge>
255
+ <edge id="e21" source="s5" target="j2">
256
+ <data key="edge_kind">signal</data>
257
+ </edge>
258
+ <edge id="e22" source="j2" target="s7">
259
+ <data key="edge_kind">process</data>
260
+ </edge>
261
+ <edge id="e23" source="j2" target="s16">
262
+ <data key="edge_kind">process</data>
263
+ </edge>
264
+ <edge id="e24" source="s16" target="s14">
265
+ <data key="edge_kind">process</data>
266
+ <data key="edge_line">=Lst@H</data>
267
+ </edge>
268
+ </graph>
269
+ </graphml>
data/synth-1/out/nodes.csv ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ id,type,tag,x1,y1,x2,y2
2
+ s1,vessel,,4076.862,1083.0,4230.84,1358.294
3
+ s2,equipment,,5180.371,478.26500000000004,5325.017,718.5640000000001
4
+ s3,equipment,,1800.9650000000001,3346.498,1966.6080000000002,3544.803
5
+ s4,equipment,,2902.141,1134.326,3067.784,1316.3
6
+ s5,equipment,,2349.2200000000003,3026.389,2519.529,3178.034
7
+ s6,equipment,,1794.0770000000002,2746.917,1971.3850000000002,2891.563
8
+ s7,equipment,,2349.2200000000003,3661.4530000000004,2519.529,3799.1000000000004
9
+ s8,heat_exchanger,,4662.445,1717.576,4746.433,1985.871
10
+ s9,equipment,,5180.371,1498.2740000000001,5329.683,1635.921
11
+ s10,equipment,,2916.139,1498.2740000000001,3053.786,1635.921
12
+ s11,equipment,,3450.396,1512.272,3620.7050000000004,1619.5900000000001
13
+ s12,valve,,5751.845,1764.236,5856.83,1936.8780000000002
14
+ s13,fitting,,1245.8220000000001,3677.784,1416.131,3780.436
15
+ s14,equipment,,6269.771000000001,4023.068,6440.08,4118.7210000000005
16
+ s15,fitting,Tb6VAhFrl,727.8960000000001,515.5930000000001,835.214,667.238
17
+ s16,off_page,,6279.103,3393.1580000000004,6433.081,3498.143
18
+ s17,fitting,,734.8950000000001,860.8770000000001,830.5480000000001,1019.5210000000001
19
+ s18,check_valve,,1294.815,837.547,1369.471,1040.518
20
+ s19,heat_exchanger,,4095.526,2413.2980000000002,4209.843,2543.946
21
+ s20,equipment,,5205.923,2125.851,5303.909,2258.8320000000003
22
+ s21,equipment,,3479.614,2149.181,3589.265,2235.5020000000004
23
+ s22,equipment,,4643.781,1530.9360000000001,4762.764,1600.926
24
+ s23,valve,,4128.188,2805.242,4174.848,2830.905
25
+ j1,junction,,5250,1847,5260,1857
26
+ j2,junction,,2429,3442,2439,3452
data/synth-1/out/pid.sql ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -- P&ID graph: SQLite and PostgreSQL compatible
2
+ CREATE TABLE components (id TEXT PRIMARY KEY, type TEXT NOT NULL, tag TEXT, x1 REAL, y1 REAL, x2 REAL, y2 REAL);
3
+ CREATE TABLE connections (source TEXT NOT NULL REFERENCES components(id), target TEXT NOT NULL REFERENCES components(id), kind TEXT NOT NULL, line TEXT);
4
+ INSERT INTO components VALUES ('s1', 'vessel', NULL, 4076.862, 1083.0, 4230.84, 1358.294);
5
+ INSERT INTO components VALUES ('s2', 'equipment', NULL, 5180.371, 478.26500000000004, 5325.017, 718.5640000000001);
6
+ INSERT INTO components VALUES ('s3', 'equipment', NULL, 1800.9650000000001, 3346.498, 1966.6080000000002, 3544.803);
7
+ INSERT INTO components VALUES ('s4', 'equipment', NULL, 2902.141, 1134.326, 3067.784, 1316.3);
8
+ INSERT INTO components VALUES ('s5', 'equipment', NULL, 2349.2200000000003, 3026.389, 2519.529, 3178.034);
9
+ INSERT INTO components VALUES ('s6', 'equipment', NULL, 1794.0770000000002, 2746.917, 1971.3850000000002, 2891.563);
10
+ INSERT INTO components VALUES ('s7', 'equipment', NULL, 2349.2200000000003, 3661.4530000000004, 2519.529, 3799.1000000000004);
11
+ INSERT INTO components VALUES ('s8', 'heat_exchanger', NULL, 4662.445, 1717.576, 4746.433, 1985.871);
12
+ INSERT INTO components VALUES ('s9', 'equipment', NULL, 5180.371, 1498.2740000000001, 5329.683, 1635.921);
13
+ INSERT INTO components VALUES ('s10', 'equipment', NULL, 2916.139, 1498.2740000000001, 3053.786, 1635.921);
14
+ INSERT INTO components VALUES ('s11', 'equipment', NULL, 3450.396, 1512.272, 3620.7050000000004, 1619.5900000000001);
15
+ INSERT INTO components VALUES ('s12', 'valve', NULL, 5751.845, 1764.236, 5856.83, 1936.8780000000002);
16
+ INSERT INTO components VALUES ('s13', 'fitting', NULL, 1245.8220000000001, 3677.784, 1416.131, 3780.436);
17
+ INSERT INTO components VALUES ('s14', 'equipment', NULL, 6269.771000000001, 4023.068, 6440.08, 4118.7210000000005);
18
+ INSERT INTO components VALUES ('s15', 'fitting', 'Tb6VAhFrl', 727.8960000000001, 515.5930000000001, 835.214, 667.238);
19
+ INSERT INTO components VALUES ('s16', 'off_page', NULL, 6279.103, 3393.1580000000004, 6433.081, 3498.143);
20
+ INSERT INTO components VALUES ('s17', 'fitting', NULL, 734.8950000000001, 860.8770000000001, 830.5480000000001, 1019.5210000000001);
21
+ INSERT INTO components VALUES ('s18', 'check_valve', NULL, 1294.815, 837.547, 1369.471, 1040.518);
22
+ INSERT INTO components VALUES ('s19', 'heat_exchanger', NULL, 4095.526, 2413.2980000000002, 4209.843, 2543.946);
23
+ INSERT INTO components VALUES ('s20', 'equipment', NULL, 5205.923, 2125.851, 5303.909, 2258.8320000000003);
24
+ INSERT INTO components VALUES ('s21', 'equipment', NULL, 3479.614, 2149.181, 3589.265, 2235.5020000000004);
25
+ INSERT INTO components VALUES ('s22', 'equipment', NULL, 4643.781, 1530.9360000000001, 4762.764, 1600.926);
26
+ INSERT INTO components VALUES ('s23', 'valve', NULL, 4128.188, 2805.242, 4174.848, 2830.905);
27
+ INSERT INTO components VALUES ('j1', 'junction', NULL, 5250, 1847, 5260, 1857);
28
+ INSERT INTO components VALUES ('j2', 'junction', NULL, 2429, 3442, 2439, 3452);
29
+ INSERT INTO connections VALUES ('s15', 's17', 'process', NULL);
30
+ INSERT INTO connections VALUES ('s17', 's18', 'process', NULL);
31
+ INSERT INTO connections VALUES ('s15', 's2', 'process', NULL);
32
+ INSERT INTO connections VALUES ('s2', 's9', 'process', NULL);
33
+ INSERT INTO connections VALUES ('s9', 's22', 'process', NULL);
34
+ INSERT INTO connections VALUES ('s4', 's1', 'process', NULL);
35
+ INSERT INTO connections VALUES ('s4', 's10', 'signal', NULL);
36
+ INSERT INTO connections VALUES ('s10', 's11', 'process', 'q=B81');
37
+ INSERT INTO connections VALUES ('s11', 's21', 'process', NULL);
38
+ INSERT INTO connections VALUES ('s21', 's20', 'process', NULL);
39
+ INSERT INTO connections VALUES ('s1', 's19', 'process', NULL);
40
+ INSERT INTO connections VALUES ('s19', 's23', 'process', 'c)5VDT');
41
+ INSERT INTO connections VALUES ('s23', 's6', 'process', 'z4=B(');
42
+ INSERT INTO connections VALUES ('s22', 's8', 'signal', NULL);
43
+ INSERT INTO connections VALUES ('s8', 'j1', 'signal', NULL);
44
+ INSERT INTO connections VALUES ('j1', 's12', 'signal', NULL);
45
+ INSERT INTO connections VALUES ('j1', 's20', 'signal', NULL);
46
+ INSERT INTO connections VALUES ('s18', 's13', 'process', NULL);
47
+ INSERT INTO connections VALUES ('s13', 's7', 'process', '%d2!+t15r');
48
+ INSERT INTO connections VALUES ('s6', 's3', 'signal', NULL);
49
+ INSERT INTO connections VALUES ('s3', 'j2', 'process', NULL);
50
+ INSERT INTO connections VALUES ('s5', 'j2', 'signal', NULL);
51
+ INSERT INTO connections VALUES ('j2', 's7', 'process', NULL);
52
+ INSERT INTO connections VALUES ('j2', 's16', 'process', NULL);
53
+ INSERT INTO connections VALUES ('s16', 's14', 'process', '=Lst@H');
data/synth-2/drawing.jpg ADDED

Git LFS Details

  • SHA256: 1045ffa0d46ff0934f1b5ac2363686a142ba8da762c8f7ebf97e9714e7c7ded2
  • Pointer size: 131 Bytes
  • Size of remote file: 125 kB
data/synth-2/graph.json ADDED
@@ -0,0 +1,469 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image": {
3
+ "file": "drawing.jpg",
4
+ "width": 7000,
5
+ "height": 4500
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "s1",
10
+ "type": "column",
11
+ "tag": null,
12
+ "bbox": [
13
+ 3985.875,
14
+ 3150.526,
15
+ 4142.186,
16
+ 3495.8100000000004
17
+ ]
18
+ },
19
+ {
20
+ "id": "s2",
21
+ "type": "tank",
22
+ "tag": null,
23
+ "bbox": [
24
+ 459.60100000000006,
25
+ 1077.846,
26
+ 690.5680000000001,
27
+ 1271.4850000000001
28
+ ]
29
+ },
30
+ {
31
+ "id": "s3",
32
+ "type": "vessel",
33
+ "tag": null,
34
+ "bbox": [
35
+ 2185.91,
36
+ 1430.1290000000001,
37
+ 2454.205,
38
+ 1584.1070000000002
39
+ ]
40
+ },
41
+ {
42
+ "id": "s4",
43
+ "type": "equipment",
44
+ "tag": null,
45
+ "bbox": [
46
+ 5287.578,
47
+ 2284.983,
48
+ 5490.549,
49
+ 2487.954
50
+ ]
51
+ },
52
+ {
53
+ "id": "s5",
54
+ "type": "equipment",
55
+ "tag": null,
56
+ "bbox": [
57
+ 921.5350000000001,
58
+ 1647.586,
59
+ 1066.181,
60
+ 1915.881
61
+ ]
62
+ },
63
+ {
64
+ "id": "s6",
65
+ "type": "equipment",
66
+ "tag": null,
67
+ "bbox": [
68
+ 6111.127,
69
+ 2034.3760000000002,
70
+ 6342.094,
71
+ 2190.6870000000004
72
+ ]
73
+ },
74
+ {
75
+ "id": "s7",
76
+ "type": "vessel",
77
+ "tag": null,
78
+ "bbox": [
79
+ 4793.093,
80
+ 2912.56,
81
+ 5005.396000000001,
82
+ 3071.204
83
+ ]
84
+ },
85
+ {
86
+ "id": "s8",
87
+ "type": "equipment",
88
+ "tag": null,
89
+ "bbox": [
90
+ 895.8720000000001,
91
+ 489.93000000000006,
92
+ 1091.844,
93
+ 650.907
94
+ ]
95
+ },
96
+ {
97
+ "id": "s10",
98
+ "type": "equipment",
99
+ "tag": null,
100
+ "bbox": [
101
+ 4825.755,
102
+ 2036.709,
103
+ 4977.4,
104
+ 2188.3540000000003
105
+ ]
106
+ },
107
+ {
108
+ "id": "s11",
109
+ "type": "equipment",
110
+ "tag": null,
111
+ "bbox": [
112
+ 4384.818,
113
+ 2658.263,
114
+ 4576.124,
115
+ 2777.246
116
+ ]
117
+ },
118
+ {
119
+ "id": "s12",
120
+ "type": "equipment",
121
+ "tag": null,
122
+ "bbox": [
123
+ 4384.818,
124
+ 3540.137,
125
+ 4576.124,
126
+ 3659.12
127
+ ]
128
+ },
129
+ {
130
+ "id": "s13",
131
+ "type": "vessel",
132
+ "tag": null,
133
+ "bbox": [
134
+ 5329.683,
135
+ 2630.267,
136
+ 5444.0,
137
+ 2826.239
138
+ ]
139
+ },
140
+ {
141
+ "id": "s14",
142
+ "type": "heat_exchanger",
143
+ "tag": null,
144
+ "bbox": [
145
+ 5749.512000000001,
146
+ 2282.65,
147
+ 5866.162,
148
+ 2473.956
149
+ ]
150
+ },
151
+ {
152
+ "id": "s15",
153
+ "type": "equipment",
154
+ "tag": null,
155
+ "bbox": [
156
+ 3095.78,
157
+ 1698.912,
158
+ 3217.0960000000005,
159
+ 1864.555
160
+ ]
161
+ },
162
+ {
163
+ "id": "s16",
164
+ "type": "equipment",
165
+ "tag": null,
166
+ "bbox": [
167
+ 6171.785,
168
+ 3845.76,
169
+ 6281.436,
170
+ 4011.4030000000002
171
+ ]
172
+ },
173
+ {
174
+ "id": "s17",
175
+ "type": "equipment",
176
+ "tag": null,
177
+ "bbox": [
178
+ 3105.112,
179
+ 3841.094,
180
+ 3207.764,
181
+ 4013.736
182
+ ]
183
+ },
184
+ {
185
+ "id": "s19",
186
+ "type": "equipment",
187
+ "tag": null,
188
+ "bbox": [
189
+ 3574.045,
190
+ 3271.3540000000003,
191
+ 3714.025,
192
+ 3376.3390000000004
193
+ ]
194
+ },
195
+ {
196
+ "id": "s20",
197
+ "type": "equipment",
198
+ "tag": null,
199
+ "bbox": [
200
+ 1346.141,
201
+ 846.879,
202
+ 1479.122,
203
+ 954.1970000000001
204
+ ]
205
+ },
206
+ {
207
+ "id": "s21",
208
+ "type": "heat_exchanger",
209
+ "tag": null,
210
+ "bbox": [
211
+ 1847.736,
212
+ 2664.7740000000003,
213
+ 1952.7210000000002,
214
+ 2769.759
215
+ ]
216
+ },
217
+ {
218
+ "id": "s22",
219
+ "type": "equipment",
220
+ "tag": null,
221
+ "bbox": [
222
+ 1376.47,
223
+ 1106.33,
224
+ 1446.46,
225
+ 1243.977
226
+ ]
227
+ },
228
+ {
229
+ "id": "s23",
230
+ "type": "pump",
231
+ "tag": null,
232
+ "bbox": [
233
+ 2687.505,
234
+ 1460.458,
235
+ 2790.157,
236
+ 1551.4450000000002
237
+ ]
238
+ },
239
+ {
240
+ "id": "s24",
241
+ "type": "pump",
242
+ "tag": null,
243
+ "bbox": [
244
+ 3598.597,
245
+ 3554.135,
246
+ 3691.917,
247
+ 3642.789
248
+ ]
249
+ },
250
+ {
251
+ "id": "s25",
252
+ "type": "valve",
253
+ "tag": null,
254
+ "bbox": [
255
+ 2297.8940000000002,
256
+ 2704.4350000000004,
257
+ 2339.888,
258
+ 2730.098
259
+ ]
260
+ },
261
+ {
262
+ "id": "j1",
263
+ "type": "junction",
264
+ "tag": null,
265
+ "bbox": [
266
+ 990,
267
+ 1170,
268
+ 1000,
269
+ 1180
270
+ ]
271
+ },
272
+ {
273
+ "id": "j2",
274
+ "type": "junction",
275
+ "tag": null,
276
+ "bbox": [
277
+ 1895,
278
+ 1775,
279
+ 1905,
280
+ 1785
281
+ ]
282
+ },
283
+ {
284
+ "id": "j3",
285
+ "type": "junction",
286
+ "tag": null,
287
+ "bbox": [
288
+ 2735,
289
+ 1775,
290
+ 2745,
291
+ 1785
292
+ ]
293
+ },
294
+ {
295
+ "id": "j4",
296
+ "type": "junction",
297
+ "tag": null,
298
+ "bbox": [
299
+ 4475,
300
+ 2975,
301
+ 4485,
302
+ 2985
303
+ ]
304
+ },
305
+ {
306
+ "id": "j5",
307
+ "type": "junction",
308
+ "tag": null,
309
+ "bbox": [
310
+ 4895,
311
+ 2695,
312
+ 4905,
313
+ 2705
314
+ ]
315
+ }
316
+ ],
317
+ "edges": [
318
+ {
319
+ "source": "s20",
320
+ "target": "s22",
321
+ "kind": "process"
322
+ },
323
+ {
324
+ "source": "s22",
325
+ "target": "j1",
326
+ "kind": "process"
327
+ },
328
+ {
329
+ "source": "j1",
330
+ "target": "s5",
331
+ "kind": "process"
332
+ },
333
+ {
334
+ "source": "s5",
335
+ "target": "j2",
336
+ "kind": "process"
337
+ },
338
+ {
339
+ "source": "j2",
340
+ "target": "j3",
341
+ "kind": "process"
342
+ },
343
+ {
344
+ "source": "j2",
345
+ "target": "s21",
346
+ "kind": "process"
347
+ },
348
+ {
349
+ "source": "s21",
350
+ "target": "s25",
351
+ "kind": "process"
352
+ },
353
+ {
354
+ "source": "s3",
355
+ "target": "s23",
356
+ "kind": "process"
357
+ },
358
+ {
359
+ "source": "s23",
360
+ "target": "j3",
361
+ "kind": "process"
362
+ },
363
+ {
364
+ "source": "j3",
365
+ "target": "j4",
366
+ "kind": "process"
367
+ },
368
+ {
369
+ "source": "j4",
370
+ "target": "s11",
371
+ "kind": "process"
372
+ },
373
+ {
374
+ "source": "j4",
375
+ "target": "s7",
376
+ "kind": "process"
377
+ },
378
+ {
379
+ "source": "s11",
380
+ "target": "j5",
381
+ "kind": "process"
382
+ },
383
+ {
384
+ "source": "j5",
385
+ "target": "s7",
386
+ "kind": "process"
387
+ },
388
+ {
389
+ "source": "j5",
390
+ "target": "s13",
391
+ "kind": "process"
392
+ },
393
+ {
394
+ "source": "s13",
395
+ "target": "s4",
396
+ "kind": "process"
397
+ },
398
+ {
399
+ "source": "s4",
400
+ "target": "s14",
401
+ "kind": "process"
402
+ },
403
+ {
404
+ "source": "s10",
405
+ "target": "s6",
406
+ "kind": "process"
407
+ },
408
+ {
409
+ "source": "s19",
410
+ "target": "s1",
411
+ "kind": "process"
412
+ },
413
+ {
414
+ "source": "s19",
415
+ "target": "s24",
416
+ "kind": "process"
417
+ },
418
+ {
419
+ "source": "s24",
420
+ "target": "s12",
421
+ "kind": "process"
422
+ },
423
+ {
424
+ "source": "s17",
425
+ "target": "s16",
426
+ "kind": "process"
427
+ },
428
+ {
429
+ "source": "s16",
430
+ "target": "s6",
431
+ "kind": "process"
432
+ },
433
+ {
434
+ "source": "s2",
435
+ "target": "j1",
436
+ "kind": "signal"
437
+ },
438
+ {
439
+ "source": "s8",
440
+ "target": "j1",
441
+ "kind": "signal"
442
+ },
443
+ {
444
+ "source": "s8",
445
+ "target": "j2",
446
+ "kind": "signal"
447
+ },
448
+ {
449
+ "source": "j3",
450
+ "target": "s15",
451
+ "kind": "signal"
452
+ },
453
+ {
454
+ "source": "s15",
455
+ "target": "s17",
456
+ "kind": "signal"
457
+ },
458
+ {
459
+ "source": "s10",
460
+ "target": "j5",
461
+ "kind": "signal"
462
+ },
463
+ {
464
+ "source": "j4",
465
+ "target": "s12",
466
+ "kind": "signal"
467
+ }
468
+ ]
469
+ }
data/synth-2/out/edges.csv ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ source,target,kind,line
2
+ s20,s22,process,
3
+ s22,j1,process,
4
+ j1,s5,process,
5
+ s5,j2,process,
6
+ j2,j3,process,
7
+ j2,s21,process,
8
+ s21,s25,process,
9
+ s3,s23,process,
10
+ s23,j3,process,
11
+ j3,j4,process,
12
+ j4,s11,process,
13
+ j4,s7,process,
14
+ s11,j5,process,
15
+ j5,s7,process,
16
+ j5,s13,process,
17
+ s13,s4,process,
18
+ s4,s14,process,
19
+ s10,s6,process,
20
+ s19,s1,process,
21
+ s19,s24,process,
22
+ s24,s12,process,
23
+ s17,s16,process,
24
+ s16,s6,process,
25
+ s2,j1,signal,
26
+ s8,j1,signal,
27
+ s8,j2,signal,
28
+ j3,s15,signal,
29
+ s15,s17,signal,
30
+ s10,j5,signal,
31
+ j4,s12,signal,
data/synth-2/out/graph.cypher ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CREATE (:Component {id: 's1', type: 'column', x1: 3985.875, y1: 3150.526, x2: 4142.186, y2: 3495.8100000000004});
2
+ CREATE (:Component {id: 's2', type: 'tank', x1: 459.60100000000006, y1: 1077.846, x2: 690.5680000000001, y2: 1271.4850000000001});
3
+ CREATE (:Component {id: 's3', type: 'vessel', x1: 2185.91, y1: 1430.1290000000001, x2: 2454.205, y2: 1584.1070000000002});
4
+ CREATE (:Component {id: 's4', type: 'equipment', x1: 5287.578, y1: 2284.983, x2: 5490.549, y2: 2487.954});
5
+ CREATE (:Component {id: 's5', type: 'equipment', x1: 921.5350000000001, y1: 1647.586, x2: 1066.181, y2: 1915.881});
6
+ CREATE (:Component {id: 's6', type: 'equipment', x1: 6111.127, y1: 2034.3760000000002, x2: 6342.094, y2: 2190.6870000000004});
7
+ CREATE (:Component {id: 's7', type: 'vessel', x1: 4793.093, y1: 2912.56, x2: 5005.396000000001, y2: 3071.204});
8
+ CREATE (:Component {id: 's8', type: 'equipment', x1: 895.8720000000001, y1: 489.93000000000006, x2: 1091.844, y2: 650.907});
9
+ CREATE (:Component {id: 's10', type: 'equipment', x1: 4825.755, y1: 2036.709, x2: 4977.4, y2: 2188.3540000000003});
10
+ CREATE (:Component {id: 's11', type: 'equipment', x1: 4384.818, y1: 2658.263, x2: 4576.124, y2: 2777.246});
11
+ CREATE (:Component {id: 's12', type: 'equipment', x1: 4384.818, y1: 3540.137, x2: 4576.124, y2: 3659.12});
12
+ CREATE (:Component {id: 's13', type: 'vessel', x1: 5329.683, y1: 2630.267, x2: 5444.0, y2: 2826.239});
13
+ CREATE (:Component {id: 's14', type: 'heat_exchanger', x1: 5749.512000000001, y1: 2282.65, x2: 5866.162, y2: 2473.956});
14
+ CREATE (:Component {id: 's15', type: 'equipment', x1: 3095.78, y1: 1698.912, x2: 3217.0960000000005, y2: 1864.555});
15
+ CREATE (:Component {id: 's16', type: 'equipment', x1: 6171.785, y1: 3845.76, x2: 6281.436, y2: 4011.4030000000002});
16
+ CREATE (:Component {id: 's17', type: 'equipment', x1: 3105.112, y1: 3841.094, x2: 3207.764, y2: 4013.736});
17
+ CREATE (:Component {id: 's19', type: 'equipment', x1: 3574.045, y1: 3271.3540000000003, x2: 3714.025, y2: 3376.3390000000004});
18
+ CREATE (:Component {id: 's20', type: 'equipment', x1: 1346.141, y1: 846.879, x2: 1479.122, y2: 954.1970000000001});
19
+ CREATE (:Component {id: 's21', type: 'heat_exchanger', x1: 1847.736, y1: 2664.7740000000003, x2: 1952.7210000000002, y2: 2769.759});
20
+ CREATE (:Component {id: 's22', type: 'equipment', x1: 1376.47, y1: 1106.33, x2: 1446.46, y2: 1243.977});
21
+ CREATE (:Component {id: 's23', type: 'pump', x1: 2687.505, y1: 1460.458, x2: 2790.157, y2: 1551.4450000000002});
22
+ CREATE (:Component {id: 's24', type: 'pump', x1: 3598.597, y1: 3554.135, x2: 3691.917, y2: 3642.789});
23
+ CREATE (:Component {id: 's25', type: 'valve', x1: 2297.8940000000002, y1: 2704.4350000000004, x2: 2339.888, y2: 2730.098});
24
+ CREATE (:Junction {id: 'j1', type: 'junction', x1: 990, y1: 1170, x2: 1000, y2: 1180});
25
+ CREATE (:Junction {id: 'j2', type: 'junction', x1: 1895, y1: 1775, x2: 1905, y2: 1785});
26
+ CREATE (:Junction {id: 'j3', type: 'junction', x1: 2735, y1: 1775, x2: 2745, y2: 1785});
27
+ CREATE (:Junction {id: 'j4', type: 'junction', x1: 4475, y1: 2975, x2: 4485, y2: 2985});
28
+ CREATE (:Junction {id: 'j5', type: 'junction', x1: 4895, y1: 2695, x2: 4905, y2: 2705});
29
+ MATCH (a {id: 's20'}), (b {id: 's22'}) CREATE (a)-[:PIPE]->(b);
30
+ MATCH (a {id: 's22'}), (b {id: 'j1'}) CREATE (a)-[:PIPE]->(b);
31
+ MATCH (a {id: 'j1'}), (b {id: 's5'}) CREATE (a)-[:PIPE]->(b);
32
+ MATCH (a {id: 's5'}), (b {id: 'j2'}) CREATE (a)-[:PIPE]->(b);
33
+ MATCH (a {id: 'j2'}), (b {id: 'j3'}) CREATE (a)-[:PIPE]->(b);
34
+ MATCH (a {id: 'j2'}), (b {id: 's21'}) CREATE (a)-[:PIPE]->(b);
35
+ MATCH (a {id: 's21'}), (b {id: 's25'}) CREATE (a)-[:PIPE]->(b);
36
+ MATCH (a {id: 's3'}), (b {id: 's23'}) CREATE (a)-[:PIPE]->(b);
37
+ MATCH (a {id: 's23'}), (b {id: 'j3'}) CREATE (a)-[:PIPE]->(b);
38
+ MATCH (a {id: 'j3'}), (b {id: 'j4'}) CREATE (a)-[:PIPE]->(b);
39
+ MATCH (a {id: 'j4'}), (b {id: 's11'}) CREATE (a)-[:PIPE]->(b);
40
+ MATCH (a {id: 'j4'}), (b {id: 's7'}) CREATE (a)-[:PIPE]->(b);
41
+ MATCH (a {id: 's11'}), (b {id: 'j5'}) CREATE (a)-[:PIPE]->(b);
42
+ MATCH (a {id: 'j5'}), (b {id: 's7'}) CREATE (a)-[:PIPE]->(b);
43
+ MATCH (a {id: 'j5'}), (b {id: 's13'}) CREATE (a)-[:PIPE]->(b);
44
+ MATCH (a {id: 's13'}), (b {id: 's4'}) CREATE (a)-[:PIPE]->(b);
45
+ MATCH (a {id: 's4'}), (b {id: 's14'}) CREATE (a)-[:PIPE]->(b);
46
+ MATCH (a {id: 's10'}), (b {id: 's6'}) CREATE (a)-[:PIPE]->(b);
47
+ MATCH (a {id: 's19'}), (b {id: 's1'}) CREATE (a)-[:PIPE]->(b);
48
+ MATCH (a {id: 's19'}), (b {id: 's24'}) CREATE (a)-[:PIPE]->(b);
49
+ MATCH (a {id: 's24'}), (b {id: 's12'}) CREATE (a)-[:PIPE]->(b);
50
+ MATCH (a {id: 's17'}), (b {id: 's16'}) CREATE (a)-[:PIPE]->(b);
51
+ MATCH (a {id: 's16'}), (b {id: 's6'}) CREATE (a)-[:PIPE]->(b);
52
+ MATCH (a {id: 's2'}), (b {id: 'j1'}) CREATE (a)-[:SIGNAL]->(b);
53
+ MATCH (a {id: 's8'}), (b {id: 'j1'}) CREATE (a)-[:SIGNAL]->(b);
54
+ MATCH (a {id: 's8'}), (b {id: 'j2'}) CREATE (a)-[:SIGNAL]->(b);
55
+ MATCH (a {id: 'j3'}), (b {id: 's15'}) CREATE (a)-[:SIGNAL]->(b);
56
+ MATCH (a {id: 's15'}), (b {id: 's17'}) CREATE (a)-[:SIGNAL]->(b);
57
+ MATCH (a {id: 's10'}), (b {id: 'j5'}) CREATE (a)-[:SIGNAL]->(b);
58
+ MATCH (a {id: 'j4'}), (b {id: 's12'}) CREATE (a)-[:SIGNAL]->(b);
data/synth-2/out/graph.graphml ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <graphml xmlns="http://graphml.graphdrawing.org/xmlns">
3
+ <key id="node_type" for="node" attr.name="type" attr.type="string" />
4
+ <key id="node_tag" for="node" attr.name="tag" attr.type="string" />
5
+ <key id="node_x1" for="node" attr.name="x1" attr.type="double" />
6
+ <key id="node_y1" for="node" attr.name="y1" attr.type="double" />
7
+ <key id="node_x2" for="node" attr.name="x2" attr.type="double" />
8
+ <key id="node_y2" for="node" attr.name="y2" attr.type="double" />
9
+ <key id="edge_kind" for="edge" attr.name="kind" attr.type="string" />
10
+ <key id="edge_line" for="edge" attr.name="line" attr.type="string" />
11
+ <graph edgedefault="undirected">
12
+ <node id="s1">
13
+ <data key="node_type">column</data>
14
+ <data key="node_x1">3985.875</data>
15
+ <data key="node_y1">3150.526</data>
16
+ <data key="node_x2">4142.186</data>
17
+ <data key="node_y2">3495.8100000000004</data>
18
+ </node>
19
+ <node id="s2">
20
+ <data key="node_type">tank</data>
21
+ <data key="node_x1">459.60100000000006</data>
22
+ <data key="node_y1">1077.846</data>
23
+ <data key="node_x2">690.5680000000001</data>
24
+ <data key="node_y2">1271.4850000000001</data>
25
+ </node>
26
+ <node id="s3">
27
+ <data key="node_type">vessel</data>
28
+ <data key="node_x1">2185.91</data>
29
+ <data key="node_y1">1430.1290000000001</data>
30
+ <data key="node_x2">2454.205</data>
31
+ <data key="node_y2">1584.1070000000002</data>
32
+ </node>
33
+ <node id="s4">
34
+ <data key="node_type">equipment</data>
35
+ <data key="node_x1">5287.578</data>
36
+ <data key="node_y1">2284.983</data>
37
+ <data key="node_x2">5490.549</data>
38
+ <data key="node_y2">2487.954</data>
39
+ </node>
40
+ <node id="s5">
41
+ <data key="node_type">equipment</data>
42
+ <data key="node_x1">921.5350000000001</data>
43
+ <data key="node_y1">1647.586</data>
44
+ <data key="node_x2">1066.181</data>
45
+ <data key="node_y2">1915.881</data>
46
+ </node>
47
+ <node id="s6">
48
+ <data key="node_type">equipment</data>
49
+ <data key="node_x1">6111.127</data>
50
+ <data key="node_y1">2034.3760000000002</data>
51
+ <data key="node_x2">6342.094</data>
52
+ <data key="node_y2">2190.6870000000004</data>
53
+ </node>
54
+ <node id="s7">
55
+ <data key="node_type">vessel</data>
56
+ <data key="node_x1">4793.093</data>
57
+ <data key="node_y1">2912.56</data>
58
+ <data key="node_x2">5005.396000000001</data>
59
+ <data key="node_y2">3071.204</data>
60
+ </node>
61
+ <node id="s8">
62
+ <data key="node_type">equipment</data>
63
+ <data key="node_x1">895.8720000000001</data>
64
+ <data key="node_y1">489.93000000000006</data>
65
+ <data key="node_x2">1091.844</data>
66
+ <data key="node_y2">650.907</data>
67
+ </node>
68
+ <node id="s10">
69
+ <data key="node_type">equipment</data>
70
+ <data key="node_x1">4825.755</data>
71
+ <data key="node_y1">2036.709</data>
72
+ <data key="node_x2">4977.4</data>
73
+ <data key="node_y2">2188.3540000000003</data>
74
+ </node>
75
+ <node id="s11">
76
+ <data key="node_type">equipment</data>
77
+ <data key="node_x1">4384.818</data>
78
+ <data key="node_y1">2658.263</data>
79
+ <data key="node_x2">4576.124</data>
80
+ <data key="node_y2">2777.246</data>
81
+ </node>
82
+ <node id="s12">
83
+ <data key="node_type">equipment</data>
84
+ <data key="node_x1">4384.818</data>
85
+ <data key="node_y1">3540.137</data>
86
+ <data key="node_x2">4576.124</data>
87
+ <data key="node_y2">3659.12</data>
88
+ </node>
89
+ <node id="s13">
90
+ <data key="node_type">vessel</data>
91
+ <data key="node_x1">5329.683</data>
92
+ <data key="node_y1">2630.267</data>
93
+ <data key="node_x2">5444.0</data>
94
+ <data key="node_y2">2826.239</data>
95
+ </node>
96
+ <node id="s14">
97
+ <data key="node_type">heat_exchanger</data>
98
+ <data key="node_x1">5749.512000000001</data>
99
+ <data key="node_y1">2282.65</data>
100
+ <data key="node_x2">5866.162</data>
101
+ <data key="node_y2">2473.956</data>
102
+ </node>
103
+ <node id="s15">
104
+ <data key="node_type">equipment</data>
105
+ <data key="node_x1">3095.78</data>
106
+ <data key="node_y1">1698.912</data>
107
+ <data key="node_x2">3217.0960000000005</data>
108
+ <data key="node_y2">1864.555</data>
109
+ </node>
110
+ <node id="s16">
111
+ <data key="node_type">equipment</data>
112
+ <data key="node_x1">6171.785</data>
113
+ <data key="node_y1">3845.76</data>
114
+ <data key="node_x2">6281.436</data>
115
+ <data key="node_y2">4011.4030000000002</data>
116
+ </node>
117
+ <node id="s17">
118
+ <data key="node_type">equipment</data>
119
+ <data key="node_x1">3105.112</data>
120
+ <data key="node_y1">3841.094</data>
121
+ <data key="node_x2">3207.764</data>
122
+ <data key="node_y2">4013.736</data>
123
+ </node>
124
+ <node id="s19">
125
+ <data key="node_type">equipment</data>
126
+ <data key="node_x1">3574.045</data>
127
+ <data key="node_y1">3271.3540000000003</data>
128
+ <data key="node_x2">3714.025</data>
129
+ <data key="node_y2">3376.3390000000004</data>
130
+ </node>
131
+ <node id="s20">
132
+ <data key="node_type">equipment</data>
133
+ <data key="node_x1">1346.141</data>
134
+ <data key="node_y1">846.879</data>
135
+ <data key="node_x2">1479.122</data>
136
+ <data key="node_y2">954.1970000000001</data>
137
+ </node>
138
+ <node id="s21">
139
+ <data key="node_type">heat_exchanger</data>
140
+ <data key="node_x1">1847.736</data>
141
+ <data key="node_y1">2664.7740000000003</data>
142
+ <data key="node_x2">1952.7210000000002</data>
143
+ <data key="node_y2">2769.759</data>
144
+ </node>
145
+ <node id="s22">
146
+ <data key="node_type">equipment</data>
147
+ <data key="node_x1">1376.47</data>
148
+ <data key="node_y1">1106.33</data>
149
+ <data key="node_x2">1446.46</data>
150
+ <data key="node_y2">1243.977</data>
151
+ </node>
152
+ <node id="s23">
153
+ <data key="node_type">pump</data>
154
+ <data key="node_x1">2687.505</data>
155
+ <data key="node_y1">1460.458</data>
156
+ <data key="node_x2">2790.157</data>
157
+ <data key="node_y2">1551.4450000000002</data>
158
+ </node>
159
+ <node id="s24">
160
+ <data key="node_type">pump</data>
161
+ <data key="node_x1">3598.597</data>
162
+ <data key="node_y1">3554.135</data>
163
+ <data key="node_x2">3691.917</data>
164
+ <data key="node_y2">3642.789</data>
165
+ </node>
166
+ <node id="s25">
167
+ <data key="node_type">valve</data>
168
+ <data key="node_x1">2297.8940000000002</data>
169
+ <data key="node_y1">2704.4350000000004</data>
170
+ <data key="node_x2">2339.888</data>
171
+ <data key="node_y2">2730.098</data>
172
+ </node>
173
+ <node id="j1">
174
+ <data key="node_type">junction</data>
175
+ <data key="node_x1">990</data>
176
+ <data key="node_y1">1170</data>
177
+ <data key="node_x2">1000</data>
178
+ <data key="node_y2">1180</data>
179
+ </node>
180
+ <node id="j2">
181
+ <data key="node_type">junction</data>
182
+ <data key="node_x1">1895</data>
183
+ <data key="node_y1">1775</data>
184
+ <data key="node_x2">1905</data>
185
+ <data key="node_y2">1785</data>
186
+ </node>
187
+ <node id="j3">
188
+ <data key="node_type">junction</data>
189
+ <data key="node_x1">2735</data>
190
+ <data key="node_y1">1775</data>
191
+ <data key="node_x2">2745</data>
192
+ <data key="node_y2">1785</data>
193
+ </node>
194
+ <node id="j4">
195
+ <data key="node_type">junction</data>
196
+ <data key="node_x1">4475</data>
197
+ <data key="node_y1">2975</data>
198
+ <data key="node_x2">4485</data>
199
+ <data key="node_y2">2985</data>
200
+ </node>
201
+ <node id="j5">
202
+ <data key="node_type">junction</data>
203
+ <data key="node_x1">4895</data>
204
+ <data key="node_y1">2695</data>
205
+ <data key="node_x2">4905</data>
206
+ <data key="node_y2">2705</data>
207
+ </node>
208
+ <edge id="e0" source="s20" target="s22">
209
+ <data key="edge_kind">process</data>
210
+ </edge>
211
+ <edge id="e1" source="s22" target="j1">
212
+ <data key="edge_kind">process</data>
213
+ </edge>
214
+ <edge id="e2" source="j1" target="s5">
215
+ <data key="edge_kind">process</data>
216
+ </edge>
217
+ <edge id="e3" source="s5" target="j2">
218
+ <data key="edge_kind">process</data>
219
+ </edge>
220
+ <edge id="e4" source="j2" target="j3">
221
+ <data key="edge_kind">process</data>
222
+ </edge>
223
+ <edge id="e5" source="j2" target="s21">
224
+ <data key="edge_kind">process</data>
225
+ </edge>
226
+ <edge id="e6" source="s21" target="s25">
227
+ <data key="edge_kind">process</data>
228
+ </edge>
229
+ <edge id="e7" source="s3" target="s23">
230
+ <data key="edge_kind">process</data>
231
+ </edge>
232
+ <edge id="e8" source="s23" target="j3">
233
+ <data key="edge_kind">process</data>
234
+ </edge>
235
+ <edge id="e9" source="j3" target="j4">
236
+ <data key="edge_kind">process</data>
237
+ </edge>
238
+ <edge id="e10" source="j4" target="s11">
239
+ <data key="edge_kind">process</data>
240
+ </edge>
241
+ <edge id="e11" source="j4" target="s7">
242
+ <data key="edge_kind">process</data>
243
+ </edge>
244
+ <edge id="e12" source="s11" target="j5">
245
+ <data key="edge_kind">process</data>
246
+ </edge>
247
+ <edge id="e13" source="j5" target="s7">
248
+ <data key="edge_kind">process</data>
249
+ </edge>
250
+ <edge id="e14" source="j5" target="s13">
251
+ <data key="edge_kind">process</data>
252
+ </edge>
253
+ <edge id="e15" source="s13" target="s4">
254
+ <data key="edge_kind">process</data>
255
+ </edge>
256
+ <edge id="e16" source="s4" target="s14">
257
+ <data key="edge_kind">process</data>
258
+ </edge>
259
+ <edge id="e17" source="s10" target="s6">
260
+ <data key="edge_kind">process</data>
261
+ </edge>
262
+ <edge id="e18" source="s19" target="s1">
263
+ <data key="edge_kind">process</data>
264
+ </edge>
265
+ <edge id="e19" source="s19" target="s24">
266
+ <data key="edge_kind">process</data>
267
+ </edge>
268
+ <edge id="e20" source="s24" target="s12">
269
+ <data key="edge_kind">process</data>
270
+ </edge>
271
+ <edge id="e21" source="s17" target="s16">
272
+ <data key="edge_kind">process</data>
273
+ </edge>
274
+ <edge id="e22" source="s16" target="s6">
275
+ <data key="edge_kind">process</data>
276
+ </edge>
277
+ <edge id="e23" source="s2" target="j1">
278
+ <data key="edge_kind">signal</data>
279
+ </edge>
280
+ <edge id="e24" source="s8" target="j1">
281
+ <data key="edge_kind">signal</data>
282
+ </edge>
283
+ <edge id="e25" source="s8" target="j2">
284
+ <data key="edge_kind">signal</data>
285
+ </edge>
286
+ <edge id="e26" source="j3" target="s15">
287
+ <data key="edge_kind">signal</data>
288
+ </edge>
289
+ <edge id="e27" source="s15" target="s17">
290
+ <data key="edge_kind">signal</data>
291
+ </edge>
292
+ <edge id="e28" source="s10" target="j5">
293
+ <data key="edge_kind">signal</data>
294
+ </edge>
295
+ <edge id="e29" source="j4" target="s12">
296
+ <data key="edge_kind">signal</data>
297
+ </edge>
298
+ </graph>
299
+ </graphml>
data/synth-2/out/graph.json ADDED
@@ -0,0 +1,469 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image": {
3
+ "file": "drawing.jpg",
4
+ "width": 7000,
5
+ "height": 4500
6
+ },
7
+ "nodes": [
8
+ {
9
+ "id": "s1",
10
+ "type": "column",
11
+ "tag": null,
12
+ "bbox": [
13
+ 3985.875,
14
+ 3150.526,
15
+ 4142.186,
16
+ 3495.8100000000004
17
+ ]
18
+ },
19
+ {
20
+ "id": "s2",
21
+ "type": "tank",
22
+ "tag": null,
23
+ "bbox": [
24
+ 459.60100000000006,
25
+ 1077.846,
26
+ 690.5680000000001,
27
+ 1271.4850000000001
28
+ ]
29
+ },
30
+ {
31
+ "id": "s3",
32
+ "type": "vessel",
33
+ "tag": null,
34
+ "bbox": [
35
+ 2185.91,
36
+ 1430.1290000000001,
37
+ 2454.205,
38
+ 1584.1070000000002
39
+ ]
40
+ },
41
+ {
42
+ "id": "s4",
43
+ "type": "equipment",
44
+ "tag": null,
45
+ "bbox": [
46
+ 5287.578,
47
+ 2284.983,
48
+ 5490.549,
49
+ 2487.954
50
+ ]
51
+ },
52
+ {
53
+ "id": "s5",
54
+ "type": "equipment",
55
+ "tag": null,
56
+ "bbox": [
57
+ 921.5350000000001,
58
+ 1647.586,
59
+ 1066.181,
60
+ 1915.881
61
+ ]
62
+ },
63
+ {
64
+ "id": "s6",
65
+ "type": "equipment",
66
+ "tag": null,
67
+ "bbox": [
68
+ 6111.127,
69
+ 2034.3760000000002,
70
+ 6342.094,
71
+ 2190.6870000000004
72
+ ]
73
+ },
74
+ {
75
+ "id": "s7",
76
+ "type": "vessel",
77
+ "tag": null,
78
+ "bbox": [
79
+ 4793.093,
80
+ 2912.56,
81
+ 5005.396000000001,
82
+ 3071.204
83
+ ]
84
+ },
85
+ {
86
+ "id": "s8",
87
+ "type": "equipment",
88
+ "tag": null,
89
+ "bbox": [
90
+ 895.8720000000001,
91
+ 489.93000000000006,
92
+ 1091.844,
93
+ 650.907
94
+ ]
95
+ },
96
+ {
97
+ "id": "s10",
98
+ "type": "equipment",
99
+ "tag": null,
100
+ "bbox": [
101
+ 4825.755,
102
+ 2036.709,
103
+ 4977.4,
104
+ 2188.3540000000003
105
+ ]
106
+ },
107
+ {
108
+ "id": "s11",
109
+ "type": "equipment",
110
+ "tag": null,
111
+ "bbox": [
112
+ 4384.818,
113
+ 2658.263,
114
+ 4576.124,
115
+ 2777.246
116
+ ]
117
+ },
118
+ {
119
+ "id": "s12",
120
+ "type": "equipment",
121
+ "tag": null,
122
+ "bbox": [
123
+ 4384.818,
124
+ 3540.137,
125
+ 4576.124,
126
+ 3659.12
127
+ ]
128
+ },
129
+ {
130
+ "id": "s13",
131
+ "type": "vessel",
132
+ "tag": null,
133
+ "bbox": [
134
+ 5329.683,
135
+ 2630.267,
136
+ 5444.0,
137
+ 2826.239
138
+ ]
139
+ },
140
+ {
141
+ "id": "s14",
142
+ "type": "heat_exchanger",
143
+ "tag": null,
144
+ "bbox": [
145
+ 5749.512000000001,
146
+ 2282.65,
147
+ 5866.162,
148
+ 2473.956
149
+ ]
150
+ },
151
+ {
152
+ "id": "s15",
153
+ "type": "equipment",
154
+ "tag": null,
155
+ "bbox": [
156
+ 3095.78,
157
+ 1698.912,
158
+ 3217.0960000000005,
159
+ 1864.555
160
+ ]
161
+ },
162
+ {
163
+ "id": "s16",
164
+ "type": "equipment",
165
+ "tag": null,
166
+ "bbox": [
167
+ 6171.785,
168
+ 3845.76,
169
+ 6281.436,
170
+ 4011.4030000000002
171
+ ]
172
+ },
173
+ {
174
+ "id": "s17",
175
+ "type": "equipment",
176
+ "tag": null,
177
+ "bbox": [
178
+ 3105.112,
179
+ 3841.094,
180
+ 3207.764,
181
+ 4013.736
182
+ ]
183
+ },
184
+ {
185
+ "id": "s19",
186
+ "type": "equipment",
187
+ "tag": null,
188
+ "bbox": [
189
+ 3574.045,
190
+ 3271.3540000000003,
191
+ 3714.025,
192
+ 3376.3390000000004
193
+ ]
194
+ },
195
+ {
196
+ "id": "s20",
197
+ "type": "equipment",
198
+ "tag": null,
199
+ "bbox": [
200
+ 1346.141,
201
+ 846.879,
202
+ 1479.122,
203
+ 954.1970000000001
204
+ ]
205
+ },
206
+ {
207
+ "id": "s21",
208
+ "type": "heat_exchanger",
209
+ "tag": null,
210
+ "bbox": [
211
+ 1847.736,
212
+ 2664.7740000000003,
213
+ 1952.7210000000002,
214
+ 2769.759
215
+ ]
216
+ },
217
+ {
218
+ "id": "s22",
219
+ "type": "equipment",
220
+ "tag": null,
221
+ "bbox": [
222
+ 1376.47,
223
+ 1106.33,
224
+ 1446.46,
225
+ 1243.977
226
+ ]
227
+ },
228
+ {
229
+ "id": "s23",
230
+ "type": "pump",
231
+ "tag": null,
232
+ "bbox": [
233
+ 2687.505,
234
+ 1460.458,
235
+ 2790.157,
236
+ 1551.4450000000002
237
+ ]
238
+ },
239
+ {
240
+ "id": "s24",
241
+ "type": "pump",
242
+ "tag": null,
243
+ "bbox": [
244
+ 3598.597,
245
+ 3554.135,
246
+ 3691.917,
247
+ 3642.789
248
+ ]
249
+ },
250
+ {
251
+ "id": "s25",
252
+ "type": "valve",
253
+ "tag": null,
254
+ "bbox": [
255
+ 2297.8940000000002,
256
+ 2704.4350000000004,
257
+ 2339.888,
258
+ 2730.098
259
+ ]
260
+ },
261
+ {
262
+ "id": "j1",
263
+ "type": "junction",
264
+ "tag": null,
265
+ "bbox": [
266
+ 990,
267
+ 1170,
268
+ 1000,
269
+ 1180
270
+ ]
271
+ },
272
+ {
273
+ "id": "j2",
274
+ "type": "junction",
275
+ "tag": null,
276
+ "bbox": [
277
+ 1895,
278
+ 1775,
279
+ 1905,
280
+ 1785
281
+ ]
282
+ },
283
+ {
284
+ "id": "j3",
285
+ "type": "junction",
286
+ "tag": null,
287
+ "bbox": [
288
+ 2735,
289
+ 1775,
290
+ 2745,
291
+ 1785
292
+ ]
293
+ },
294
+ {
295
+ "id": "j4",
296
+ "type": "junction",
297
+ "tag": null,
298
+ "bbox": [
299
+ 4475,
300
+ 2975,
301
+ 4485,
302
+ 2985
303
+ ]
304
+ },
305
+ {
306
+ "id": "j5",
307
+ "type": "junction",
308
+ "tag": null,
309
+ "bbox": [
310
+ 4895,
311
+ 2695,
312
+ 4905,
313
+ 2705
314
+ ]
315
+ }
316
+ ],
317
+ "edges": [
318
+ {
319
+ "source": "s20",
320
+ "target": "s22",
321
+ "kind": "process"
322
+ },
323
+ {
324
+ "source": "s22",
325
+ "target": "j1",
326
+ "kind": "process"
327
+ },
328
+ {
329
+ "source": "j1",
330
+ "target": "s5",
331
+ "kind": "process"
332
+ },
333
+ {
334
+ "source": "s5",
335
+ "target": "j2",
336
+ "kind": "process"
337
+ },
338
+ {
339
+ "source": "j2",
340
+ "target": "j3",
341
+ "kind": "process"
342
+ },
343
+ {
344
+ "source": "j2",
345
+ "target": "s21",
346
+ "kind": "process"
347
+ },
348
+ {
349
+ "source": "s21",
350
+ "target": "s25",
351
+ "kind": "process"
352
+ },
353
+ {
354
+ "source": "s3",
355
+ "target": "s23",
356
+ "kind": "process"
357
+ },
358
+ {
359
+ "source": "s23",
360
+ "target": "j3",
361
+ "kind": "process"
362
+ },
363
+ {
364
+ "source": "j3",
365
+ "target": "j4",
366
+ "kind": "process"
367
+ },
368
+ {
369
+ "source": "j4",
370
+ "target": "s11",
371
+ "kind": "process"
372
+ },
373
+ {
374
+ "source": "j4",
375
+ "target": "s7",
376
+ "kind": "process"
377
+ },
378
+ {
379
+ "source": "s11",
380
+ "target": "j5",
381
+ "kind": "process"
382
+ },
383
+ {
384
+ "source": "j5",
385
+ "target": "s7",
386
+ "kind": "process"
387
+ },
388
+ {
389
+ "source": "j5",
390
+ "target": "s13",
391
+ "kind": "process"
392
+ },
393
+ {
394
+ "source": "s13",
395
+ "target": "s4",
396
+ "kind": "process"
397
+ },
398
+ {
399
+ "source": "s4",
400
+ "target": "s14",
401
+ "kind": "process"
402
+ },
403
+ {
404
+ "source": "s10",
405
+ "target": "s6",
406
+ "kind": "process"
407
+ },
408
+ {
409
+ "source": "s19",
410
+ "target": "s1",
411
+ "kind": "process"
412
+ },
413
+ {
414
+ "source": "s19",
415
+ "target": "s24",
416
+ "kind": "process"
417
+ },
418
+ {
419
+ "source": "s24",
420
+ "target": "s12",
421
+ "kind": "process"
422
+ },
423
+ {
424
+ "source": "s17",
425
+ "target": "s16",
426
+ "kind": "process"
427
+ },
428
+ {
429
+ "source": "s16",
430
+ "target": "s6",
431
+ "kind": "process"
432
+ },
433
+ {
434
+ "source": "s2",
435
+ "target": "j1",
436
+ "kind": "signal"
437
+ },
438
+ {
439
+ "source": "s8",
440
+ "target": "j1",
441
+ "kind": "signal"
442
+ },
443
+ {
444
+ "source": "s8",
445
+ "target": "j2",
446
+ "kind": "signal"
447
+ },
448
+ {
449
+ "source": "j3",
450
+ "target": "s15",
451
+ "kind": "signal"
452
+ },
453
+ {
454
+ "source": "s15",
455
+ "target": "s17",
456
+ "kind": "signal"
457
+ },
458
+ {
459
+ "source": "s10",
460
+ "target": "j5",
461
+ "kind": "signal"
462
+ },
463
+ {
464
+ "source": "j4",
465
+ "target": "s12",
466
+ "kind": "signal"
467
+ }
468
+ ]
469
+ }
data/synth-2/out/nodes.csv ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ id,type,tag,x1,y1,x2,y2
2
+ s1,column,,3985.875,3150.526,4142.186,3495.8100000000004
3
+ s2,tank,,459.60100000000006,1077.846,690.5680000000001,1271.4850000000001
4
+ s3,vessel,,2185.91,1430.1290000000001,2454.205,1584.1070000000002
5
+ s4,equipment,,5287.578,2284.983,5490.549,2487.954
6
+ s5,equipment,,921.5350000000001,1647.586,1066.181,1915.881
7
+ s6,equipment,,6111.127,2034.3760000000002,6342.094,2190.6870000000004
8
+ s7,vessel,,4793.093,2912.56,5005.396000000001,3071.204
9
+ s8,equipment,,895.8720000000001,489.93000000000006,1091.844,650.907
10
+ s10,equipment,,4825.755,2036.709,4977.4,2188.3540000000003
11
+ s11,equipment,,4384.818,2658.263,4576.124,2777.246
12
+ s12,equipment,,4384.818,3540.137,4576.124,3659.12
13
+ s13,vessel,,5329.683,2630.267,5444.0,2826.239
14
+ s14,heat_exchanger,,5749.512000000001,2282.65,5866.162,2473.956
15
+ s15,equipment,,3095.78,1698.912,3217.0960000000005,1864.555
16
+ s16,equipment,,6171.785,3845.76,6281.436,4011.4030000000002
17
+ s17,equipment,,3105.112,3841.094,3207.764,4013.736
18
+ s19,equipment,,3574.045,3271.3540000000003,3714.025,3376.3390000000004
19
+ s20,equipment,,1346.141,846.879,1479.122,954.1970000000001
20
+ s21,heat_exchanger,,1847.736,2664.7740000000003,1952.7210000000002,2769.759
21
+ s22,equipment,,1376.47,1106.33,1446.46,1243.977
22
+ s23,pump,,2687.505,1460.458,2790.157,1551.4450000000002
23
+ s24,pump,,3598.597,3554.135,3691.917,3642.789
24
+ s25,valve,,2297.8940000000002,2704.4350000000004,2339.888,2730.098
25
+ j1,junction,,990,1170,1000,1180
26
+ j2,junction,,1895,1775,1905,1785
27
+ j3,junction,,2735,1775,2745,1785
28
+ j4,junction,,4475,2975,4485,2985
29
+ j5,junction,,4895,2695,4905,2705
data/synth-2/out/pid.sql ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -- P&ID graph: SQLite and PostgreSQL compatible
2
+ CREATE TABLE components (id TEXT PRIMARY KEY, type TEXT NOT NULL, tag TEXT, x1 REAL, y1 REAL, x2 REAL, y2 REAL);
3
+ CREATE TABLE connections (source TEXT NOT NULL REFERENCES components(id), target TEXT NOT NULL REFERENCES components(id), kind TEXT NOT NULL, line TEXT);
4
+ INSERT INTO components VALUES ('s1', 'column', NULL, 3985.875, 3150.526, 4142.186, 3495.8100000000004);
5
+ INSERT INTO components VALUES ('s2', 'tank', NULL, 459.60100000000006, 1077.846, 690.5680000000001, 1271.4850000000001);
6
+ INSERT INTO components VALUES ('s3', 'vessel', NULL, 2185.91, 1430.1290000000001, 2454.205, 1584.1070000000002);
7
+ INSERT INTO components VALUES ('s4', 'equipment', NULL, 5287.578, 2284.983, 5490.549, 2487.954);
8
+ INSERT INTO components VALUES ('s5', 'equipment', NULL, 921.5350000000001, 1647.586, 1066.181, 1915.881);
9
+ INSERT INTO components VALUES ('s6', 'equipment', NULL, 6111.127, 2034.3760000000002, 6342.094, 2190.6870000000004);
10
+ INSERT INTO components VALUES ('s7', 'vessel', NULL, 4793.093, 2912.56, 5005.396000000001, 3071.204);
11
+ INSERT INTO components VALUES ('s8', 'equipment', NULL, 895.8720000000001, 489.93000000000006, 1091.844, 650.907);
12
+ INSERT INTO components VALUES ('s10', 'equipment', NULL, 4825.755, 2036.709, 4977.4, 2188.3540000000003);
13
+ INSERT INTO components VALUES ('s11', 'equipment', NULL, 4384.818, 2658.263, 4576.124, 2777.246);
14
+ INSERT INTO components VALUES ('s12', 'equipment', NULL, 4384.818, 3540.137, 4576.124, 3659.12);
15
+ INSERT INTO components VALUES ('s13', 'vessel', NULL, 5329.683, 2630.267, 5444.0, 2826.239);
16
+ INSERT INTO components VALUES ('s14', 'heat_exchanger', NULL, 5749.512000000001, 2282.65, 5866.162, 2473.956);
17
+ INSERT INTO components VALUES ('s15', 'equipment', NULL, 3095.78, 1698.912, 3217.0960000000005, 1864.555);
18
+ INSERT INTO components VALUES ('s16', 'equipment', NULL, 6171.785, 3845.76, 6281.436, 4011.4030000000002);
19
+ INSERT INTO components VALUES ('s17', 'equipment', NULL, 3105.112, 3841.094, 3207.764, 4013.736);
20
+ INSERT INTO components VALUES ('s19', 'equipment', NULL, 3574.045, 3271.3540000000003, 3714.025, 3376.3390000000004);
21
+ INSERT INTO components VALUES ('s20', 'equipment', NULL, 1346.141, 846.879, 1479.122, 954.1970000000001);
22
+ INSERT INTO components VALUES ('s21', 'heat_exchanger', NULL, 1847.736, 2664.7740000000003, 1952.7210000000002, 2769.759);
23
+ INSERT INTO components VALUES ('s22', 'equipment', NULL, 1376.47, 1106.33, 1446.46, 1243.977);
24
+ INSERT INTO components VALUES ('s23', 'pump', NULL, 2687.505, 1460.458, 2790.157, 1551.4450000000002);
25
+ INSERT INTO components VALUES ('s24', 'pump', NULL, 3598.597, 3554.135, 3691.917, 3642.789);
26
+ INSERT INTO components VALUES ('s25', 'valve', NULL, 2297.8940000000002, 2704.4350000000004, 2339.888, 2730.098);
27
+ INSERT INTO components VALUES ('j1', 'junction', NULL, 990, 1170, 1000, 1180);
28
+ INSERT INTO components VALUES ('j2', 'junction', NULL, 1895, 1775, 1905, 1785);
29
+ INSERT INTO components VALUES ('j3', 'junction', NULL, 2735, 1775, 2745, 1785);
30
+ INSERT INTO components VALUES ('j4', 'junction', NULL, 4475, 2975, 4485, 2985);
31
+ INSERT INTO components VALUES ('j5', 'junction', NULL, 4895, 2695, 4905, 2705);
32
+ INSERT INTO connections VALUES ('s20', 's22', 'process', NULL);
33
+ INSERT INTO connections VALUES ('s22', 'j1', 'process', NULL);
34
+ INSERT INTO connections VALUES ('j1', 's5', 'process', NULL);
35
+ INSERT INTO connections VALUES ('s5', 'j2', 'process', NULL);
36
+ INSERT INTO connections VALUES ('j2', 'j3', 'process', NULL);
37
+ INSERT INTO connections VALUES ('j2', 's21', 'process', NULL);
38
+ INSERT INTO connections VALUES ('s21', 's25', 'process', NULL);
39
+ INSERT INTO connections VALUES ('s3', 's23', 'process', NULL);
40
+ INSERT INTO connections VALUES ('s23', 'j3', 'process', NULL);
41
+ INSERT INTO connections VALUES ('j3', 'j4', 'process', NULL);
42
+ INSERT INTO connections VALUES ('j4', 's11', 'process', NULL);
43
+ INSERT INTO connections VALUES ('j4', 's7', 'process', NULL);
44
+ INSERT INTO connections VALUES ('s11', 'j5', 'process', NULL);
45
+ INSERT INTO connections VALUES ('j5', 's7', 'process', NULL);
46
+ INSERT INTO connections VALUES ('j5', 's13', 'process', NULL);
47
+ INSERT INTO connections VALUES ('s13', 's4', 'process', NULL);
48
+ INSERT INTO connections VALUES ('s4', 's14', 'process', NULL);
49
+ INSERT INTO connections VALUES ('s10', 's6', 'process', NULL);
50
+ INSERT INTO connections VALUES ('s19', 's1', 'process', NULL);
51
+ INSERT INTO connections VALUES ('s19', 's24', 'process', NULL);
52
+ INSERT INTO connections VALUES ('s24', 's12', 'process', NULL);
53
+ INSERT INTO connections VALUES ('s17', 's16', 'process', NULL);
54
+ INSERT INTO connections VALUES ('s16', 's6', 'process', NULL);
55
+ INSERT INTO connections VALUES ('s2', 'j1', 'signal', NULL);
56
+ INSERT INTO connections VALUES ('s8', 'j1', 'signal', NULL);
57
+ INSERT INTO connections VALUES ('s8', 'j2', 'signal', NULL);
58
+ INSERT INTO connections VALUES ('j3', 's15', 'signal', NULL);
59
+ INSERT INTO connections VALUES ('s15', 's17', 'signal', NULL);
60
+ INSERT INTO connections VALUES ('s10', 'j5', 'signal', NULL);
61
+ INSERT INTO connections VALUES ('j4', 's12', 'signal', NULL);
index.html CHANGED
@@ -1,19 +1,212 @@
1
  <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
  <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>pid-parser showcase</title>
7
+ <meta name="description" content="P&ID image to tables and graph with a vision-language model: precomputed results on synthetic PID2Graph sheets.">
8
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.30.2/cytoscape.min.js"></script>
9
+ <style>
10
+ :root {
11
+ --bg: #f7f7f5; --panel: #ffffff; --fg: #1d1d1b; --muted: #6b6b66; --line: #e2e2dc;
12
+ --accent: #0b6e69; --process: #0b6e69; --signal: #c2410c; --junction: #6b6b66; --sym: #1d4ed8;
13
+ }
14
+ @media (prefers-color-scheme: dark) {
15
+ :root { --bg: #141413; --panel: #1d1d1b; --fg: #ecece6; --muted: #a3a39b; --line: #33332f;
16
+ --accent: #5eb8b2; --process: #5eb8b2; --signal: #fb923c; --junction: #a3a39b; --sym: #93b4ff; }
17
+ }
18
+ * { box-sizing: border-box; }
19
+ body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
20
+ main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }
21
+ h1 { font-size: 26px; margin: 0 0 4px; }
22
+ h2 { font-size: 17px; margin: 0 0 10px; }
23
+ p { margin: 0 0 8px; }
24
+ a { color: var(--accent); }
25
+ .muted { color: var(--muted); }
26
+ code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
27
+ pre { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin: 8px 0 0; }
28
+ .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
29
+ .row { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; margin-top: 16px; }
30
+ @media (max-width: 860px) { .row { grid-template-columns: 1fr; } }
31
+ .tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
32
+ .tabs button, .toggles label { border: 1px solid var(--line); background: var(--panel); color: var(--fg); border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; }
33
+ .tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
34
+ .toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
35
+ .toggles label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; padding: 4px 12px; }
36
+ .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
37
+ @media (max-width: 600px) { .stats { grid-template-columns: repeat(2, 1fr); } }
38
+ .stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
39
+ .stat b { display: block; font-size: 22px; }
40
+ .stat span { font-size: 12px; color: var(--muted); }
41
+ #drawing { width: 100%; height: auto; display: block; background: #fff; border-radius: 6px; }
42
+ #graph { width: 100%; height: 420px; }
43
+ .legend { font-size: 12px; color: var(--muted); margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
44
+ .legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 4px; }
45
+ table { width: 100%; border-collapse: collapse; font-size: 13px; }
46
+ th, td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line); }
47
+ th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--panel); }
48
+ .scroll { max-height: 320px; overflow: auto; }
49
+ .files { display: flex; flex-wrap: wrap; gap: 8px; }
50
+ .files a { border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; text-decoration: none; font-size: 13px; }
51
+ footer { margin-top: 28px; font-size: 13px; color: var(--muted); }
52
+ </style>
53
+ </head>
54
+ <body>
55
+ <main>
56
+ <h1>pid-parser</h1>
57
+ <p class="muted">A P&amp;ID image in, tables and a graph out. A vision-language model reads the drawing; small scripts tile it, check the graph and export it for SQL or a graph database. No GPU, no training.</p>
58
+ <pre>npx skills add dzakybd/pid-parser</pre>
59
+ <p class="muted" style="margin-top:8px">Works in Claude Code, Codex and other skill-aware agents, or as a LangChain Deep Agent. Source: <a href="https://github.com/dzakybd/pid-parser">github.com/dzakybd/pid-parser</a>. These results were computed ahead of time; this page calls no model.</p>
60
+
61
+ <div class="tabs" id="tabs" role="group" aria-label="Sheet"></div>
62
+ <div class="stats" id="stats"></div>
63
+
64
+ <div class="row">
65
+ <section class="panel">
66
+ <h2>Drawing and what was read</h2>
67
+ <div class="toggles">
68
+ <label><input type="checkbox" id="showSym" checked> symbols</label>
69
+ <label><input type="checkbox" id="showEdge" checked> connections</label>
70
+ </div>
71
+ <svg id="drawing" role="img" aria-label="P&amp;ID drawing with detected symbols and connections"></svg>
72
+ <div class="legend"><span><i style="background:var(--sym)"></i>symbol box</span><span><i style="background:var(--process)"></i>process pipe</span><span><i style="background:var(--signal)"></i>signal line</span></div>
73
+ </section>
74
+ <section class="panel">
75
+ <h2>Graph</h2>
76
+ <div id="graph"></div>
77
+ <p class="muted" style="font-size:12px;margin-top:6px">Nodes sit where the symbols are on the sheet. Grey dots are junctions (tees).</p>
78
+ </section>
79
+ </div>
80
+
81
+ <div class="row">
82
+ <section class="panel">
83
+ <h2>components</h2>
84
+ <div class="scroll"><table id="nodes"></table></div>
85
+ </section>
86
+ <section class="panel">
87
+ <h2>connections</h2>
88
+ <div class="scroll"><table id="edges"></table></div>
89
+ </section>
90
+ </div>
91
+
92
+ <section class="panel" style="margin-top:16px">
93
+ <h2>Download this sheet's output</h2>
94
+ <div class="files" id="files"></div>
95
+ <pre>sqlite3 pid.db &lt; pid.sql # or: psql -f pid.sql
96
+ cypher-shell -f graph.cypher # Neo4j</pre>
97
+ </section>
98
+
99
+ <footer>
100
+ <p>Drawings: synthetic sheets from <a href="https://zenodo.org/records/14803338">PID2Graph</a> (<a href="https://arxiv.org/abs/2411.13929">paper</a>), CC BY-SA 4.0. The drawings and the outputs derived from them on this page are shared under CC BY-SA 4.0. Code: MIT.</p>
101
+ <p>Scores compare against the PID2Graph ground truth. Symbols: one-to-one match by box center. Connections: symbol pairs on the same pipe network.</p>
102
+ </footer>
103
+ </main>
104
+ <script>
105
+ const NS = "http://www.w3.org/2000/svg";
106
+ const css = name => getComputedStyle(document.documentElement).getPropertyValue(name).trim();
107
+ const pct = v => (v * 100).toFixed(0) + "%";
108
+ let sheets = [], cy = null;
109
+
110
+ function el(tag, attrs, parent) {
111
+ const e = document.createElementNS(NS, tag);
112
+ for (const [k, v] of Object.entries(attrs)) e.setAttribute(k, v);
113
+ parent.appendChild(e);
114
+ return e;
115
+ }
116
+ const center = b => [(b[0] + b[2]) / 2, (b[1] + b[3]) / 2];
117
+
118
+ function drawSvg(sheet, graph) {
119
+ const svg = document.getElementById("drawing");
120
+ svg.innerHTML = "";
121
+ svg.setAttribute("viewBox", `0 0 ${graph.image.width} ${graph.image.height}`);
122
+ el("image", { href: `data/${sheet.id}/drawing.jpg`, x: 0, y: 0, width: graph.image.width, height: graph.image.height }, svg);
123
+ const stroke = graph.image.width / 600;
124
+ const byId = Object.fromEntries(graph.nodes.map(n => [n.id, n]));
125
+ const edges = el("g", { id: "edgeLayer" }, svg);
126
+ for (const e of graph.edges) {
127
+ const [x1, y1] = center(byId[e.source].bbox), [x2, y2] = center(byId[e.target].bbox);
128
+ el("line", { x1, y1, x2, y2, stroke: e.kind === "signal" ? css("--signal") : css("--process"),
129
+ "stroke-width": stroke, "stroke-dasharray": e.kind === "signal" ? `${stroke * 3} ${stroke * 2}` : "", opacity: 0.8 }, edges);
130
+ }
131
+ const syms = el("g", { id: "symLayer" }, svg);
132
+ for (const n of graph.nodes) {
133
+ const [x1, y1, x2, y2] = n.bbox;
134
+ if (n.type === "junction") {
135
+ el("circle", { cx: (x1 + x2) / 2, cy: (y1 + y2) / 2, r: stroke * 2.5, fill: css("--junction") }, syms);
136
+ continue;
137
+ }
138
+ const r = el("rect", { x: x1, y: y1, width: x2 - x1, height: y2 - y1, fill: "none", stroke: css("--sym"), "stroke-width": stroke }, syms);
139
+ el("title", {}, r).textContent = `${n.id} ${n.type}${n.tag ? " " + n.tag : ""}`;
140
+ }
141
+ applyToggles();
142
+ }
143
+
144
+ function applyToggles() {
145
+ const s = document.getElementById("symLayer"), e = document.getElementById("edgeLayer");
146
+ if (s) s.style.display = document.getElementById("showSym").checked ? "" : "none";
147
+ if (e) e.style.display = document.getElementById("showEdge").checked ? "" : "none";
148
+ }
149
+
150
+ function drawGraph(graph) {
151
+ const scale = 600 / graph.image.width;
152
+ if (cy) cy.destroy();
153
+ cy = cytoscape({
154
+ container: document.getElementById("graph"),
155
+ elements: [
156
+ ...graph.nodes.map(n => { const [x, y] = center(n.bbox);
157
+ return { data: { id: n.id, label: n.type === "junction" ? "" : (n.tag || n.type), j: n.type === "junction" }, position: { x: x * scale, y: y * scale } }; }),
158
+ ...graph.edges.map((e, i) => ({ data: { id: "e" + i, source: e.source, target: e.target, kind: e.kind } })),
159
+ ],
160
+ layout: { name: "preset", fit: true, padding: 16 },
161
+ style: [
162
+ { selector: "node", style: { "background-color": css("--sym"), width: 10, height: 10, label: "data(label)", "font-size": 7, color: css("--fg"), "text-valign": "top", "text-margin-y": -2 } },
163
+ { selector: "node[?j]", style: { "background-color": css("--junction"), width: 5, height: 5 } },
164
+ { selector: "edge", style: { width: 1.5, "line-color": css("--process"), "curve-style": "straight" } },
165
+ { selector: "edge[kind = 'signal']", style: { "line-color": css("--signal"), "line-style": "dashed" } },
166
+ ],
167
+ });
168
+ }
169
+
170
+ function fillTables(graph) {
171
+ const esc = s => String(s ?? "").replace(/[&<>]/g, c => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[c]);
172
+ document.getElementById("nodes").innerHTML = "<tr><th>id</th><th>type</th><th>tag</th></tr>" +
173
+ graph.nodes.map(n => `<tr><td>${esc(n.id)}</td><td>${esc(n.type)}</td><td>${esc(n.tag)}</td></tr>`).join("");
174
+ document.getElementById("edges").innerHTML = "<tr><th>source</th><th>target</th><th>kind</th><th>line</th></tr>" +
175
+ graph.edges.map(e => `<tr><td>${esc(e.source)}</td><td>${esc(e.target)}</td><td>${esc(e.kind)}</td><td>${esc(e.line)}</td></tr>`).join("");
176
+ }
177
+
178
+ async function show(i) {
179
+ const sheet = sheets[i];
180
+ document.querySelectorAll("#tabs button").forEach((b, j) => b.setAttribute("aria-pressed", String(i === j)));
181
+ const graph = await (await fetch(`data/${sheet.id}/graph.json`)).json();
182
+ const sc = sheet.score;
183
+ document.getElementById("stats").innerHTML = [
184
+ [pct(sc.symbols.f1), `symbol F1 (${sc.symbols.matched}/${sc.symbols.gt} found)`],
185
+ [pct(sc.connections.f1), `connection F1 (P ${pct(sc.connections.precision)}, R ${pct(sc.connections.recall)})`],
186
+ [graph.nodes.length + " / " + graph.edges.length, "nodes / edges"],
187
+ [Math.round(sheet.seconds / 60) + " min", `${sheet.model}, effort ${sheet.effort}`],
188
+ ].map(([b, s]) => `<div class="stat"><b>${b}</b><span>${s}</span></div>`).join("");
189
+ drawSvg(sheet, graph);
190
+ drawGraph(graph);
191
+ fillTables(graph);
192
+ document.getElementById("files").innerHTML = ["graph.json", "out/pid.sql", "out/nodes.csv", "out/edges.csv", "out/graph.graphml", "out/graph.cypher"]
193
+ .map(f => `<a href="data/${sheet.id}/${f}" download>${f.replace("out/", "")}</a>`).join("");
194
+ }
195
+
196
+ document.getElementById("showSym").addEventListener("change", applyToggles);
197
+ document.getElementById("showEdge").addEventListener("change", applyToggles);
198
+
199
+ fetch("data/sheets.json").then(r => r.json()).then(list => {
200
+ sheets = list;
201
+ const tabs = document.getElementById("tabs");
202
+ list.forEach((s, i) => {
203
+ const b = document.createElement("button");
204
+ b.textContent = s.title;
205
+ b.onclick = () => show(i);
206
+ tabs.appendChild(b);
207
+ });
208
+ show(0);
209
+ });
210
+ </script>
211
+ </body>
212
  </html>