Skip to content

Commit

Permalink
WIP Reworking GRAFCET code generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lecrapouille committed Jul 18, 2024
1 parent 1843b5c commit dea9080
Show file tree
Hide file tree
Showing 12 changed files with 555 additions and 257 deletions.
32 changes: 32 additions & 0 deletions Ex1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"revision": 3,
"type": "GRAFCET",
"nets": [
{
"name": "Timed Petri net",
"places": [
{ "id": 0, "caption": "Step 1", "tokens": 1, "x": 205, "y": 79 },
{ "id": 1, "caption": "Step 2", "tokens": 0, "x": 206, "y": 249 },
{ "id": 2, "caption": "Step 3", "tokens": 0, "x": 206, "y": 440 }
],
"transitions": [
{ "id": 0, "caption": "m", "x": 205, "y": 166, "angle": 0 },
{ "id": 1, "caption": "a", "x": 206, "y": 348, "angle": 0 },
{ "id": 2, "caption": "b", "x": 71, "y": 237, "angle": 0 }
],
"arcs": [
{ "from": "P0", "to": "T0" },
{ "from": "T0", "to": "P1", "duration": 1 },
{ "from": "P1", "to": "T1" },
{ "from": "T1", "to": "P2", "duration": 4 },
{ "from": "P2", "to": "T2" },
{ "from": "T2", "to": "P0", "duration": 2 }
],
"sensors": [
{ "name": "a", "value": 0 },
{ "name": "b", "value": 0 },
{ "name": "m", "value": 0 }
]
}
]
}
33 changes: 33 additions & 0 deletions Ex2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"revision": 3,
"type": "GRAFCET",
"nets": [
{
"name": "Timed Petri net",
"places": [
{ "id": 0, "caption": "P0", "tokens": 1, "x": 235, "y": 86 },
{ "id": 1, "caption": "P1", "tokens": 0, "x": 238, "y": 268 },
{ "id": 2, "caption": "P2", "tokens": 0, "x": 106, "y": 449 },
{ "id": 3, "caption": "P3", "tokens": 0, "x": 368, "y": 458 }
],
"transitions": [
{ "id": 0, "caption": "m", "x": 233, "y": 179, "angle": 0 },
{ "id": 1, "caption": "a", "x": 104, "y": 358, "angle": 0 },
{ "id": 2, "caption": "b", "x": 364, "y": 365, "angle": 0 }
],
"arcs": [
{ "from": "P0", "to": "T0" },
{ "from": "T0", "to": "P1", "duration": 2 },
{ "from": "P1", "to": "T1" },
{ "from": "P1", "to": "T2" },
{ "from": "T1", "to": "P2", "duration": 2 },
{ "from": "T2", "to": "P3", "duration": 3 }
],
"sensors": [
{ "name": "a", "value": 0 },
{ "name": "b", "value": 0 },
{ "name": "m", "value": 0 }
]
}
]
}
33 changes: 33 additions & 0 deletions Ex3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"revision": 3,
"type": "GRAFCET",
"nets": [
{
"name": "Timed Petri net",
"places": [
{ "id": 0, "caption": "P0", "tokens": 0, "x": 130, "y": 88 },
{ "id": 1, "caption": "P1", "tokens": 0, "x": 295, "y": 84 },
{ "id": 2, "caption": "P2", "tokens": 0, "x": 220, "y": 252 },
{ "id": 3, "caption": "P3", "tokens": 0, "x": 223, "y": 410 }
],
"transitions": [
{ "id": 0, "caption": "T0", "x": 130, "y": 171, "angle": 0 },
{ "id": 1, "caption": "T1", "x": 298, "y": 170, "angle": 0 },
{ "id": 2, "caption": "T2", "x": 221, "y": 333, "angle": 0 }
],
"arcs": [
{ "from": "P0", "to": "T0" },
{ "from": "P1", "to": "T1" },
{ "from": "T0", "to": "P2", "duration": 4 },
{ "from": "T1", "to": "P2", "duration": 1 },
{ "from": "P2", "to": "T2" },
{ "from": "T2", "to": "P3", "duration": 5 }
],
"sensors": [
{ "name": "T0", "value": 0 },
{ "name": "T1", "value": 0 },
{ "name": "T2", "value": 0 }
]
}
]
}
Loading

0 comments on commit dea9080

Please sign in to comment.