Changes for page Basic design

Last modified by nfl on 2025/01/30 12:05

From version 18.1
edited by sna
on 2014/08/13 03:55
Change comment: There is no comment for this version
To version 17.1
edited by sna
on 2014/08/13 02:54
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -46,11 +46,7 @@
46 46  === Structure ===
47 47  
48 48  {{code linenumbers="true" language="sct"}}
49 -//
50 -// Structure of a train controller based on test case 2
51 -//
52 -scchart Test2 "Test of IC_JCT" {
53 -  // Set of request variables for all tracks for 11 trains
49 +scchart Test2b "Test of IC_JCT" {
54 54   bool IC_JCT_0_req[11], IC_LN_0_req[11], IC_LN_1_req[11], IC_LN_2_req[11];
55 55   bool IC_LN_3_req[11], IC_LN_4_req[11], IC_LN_5_req[11], IC_ST_0_req[11];
56 56   bool IC_ST_1_req[11], IC_ST_2_req[11], IC_ST_3_req[11], IC_ST_4_req[11];
... ... @@ -63,9 +63,7 @@
63 63   bool OC_LN_2_req[11], OC_LN_3_req[11], OC_LN_4_req[11], OC_LN_5_req[11];
64 64   bool OC_ST_0_req[11], OC_ST_1_req[11], OC_ST_2_req[11], OC_ST_3_req[11];
65 65   bool OC_ST_4_req[11], OI_LN_0_req[11], OI_LN_1_req[11], OI_LN_2_req[11];
66 -
67 - // Set of permission variables for all tracks
68 -  bool req_in_R, req_out_R, req_in_L, req_out_L, perm_in_R, perm_out_R, perm_in_L, perm_out_L;
62 + bool req_in_R, req_out_R, req_in_L, req_out_L, perm_in_R, perm_out_R, perm_in_L, perm_out_L;
69 69   int IC_JCT_0_perm, IC_LN_0_perm, IC_LN_1_perm, IC_LN_2_perm;
70 70   int IC_LN_3_perm, IC_LN_4_perm, IC_LN_5_perm, IC_ST_0_perm;
71 71   int IC_ST_1_perm, IC_ST_2_perm, IC_ST_3_perm, IC_ST_4_perm;
... ... @@ -78,15 +78,11 @@
78 78   int OC_LN_2_perm, OC_LN_3_perm, OC_LN_4_perm, OC_LN_5_perm;
79 79   int OC_ST_0_perm, OC_ST_1_perm, OC_ST_2_perm, OC_ST_3_perm;
80 80   int OC_ST_4_perm, OI_LN_0_perm, OI_LN_1_perm, OI_LN_2_perm;
81 -
82 - // Debug flag for additional output
75 +
83 83   bool debug = false;
84 - // Cleanup flag for halting the trains at home station tracks
85 -  bool cleanup = false;
86 -  // Variable, that gives the number of trains to C-Controller for stability check
77 + bool cleanup = false;
87 87   int trainCount;
88 -
89 - // Set of constants for binding to referenced SCCharts
79 +
90 90   const int c_EINS = 1;
91 91   const int c_ZWEI = 2;
92 92   const int c_DREI = 3;
... ... @@ -93,59 +93,37 @@
93 93   const int c_VIER = 4;
94 94   const int c_FUENF = 5;
95 95  
96 - // State initializing the trains on corresponding tracks
97 97   initial state init references initRailway11Trains
98 98   --> run;
99 99  
100 - // State handling the train schedules
101 101   state run {
102 - // Regions handling the mutual exclusion on the track segments
103 103   region Mutexes:
104 -  // State referenced to the MutexController for 11 Trains
105 105   initial state Mutexes references mutexRailway11Trains;
106 106  
107 107   region KH_Mutexes:
108 -  // State referenced to additional MutexController for KH
109 109   initial state KH_Mutexes references kh_mutex;
110 110  
111 - // Regions that contain the schedules for individual trains
112 - //--------------------------------------------------------------------------------------
113 -
114 - // Region with schedule for train 4
115 115   region Train4 :
116 -  // State with the schedule for train 4
117 117   initial state train4 {
118 118  
119 - // Annotation for replacing following constant in the hostcode of referenced SCChart
120 120   @alterHostcode
121 - // Number of the train for identifying on track segments
122 122   const int trainNum = 4;
123 -  // Variable specifying the track, where the train arrives at,
124 - // and for transmitting the track number to next Station-2-Station controller
125 125   int arrivalTrack = 3;
126 126  
127 - // Schedule of train 4: train drives only in the IC, should use station track 3
128 - // State Round referenced to ICIC Station-2-Station controller
129 129   initial state Round references ICIC
130 130   bind depTrack to arrivalTrack,
131 131   destTrack to c_DREI,
132 132   arrTrack to arrivalTrack
133 -  // Transition to checking state
134 134   >-> Choice;
135 -
136 - // State for checking, when the train should halt and if the train is on corresponding track
108 +
137 137   state Choice
138 - // Transition for driving additional circle, if cleanup = false or wrong track used
139 139   --> Round with !cleanup | !(arrivalTrack == 3)
140 - // Transition to final state
141 141   --> Done;
142 142  
143 - final state Done;
113 + final state Done;
114 +
144 144   };
145 -
146 -
147 - // Region with schedule for train 5, identical to region above
148 -  region Train5 :
116 + region Train5 :
149 149   initial state train5 {
150 150  
151 151   @alterHostcode
... ... @@ -166,8 +166,6 @@
166 166  
167 167   };
168 168  
169 -
170 - // Region with schedule for train 9, identical to region above
171 171   region Train9 :
172 172   initial state train9 {
173 173  
... ... @@ -187,9 +187,7 @@
187 187  
188 188   final state Done;
189 189   };
190 -
191 -
192 - // Region with schedule for train 7
156 +
193 193   region Train7 :
194 194   initial state train7 {
195 195  
... ... @@ -197,14 +197,10 @@
197 197   const int trainNum = 7;
198 198   int arrivalTrack = 1;
199 199  
200 - // Schedule of train 7: train drives from OC-Station track 1 to IC-Station track 2 and back
201 - // arrivalTrack used for transmitting the number of station track where train arrived on
202 - // to next controller where the train starts on
203 203   initial state OCtoIC references OCIC
204 204   bind depTrack to arrivalTrack,
205 205   destTrack to c_ZWEI,
206 206   arrTrack to arrivalTrack
207 -  // Transition to next Station-2-Station controller
208 208   >-> ICtoOC;
209 209  
210 210   state ICtoOC references ICOC
... ... @@ -211,14 +211,10 @@
211 211   bind depTrack to arrivalTrack,
212 212   destTrack to c_EINS,
213 213   arrTrack to arrivalTrack
214 -  // Transition to checking state because train at home station
215 215   >-> Choice;
216 216  
217 - // State for checking, when the train should halt and if the train is on corresponding track
218 218   state Choice
219 - // Transition for driving additional circle, if cleanup = false or wrong track used
220 -  --> OCtoIC with !cleanup | !(arrivalTrack == 1)
221 - // Transition to final state
177 + --> OCtoIC with !cleanup | !(arrivalTrack == 1)
222 222   --> Done;
223 223  
224 224   final state Done;
... ... @@ -324,9 +324,9 @@
324 324  
325 325  
326 326  
327 - // ----------------------------------------------------------------------------------------------------------------
283 + // .....................................................................................
328 328   // Set of track segment controlling states such as follows
329 - // ----------------------------------------------------------------------------------------------------------------
285 + // .....................................................................................
330 330  
331 331   // Transition to next track segment, if contact is triggered
332 332   state *_LN_0 {
... ... @@ -398,7 +398,7 @@
398 398   // Transition to next track segment, if contact is triggered
399 399   --> *_LN_1 with 'railContact(*_LN_1,0)';
400 400  
401 - // ----------------------------------------------------------------------------------------------------------------
357 + // ..................................................................................
402 402  
403 403  
404 404  
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -9471746
1 +9471666
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/SS14Railway/pages/9471746/Basic design
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/SS14Railway/pages/9471666/Basic design