diff --git a/Train_B_Book/train.json b/Train_B_Book/train.json index 7edee0209862a4a338e210c10708d8a86498f11c..b3dd5b53b099f479e3d0f8604dfd10624dd2907f 100644 --- a/Train_B_Book/train.json +++ b/Train_B_Book/train.json @@ -1,6 +1,6 @@ { "svg": "train.svg", - "comment": "File for train_4 with Beebook topology", + "comment": "File for train_4 with Beebook topology by Jonas Erdmann", "definitions": [ { "name":"SIG_Routes", "value" : "%s.(s:S|fst~[SIG~[{s}]])", @@ -31,11 +31,19 @@ "optional": "true" }, { + "id": "%0-%1", + "attr": "stroke", + "value": "IF (%0,%1) : (TRK\\/TRK~) THEN IF %0 : OCC THEN \"#FF2222\" ELSIF %0 : resbl THEN \"#2222FF\" ELSE \"#000000\" END ELSIF %0 /: (dom(TRK)\\/ran(TRK)) & %0 : resbl THEN \"#8899FF\" ELSIF ((%0 |-> %2) : (TRK \\/ TRK~) ) & (((%0 |-> %1) /: (TRK \\/ TRK~)) & ((%0 |-> %3) /: (TRK \\/ TRK~))) & %0 : resbl THEN \"#8899ff\" ELSE \"#000000\" END", + "repeat": [ + ["B","C","A","D"], ["B","D","A","C"],["D","E","B","K"], ["D","K","B","E"],["F","E","G","K"],["F","K","G","E"],["I","K","H","J"],["I","J","H","K"],["J","K","N","I"],["J","I","N","K"] + ] + }, + { "id": "%0-%1", "attr": "stroke", "value": "IF (%0,%1) : (TRK\\/TRK~) THEN IF %0 : OCC THEN \"#FF2222\" ELSIF %0 : resbl THEN \"#2222FF\" ELSE \"#000000\" END ELSIF %0 /: (dom(TRK)\\/ran(TRK)) & %0 : resbl THEN \"#8899FF\" ELSE \"#000000\" END", "repeat": [ - ["B","C"], ["B","D"],["D","E"], ["D","K"],["F","E"],["F","K"],["I","K"],["I","J"],["J","K"],["J","I"],["K","D"],["K","I"] + ["K","D"], ["K","I"] ] }, { @@ -77,8 +85,17 @@ "event": "route_reservation", "predicates": ["r=%0"], "repeat":[ - ["R1"], ["R2"], ["R3"], ["R4"], ["R5"], ["R6"], ["R7"], ["R8"], ["R9"], ["R10"] - ] + ["R1","L","A","B_g","C","C","C","C"], ["R2","L","A","B_g","D_g","E","F_g","G"], ["R3","L","A","B_g","D_g","K_g","J_g","N"], ["R4","M","H","I_g","K_g","F_g","G","G"], ["R5","M","H","I_g","J_g","N","N","N"], ["R6","C","B_g","A","L","L","L","L"], ["R7","G","F_g","E","D_g","B_g","A","L"], ["R8","N","J_g","K_g","D_g","B_g","A","L"], ["R9","G","F_g","K_g","I_g","H","M","M"], ["R10","N","J_g","I_g","H","M","M","M"] + ], + "hovers": [{ "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%1"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%2"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%3"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%4"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%5"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%6"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%7"} + ], + "comment": "in 'repeat' the lists must have the same length, therefore the last element repeats" }, { "id": "point_p_%0", diff --git a/Train_B_Book/train.svg b/Train_B_Book/train.svg index 3e294e07ef77373a13794c887ed4d5cebcb356e1..55fc781c009d3622fb3af87df75156cdc7fed127 100644 --- a/Train_B_Book/train.svg +++ b/Train_B_Book/train.svg @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> +<!-- svg for Train B Book by Jonas Erdmann--> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" @@ -223,7 +224,7 @@ transform="scale(-1,1)" y="93.820374" x="-39.952084" - height="1.9113718" + height="2" width="0.98883682" id="rect4775-5-56" style="display:inline;fill:#f2f2f2;stroke:#000000;stroke-width:0.0563424;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -419,31 +420,42 @@ x="224.31067" y="263.27942" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.29166651px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.64790022">N</tspan></text> - <path - style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + <text + x="43" + y="270" + font-size="2.5" + font-family="sans-serif" + opacity="1" + id="explanation"></text> + <path + style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter" stroke="#000000" + stroke-opacity="1" d="M 43.1298,258.19501 H 67.749941" id="M" inkscape:connector-curvature="0" inkscape:label="#path5152" /> <path - style="fill:none;stroke-width:0.648;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" + style="fill:none;stroke-width:0.648;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" stroke="#000000" + stroke-opacity="1" d="M 43.129804,248.39985 H 67.749945" id="L" inkscape:connector-curvature="0" inkscape:label="#path5154" /> <path - style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter" stroke="#000000" + stroke-opacity="1" d="M 67.749941,248.40982 H 92.208102" id="A" inkscape:connector-curvature="0" inkscape:label="#path5158" /> <path - style="fill:none;stroke-width:0.61711693px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke-width:0.61711693px;stroke-linecap:butt;stroke-linejoin:miter" d="m 67.749941,258.19501 c 44.353769,0 44.353769,0 44.353769,0" stroke="#000000" + stroke-opacity="1" id="H" inkscape:connector-curvature="0" inkscape:label="#path5164" /> @@ -456,42 +468,46 @@ inkscape:connector-curvature="0" id="B-D" d="m 64.031095,93.006249 4.10452,10e-7" - style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /> + style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" /> <path - style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" + style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" d="m 59.99427,93.00625 h 4.036825" id="B" inkscape:connector-curvature="0" /> <path - style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter" d="m 64.031095,93.00625 c 4.092567,-2.786001 4.092567,-2.786001 4.092567,-2.786001" id="B-C" inkscape:connector-curvature="0" /> </g> <path - style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter" stroke="#000000" + stroke-opacity="1" d="m 153.43447,248.40982 h 24.45816" id="E" inkscape:connector-curvature="0" inkscape:label="#path5192" /> <path - style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter;" stroke="#000000" + stroke-opacity="1" d="M 214.66086,248.40982 H 239.119" id="G" inkscape:connector-curvature="0" inkscape:label="#path5204" /> <path - style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter" stroke="#000000" + stroke-opacity="1" d="M 214.66086,258.19501 H 239.119" id="N" inkscape:connector-curvature="0" inkscape:label="#path5206" /> <path - style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke-width:0.64789993px;stroke-linecap:butt;stroke-linejoin:miter" stroke="#000000" + stroke-opacity="1" d="m 112.11495,241.58771 4.52405,-3.09249 h 122.48" id="C" inkscape:connector-curvature="0" @@ -499,20 +515,21 @@ <g id="D_g" stroke="#000000" + stroke-opacity="1" inkscape:label="#g906" transform="matrix(2.4487494,0,0,2.4487643,-54.702815,20.659616)"> <path inkscape:connector-curvature="0" id="D-E" d="m 78.100186,93.006249 6.897195,-7.4e-5" - style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /> + style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" /> <path - style="fill:none;stroke-width:0.26570854;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + style="fill:none;stroke-width:0.26570854;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" d="m 68.135615,93.00625 h 9.964571" id="D" inkscape:connector-curvature="0" /> <path - style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" + style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" d="m 78.019009,93.00625 7.032131,1.16272" id="D-K" inkscape:connector-curvature="0" /> @@ -521,19 +538,20 @@ id="I_g" inkscape:label="#g922" stroke="#000000" + stroke-opacity="1" transform="matrix(2.4487494,0,0,2.4487643,-54.702815,20.659616)"> <path inkscape:connector-curvature="0" id="I-J" d="M 78.046,97.002209 H 89.95833" - style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /> + style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" /> <path - style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" + style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" d="M 68.119077,97.00221 H 78.046" id="I" inkscape:connector-curvature="0" /> <path - style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter" d="m 78.019011,97.002211 6.978383,-1.16409" id="I-K" inkscape:connector-curvature="0" /> @@ -541,21 +559,22 @@ <g id="J_g" stroke="#000000" + stroke-opacity="1" inkscape:label="#g914" transform="matrix(2.4487494,0,0,2.4487643,-54.702815,20.659616)"> <path inkscape:connector-curvature="0" id="J-I" d="m 89.95833,97.002208 12.03854,2e-6" - style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /> + style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" /> <path sodipodi:nodetypes="cc" - style="fill:none;stroke-width:0.26516867px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke-width:0.26516867px;stroke-linecap:butt;stroke-linejoin:miter;" d="m 101.96142,97.002211 8.0391,-10e-7" id="J" inkscape:connector-curvature="0" /> <path - style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter" d="m 101.99687,97.002211 -7.067263,-1.16409" id="J-K" inkscape:connector-curvature="0" /> @@ -563,20 +582,21 @@ <g id="F_g" stroke="#000000" + stroke-opacity="1" inkscape:label="#g910" transform="matrix(2.4487494,0,0,2.4487643,-54.702815,20.659616)"> <path inkscape:connector-curvature="0" id="F-E" d="m 94.985402,93.006175 6.815448,7.5e-5" - style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /> + style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" /> <path - style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" + style="fill:none;stroke-width:0.26462407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" d="m 101.80085,93.006251 h 8.19967" id="F" inkscape:connector-curvature="0" /> <path - style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter" d="m 94.985413,94.16897 7.011457,-1.16272" id="F-K" inkscape:connector-curvature="0" /> @@ -584,18 +604,19 @@ <g id="K_g" stroke="#000000" + stroke-opacity="1" inkscape:label="#g918" transform="matrix(2.4487494,0,0,2.4487643,-54.839475,20.659616)"> <path inkscape:connector-curvature="0" id="K-D" d="m 84.997394,94.168971 9.988021,1.66915" - style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter" /> <path inkscape:connector-curvature="0" id="K-I" d="m 84.997392,95.83812 9.988021,-1.66915" - style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + style="fill:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter" /> </g> <path style="display:inline;fill:none;stroke:#000000;stroke-width:0.37917608px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" @@ -610,7 +631,7 @@ transform="scale(-1,1)" y="89.820274" x="-39.952087" - height="1.9113718" + height="2" width="0.98883688" id="rect4775-5-56-7" style="display:inline;fill:#f2f2f2;stroke:#000000;stroke-width:0.0563424;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -644,7 +665,7 @@ <rect y="85.775551" x="119.98853" - height="1.9113718" + height="2" width="0.98883688" id="rect4775-5-56-0" style="display:inline;fill:#f2f2f2;stroke:#000000;stroke-width:0.0563424;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -676,7 +697,7 @@ <rect y="89.824417" x="119.98853" - height="1.9113718" + height="2" width="0.98883694" id="rect4775-5-56-0-6" style="display:inline;fill:#f2f2f2;stroke:#000000;stroke-width:0.0563424;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -709,7 +730,7 @@ <rect y="93.820366" x="119.98853" - height="1.9113718" + height="2" width="0.98883694" id="rect4775-5-56-0-5" style="display:inline;fill:#f2f2f2;stroke:#000000;stroke-width:0.0563424;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -964,7 +985,7 @@ inkscape:transform-center-x="2.9934186" y="238.18167" x="64.027199" - height="2.9667645" + height="3" width="8.0448198" id="rect1269-9-7" style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.20025513;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -994,7 +1015,7 @@ inkscape:transform-center-x="2.9934186" y="238.18167" x="64.027199" - height="2.9667645" + height="3" width="8.0448198" id="rect1269-9-2" style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.20025513;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -1024,7 +1045,7 @@ inkscape:transform-center-x="2.9934186" y="238.18167" x="64.027199" - height="2.9667645" + height="3" width="8.0448198" id="rect1269-9-0" style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.20025513;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -1054,7 +1075,7 @@ inkscape:transform-center-x="2.9934186" y="238.18167" x="64.027199" - height="2.9667645" + height="3" width="8.0448198" id="rect1269-9-4" style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.20025513;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -1084,7 +1105,7 @@ inkscape:transform-center-x="2.9934186" y="238.18167" x="64.027199" - height="2.9667645" + height="3" width="8.0448198" id="rect1269-9-1" style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.20025513;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -1114,7 +1135,7 @@ inkscape:transform-center-x="2.9934186" y="238.18167" x="64.027199" - height="2.9667645" + height="3" width="8.0448198" id="rect1269-9-22" style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.20025513;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -1144,7 +1165,7 @@ inkscape:transform-center-x="2.9934186" y="238.18167" x="64.027199" - height="2.9667645" + height="3" width="8.0448198" id="rect1269-9-6" style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.20025513;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -1174,7 +1195,7 @@ inkscape:transform-center-x="2.9934186" y="238.18167" x="64.027199" - height="2.9667645" + height="3" width="8.0448198" id="rect1269-9-73" style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.20025513;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -1204,7 +1225,7 @@ inkscape:transform-center-x="2.9934186" y="238.18167" x="64.027199" - height="2.9667645" + height="3" width="8.0448198" id="rect1269-9-221" style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.20025513;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -1233,7 +1254,7 @@ inkscape:transform-center-x="2.9934186" y="238.18167" x="64.027199" - height="2.9667645" + height="3" width="8.0448198" id="rect1269-9-1-7" style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.20025513;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -1256,16 +1277,16 @@ <g id="freeing" inkscape:label="#g1714" - transform="matrix(0.7116318,0,0,0.91298764,-29.273355,23.698206)"> + transform="matrix(0.7,0,0,0.9,-29.3,23.7)"> <rect - inkscape:transform-center-y="0.44132142" - inkscape:transform-center-x="3.9713859" + inkscape:transform-center-y="0.44" + inkscape:transform-center-x="4" y="232.94756" x="131.06419" - height="3.4991" - width="10.673101" + height="3.5" + width="10.7" id="rect1269-9-1-7-9" - style="display:inline;fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.25049981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="display:inline;fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> <path inkscape:connector-curvature="0" id="path1710" diff --git a/Train_B_Book/train_with_explanations.json b/Train_B_Book/train_with_explanations.json new file mode 100644 index 0000000000000000000000000000000000000000..14133b086a04935fe23e647b7488cc89bc67dbdf --- /dev/null +++ b/Train_B_Book/train_with_explanations.json @@ -0,0 +1,169 @@ +{ + "svg": "train.svg", + "comment": "File for train_4 with Beebook topology (with explanations) by Jonas Erdmann", + "definitions": [ + { "name":"SIG_Routes", + "value" : "%s.(s:S|fst~[SIG~[{s}]])", + "comment": "Routes for a signal" + } + ], + "items": [ + { + "id": "%0", + "attr": "stroke", + "value": "IF %0 : OCC THEN \"#FF2222\" ELSE IF %0 : resbl THEN \"#2222FF\" ELSE \"#000000\" END END", + "repeat": [ + ["A"], ["B"], ["C"], ["D"], ["E"], ["F"], ["G"], ["H"], ["I"], ["J"], ["K"], ["L"], ["M"], ["N"] + ] + }, + { + "for": {"from":1, "to":5}, + "id": "s%0_green", + "attr": "fill", + "value": "IF S%0 : GRN THEN \"#22FF22\" ELSE \"#F6FFD5\" END", + "optional": "true" + }, + { + "for": {"from":1, "to":5}, + "id": "s%0_red", + "attr": "fill", + "value": "IF S%0 : GRN THEN \"#FFD5D5\" ELSE \"#FF2222\" END", + "optional": "true" + }, + { + "id": "%0-%1", + "attr": "stroke", + "value": "IF (%0,%1) : (TRK\\/TRK~) THEN IF %0 : OCC THEN \"#FF2222\" ELSIF %0 : resbl THEN \"#2222FF\" ELSE \"#000000\" END ELSIF %0 /: (dom(TRK)\\/ran(TRK)) & %0 : resbl THEN \"#8899FF\" ELSIF ((%0 |-> %2) : (TRK \\/ TRK~) ) & (((%0 |-> %1) /: (TRK \\/ TRK~)) & ((%0 |-> %3) /: (TRK \\/ TRK~))) & %0 : resbl THEN \"#8899ff\" ELSE \"#000000\" END", + "repeat": [ + ["B","C","A","D"], ["B","D","A","C"],["D","E","B","K"], ["D","K","B","E"],["F","E","G","K"],["F","K","G","E"],["I","K","H","J"],["I","J","H","K"],["J","K","N","I"],["J","I","N","K"] + ] + }, + { + "id": "%0-%1", + "attr": "stroke", + "value": "IF (%0,%1) : (TRK\\/TRK~) THEN IF %0 : OCC THEN \"#FF2222\" ELSIF %0 : resbl THEN \"#2222FF\" ELSE \"#000000\" END ELSIF %0 /: (dom(TRK)\\/ran(TRK)) & %0 : resbl THEN \"#8899FF\" ELSE \"#000000\" END", + "repeat": [ + ["K","D"], ["K","I"] + ] + }, + { + "id": "%0_front_r", + "attr": "opacity", + "value": "IF (%0,%1) : TRK & %0 : resbl THEN 1 ELSE 0 END", + "repeat": [ + ["A","B"], ["E","F"], ["F","G"], ["H","I"], ["J","N"], ["L","A"], ["M","H"] + ] + }, + { + "id": "%0_front_r", + "attr": "opacity", + "value": "IF (%0,%1) : TRK or (%0,%2) : TRK & %0 : resbl THEN 1 ELSE 0 END", + "repeat": [ + ["B","C","D"], ["D","E","K"], ["I","K","J"], ["K","F","J"] + ] + }, + { + "id": "%0_front_l", + "attr": "opacity", + "value": "IF (%0,%1) : TRK & %0 : resbl THEN 1 ELSE 0 END", + "repeat": [ + ["A","L"], ["B","A"], ["C","B"], ["D","B"], ["E","D"], ["G","F"], ["H","M"], ["I","H"], ["N","J"] + ] + }, + { + "id": "%0_front_l", + "attr": "opacity", + "value": "IF (%0,%1) : TRK or (%0,%2) : TRK & %0 : resbl THEN 1 ELSE 0 END", + "repeat": [ + ["F","E","K"], ["J","I","K"], ["K","I","D"] + ] + } +], + "events": [ + { + "id": "%0", + "event": "route_reservation", + "predicates": ["r=%0"], + "repeat":[ + ["R1","L","A","B_g","C","C","C","C"], ["R2","L","A","B_g","D_g","E","F_g","G"], ["R3","L","A","B_g","D_g","K_g","J_g","N"], ["R4","M","H","I_g","K_g","F_g","G","G"], ["R5","M","H","I_g","J_g","N","N","N"], ["R6","C","B_g","A","L","L","L","L"], ["R7","G","F_g","E","D_g","B_g","A","L"], ["R8","N","J_g","K_g","D_g","B_g","A","L"], ["R9","G","F_g","K_g","I_g","H","M","M"], ["R10","N","J_g","I_g","H","M","M","M"] + ], + "hovers": [{ "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%1"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%2"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%3"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%4"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%5"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%6"}, + { "attr":"stroke-opacity", "enter":"0.3", "leave":"1.0", "id": "%7"}, + {"attr":"text", "enter":"\"This button reservs Route %0\"", "leave":"", "id":"explanation"} + ], + "comment": "in 'repeat' the lists must have the same length, therefore the last element repeats" + }, + { + "id": "point_p_%0", + "event": "point_positionning", + "predicates": ["r=%0"], + "repeat": [ + ["R1"], ["R2"], ["R3"], ["R4"], ["R5"], ["R6"], ["R7"], ["R8"], ["R9"], ["R10"] + ], + "hovers": [{"attr":"text", "enter":"\"This button positions the points for Route %0\"", "leave":"", "id":"explanation"}] + }, + { + "for": {"from":1, "to":5}, + "id": "s%0", + "event": "route_formation", + "predicates": ["r : (%s.s:S|fst~[SIG~[{s}]])(S%0)"], + "hovers": [{"attr":"text", "enter":"\"If the signal is cliked, it turns green and the train can start\"", "leave":"", "id":"explanation"}] + }, + { + "id": "%0_start", + "event": "FRONT_MOVE_1", + "predicates": ["b=%0"], + "repeat":[ + ["C"], ["G"], ["L"], ["M"], ["N"] + ], + "hovers": [{"attr":"text", "enter":"\"if you click this button the train enters the track\"", "leave":"", "id":"explanation"}] + }, + { + "id": "%0_front_l", + "event": "FRONT_MOVE_2", + "predicates": ["b=%0"], + "repeat": [ + ["A"], ["B"],["C"], ["D"], ["E"], ["F"], ["G"], ["H"], ["I"], ["J"], ["K"], ["L"], ["M"], ["N"] + ], + "hovers": [{"attr":"text", "enter":"\"if you click this button the train moves forward\"", "leave":"", "id":"explanation"}] + }, + { + "id": "%0_front_r", + "event": "FRONT_MOVE_2", + "predicates": ["b=%0"], + "repeat": [ + ["A"], ["B"],["C"], ["D"], ["E"], ["F"], ["G"], ["H"], ["I"], ["J"], ["K"], ["L"], ["M"], ["N"] + ], + "hovers": [{"attr":"text", "enter":"\"if you click this button the train moves forward\"", "leave":"", "id":"explanation"}] + }, + { + "id": "%0_text", + "event": "BACK_MOVE_2", + "predicates": ["b=%0"], + "repeat": [ + ["A"], ["B"], ["C"], ["D"], ["E"], ["F"], ["G"], ["H"], ["I"], ["J"], ["K"], ["L"], ["M"], ["N"] + ], + "hovers": [{"attr":"text", "enter":"\"if you click this button the end of the train moves forward\"", "leave":"", "id":"explanation"}] + }, + { + "id": "%0_ende", + "event": "BACK_MOVE_1", + "predicate": ["b=%0"], + "repeat": [ + ["L"], ["M"], ["C"], ["G"], ["N"] + ], + "hovers": [{"attr":"text", "enter":"\"if you click this button the train leaves the track\"", "leave":"", "id":"explanation"}] + }, + { + "id": "freeing", + "event": "route_freeing", + "predicates": ["r : ROUTES"], + "hovers": [{"attr":"text", "enter":"\"This button frees the routes\"", "leave":"", "id":"explanation"}] + } +] +}