From edc66169029c89cedbeb591bb32ddcea46dd6914 Mon Sep 17 00:00:00 2001
From: Michael Leuschel <leuschel@uni-duesseldorf.de>
Date: Wed, 2 Feb 2022 16:34:52 +0100
Subject: [PATCH] introduce SIG_Routes definition for train

Signed-off-by: Michael Leuschel <leuschel@uni-duesseldorf.de>
---
 Train_B_Book/train.json | 35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/Train_B_Book/train.json b/Train_B_Book/train.json
index a3580bd..3b77ae1 100644
--- a/Train_B_Book/train.json
+++ b/Train_B_Book/train.json
@@ -1,6 +1,12 @@
 {
     "svg": "train.svg",
     "comment": "File for train_4 with Beebook topology",
+    "definitions": [
+    { "name":"SIG_Routes",
+      "value" : "%s.(s:S|fst~[SIG~[{s}]])",
+      "comment": "Routes for a signal"
+    }
+    ],
     "items": [
     {
         "id": "%0",
@@ -43,29 +49,22 @@
         ]
     },
     {
-        "id": "s1",
-        "event": "route_formation",
-        "predicates": ["r : {R1,R2,R3}"]
-    },
-    {
-        "id": "s2",
-        "event": "route_formation",
-        "predicates": ["r : {R4,R5}"]
+        "for": {"from":1, "to":5},
+        "id": "s%0",
+        "event": "route_reservation",
+        "predicates": ["r : SIG_Routes(S%0)"]
     },
     {
-        "id": "s4",
-        "event": "route_formation",
-        "predicates": ["r : {R6,R10}"]
-    },
-    {
-        "id": "s5",
-        "event": "route_formation",
-        "predicates": ["r : {R7,R9}"]
+        "for": {"from":1, "to":5},
+        "id": "s%0_red",
+        "event": "route_reservation",
+        "predicates": ["r : SIG_Routes(S%0)"]
     },
     {
-        "id": "s3",
+        "for": {"from":1, "to":5},
+        "id": "s%0_green",
         "event": "route_formation",
-        "predicates": ["r=R8"]
+        "predicates": ["r : SIG_Routes(S%0)"]
     }
 ]
 }
-- 
GitLab