deprecated:schedules-testcase-en
Differences
This shows you the differences between two versions of the page.
deprecated:schedules-testcase-en [2018/11/12 08:56] – external edit 127.0.0.1 | deprecated:schedules-testcase-en [2020/05/08 14:59] (current) – removed smitt48 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======Schedules Test Case 1====== | ||
- | [[: | ||
- | [[english|Content]] -> [[english# | ||
- | * [[schedules-index-en|Index]] | [[schedules-dest-en|Destinations]] | [[schedules-actions-en|Follow-up]] | [[locations-en|Locations and Schedules]] | **Test Case 1** | [[schedules-testcase2-en|Test Case 2]] | [[schedules-examples-en|Examples]] | ||
- | |||
- | |||
- | // \\ // \\ | ||
- | |||
- | {{prorail.jpg}}\\ | ||
- | //Its All A Matter of Planning and Timing// | ||
- | |||
- | =====Layout Plan===== | ||
- | Designed by Rob and built by Mark, this simple plan has some surprisingly complex problems that can only be solved by Schedules. It evolved from Mark's early work with " | ||
- | |||
- | | {{dueling.png}} | {{dueling.xml}} | | ||
- | |||
- | =====Basic Design===== | ||
- | |||
- | ====Blocks==== | ||
- | Each block is set up the same with a fixed wait time of 1 minute. | ||
- | |||
- | ====Routes==== | ||
- | Originally there were seven routes that define the possible connections between the blocks. They are: | ||
- | * **r1 (A2-B)** | ||
- | * **r2 (A2-C)** | ||
- | * **r3 (B-A1)** | ||
- | * **r4 (C-A1)** | ||
- | * **r5 (A1-A2)** | ||
- | * **r6 (D-A1)** | ||
- | * **r7 (E-A1)** | ||
- | Note that all these routes are setup **clockwise** starting from the upper right hand corner block **A2** ("1 O' | ||
- | |||
- | Each route is set for "Both Directions", | ||
- | |||
- | However, during testing it became obvious that all the locomotives being run would have to face clockwise on the layout. This means that a Steamer running counter-clockwise would have to face the wrong way. For this reason, three routes were added to allow a locomotive to run facing counter-clockwise around the track: | ||
- | * **C-A2** | ||
- | * **A2-A1** | ||
- | * **A1-C** | ||
- | These routes were setup **counter-clockwise** by using " | ||
- | |||
- | ====Block Groups==== | ||
- | There is a single Block Group A1-A2, which is marked as a Critical Section. This means that if a locomotive reserves one block, it automatically reserves the other. | ||
- | |||
- | =====Goals and Problems===== | ||
- | The main goal is to allow trains to share the layout as they follow different patterns at the same time. For example, a freight train moving clockwise while a passenger train moves counter-clockwise, | ||
- | |||
- | ====Routes Are Not Enough==== | ||
- | Using just basic blocks and routes two locomotives can be made to randomly move " | ||
- | |||
- | ====Deadlocking==== | ||
- | When 2 locomotives both want to move into each others block, they will " | ||
- | |||
- | Rocrail must be able to resolve these conflicts, or fail with a message that says "This deadlock cannot be resolved." | ||
- | |||
- | ====Critical Sections==== | ||
- | Critical Sections are groups of blocks that can only have one locomotive in them at a time. If a locomotive reserves one of the blocks in the critical section, all the other blocks are reserved for that locomotive at the same time. The top side of the Schedules Test Case layout is divided into two blocks to test this principle. A1 and A2 are linked so that if one locomotive reserves either block, it reserves both. | ||
- | |||
- | =====Test Schedules and Progress Made===== | ||
- | Work started on Schedule testing back in late spring of 2007, but with the onset of Summer, testing stopped for a while. It was renewed in the fall of 2007, with good results. | ||
- | |||
- | ====Basic Testing==== | ||
- | The first case was to test a single locomotive running a basic schedule, then test two locomotives running two schedules at the same time. For this reason, the first two schedules used were: | ||
- | * **C-A1-A2-C** (clockwise, repeating) | ||
- | * **B-A2-A1-B** (counter-clockwise, | ||
- | Note that these schedules were made to repeat by setting the Schedules drop-down in the Action tab to the same schedule. For example, schedule C-A1-A2-C had Actions > Schedules set to C-A1-A2-C. | ||
- | |||
- | Initially, a single locomotive running either of these schedules worked perfectly. However, running two locomotives at the same time would always deadlock in the A1-A2 part of the layout. This was fixed as of svn 1931. After the fix, one locomotive would run the first schedule while the other waits, then the second locomotive would run its schedule while the first waited. | ||
- | |||
- | Also, the locomotives used for initial testing were Electric locomotives, | ||
- | |||
- | ====Yard Testing==== | ||
- | The next set of schedules tested Rocrail' | ||
- | * **C-A2-A1-C** (clockwise, repeating) | ||
- | * **D-A1-E-A1-D** (both directions, repeating) | ||
- | As of svn 1942, this worked perfectly. When the locomotive running the second schedule would enter A1, the other locomotive would halt in A2 and wait until the first locomotive was back in a siding. Then the waiting locomotive would continue past A1, and stop in C. The locomotive in the siding would move back out into A1, and the cycle would repeat. | ||
- | |||
- | This is an example of a Yard Switcher working while Main Line trains keep moving through the yard's entrance. | ||
- | |||
- | ====Cleaning Schedule==== | ||
- | Rocrail could already be used to clean the layout randomly by simply attaching a cleaning car to a locomotive and starting it under Automatic mode. But because of all the stopping and starting involved, it was not very efficient, the cleaning car should be run at constant speed when possible. This schedule was designed to clean the layout more efficiently: | ||
- | * **C-A1-A2-B-A1-A2-C-A1-D-A1-E-A1-D-A1-A2-C** (clockwise, then both directions, repeating) | ||
- | This was used as of svn 1946 to clean the layout, and also functioned perfectly. | ||
- | |||
- | ====Dueling Dampfloks and Direction==== | ||
- | The direction issue and locomotive placement became a problem when we tried to run the Dueling Dampfloks scenario originally envisioned back in the Spring. This quickly pointed out the following important points about Routes, Direction and Locomotive Placing: | ||
- | - From To and Both Directions control whether a locomotive is allowed to move one way only along the route, regardless of facing. For example, if a Route A-B is From To, a locomotive can **only** move from A to B. | ||
- | - Run Direction controls if Rocrail sends forward commands to the locomotive when using the route. For example, if a Route A-B has Run Direction set to **Reverse**, | ||
- | - Placing also controls if Rocrail sends forward commands to the locomotive to move forwards along the route. For example, if a locomotive in A on Route A-B with a Run Direction of **Forwards** has **Placing unchecked**, | ||
- | - Run Direction and Placing are **combined** when Rocrail determines how to move a locomotive. For example, if a Route A-B has Run Direction set to **Reverse**, | ||
- | Once Mark fully understood this, he got Dueling Dampfloks to run very well using these schedules: | ||
- | * **C-A2-A1-C** (counter-clockwise, | ||
- | * **B-A1-D-A1-A2-B** (both directions, then runs next schedule, used by the BR 74) | ||
- | * **B-A1-E-A1-A2-B** (both directions, then runs previous schedule, used by the BR 74) | ||
- | You can see a short low-resolution video of the Dueling Dampfloks layout in action on You Tube: | ||
- | [[http:// | ||
- | |||
- | =====Future Development===== | ||
- | Schedules are still evolving in Rocrail, and there are many unused fields in the dialog boxes that illustrate ideas that have not been implemented yet. Some of the ideas that still need to be developed are: | ||
- | {{schedule-plan-A.jpg}} | ||
- | |||
- | **Block Timing** | ||
- | This will allow trains to know that they are early, late or on time. Rocrail can then speed up, slow down, or even make a train wait as needed. | ||
- | |||
- | Each block already has a time associated with it in a Schedule. If the first block in the schedule is set for 0:00. and the next is set to 1:00, Rocrail should know if the train made it into the block at 0:30 (early), or 1:07 (late) and make a decision based on Time. Rocrail should hold a train in a block if it is early, and perhaps speed the train up if it is late. This is more complex than it seems. | ||
- | |||
- | **Timetables** **and Clock Usage** | ||
- | This will allow schedules to be repeated only at specific times. Instead of having a schedule run, stop and then just run again, Rocrail should be able to run a schedule at 9:57, then 12:15, then 13:45. This is more complex than it seems, and brings up the idea of " | ||
- | {{schedule-plan-B.jpg}} | ||
- | |||
- | **Schedule Groups** | ||
- | In the same way that we can link a set of routes into a schedule, we should be able to link a group of schedules into a **Run**. Note that we need a better word for this concept, but the idea is that the train first runs the Amsterdam to Paris schedule, then the Paris to Munich schedule, then the Munich to Amsterdam schedule. | ||
- | |||
- | **Train Priority** | ||
- | Fast trains should reserve blocks instead of slow trains where possible. However, a slow train must not be stopped indefinitely because there are too many fast trains using the track it needs. This is very complex, and implies **aging**, i.e. when a train is only a little bit late, you can stop it, but if it is very late, it must run with higher priority so it will not be " | ||
- | |||
- | **Passing Tracks** | ||
- | Situations where a slow train is in front of a fast train should be handled as well, with the slow train " | ||
- | * **A1-B-A2-A1** | ||
- | * **A1-C (wait)-A2-A1** | ||
- | We would always use the first schedule if no other train was on the layout. But if a train with higher priority was following this train, this train would use the second schedule and wait in C while the other train moves ahead of it. | ||
- | |||
- | **Function Triggering** | ||
- | When a train completes a schedule, a specific function is activated. This might let a locomotive play a sound when it reaches its destination, | ||
- | |||
- | This is one of the goals of the original Dueling Dampfloks layout, the idea of a switcher running two sets of wagons from each of the sidings while a main passenger train runs the layout. | ||
- | |||
- | This is already implemented, | ||
- | |||
- | **Output Triggering** | ||
- | This will allow other actions to be taken when a schedule is completed, such as turning on or off lights, putting power on the rails in an isolated section, or any other kind of electrical action that can be controlled by an addressable decoder. | ||
- | |||
- | =====Layout Details===== | ||
- | The following tables show the details for all the elements in the layout. | ||
- | |||
- | | **Block** | **Direction** | **Critical** | | ||
- | | A1 | all | Y | | ||
- | | A2 | all | Y | | ||
- | | B | all | N | | ||
- | | C | all | N | | ||
- | | D | all | N | | ||
- | | E | all | N | | ||
- | |||
- | |||
- | |||
- | | **Sensor** | **FromBlock-Event** | | ||
- | | s1a1 | B-enter, C-enter, A2-in | | ||
- | | s2a1 | B-in, C-in, A2-enter | | ||
- | | s1a2 | A1-enter, B-in, C-in | | ||
- | | s2a2 | A1-in, B-enter, C-enter | | ||
- | | s1b | A2-enter, A1-in | | ||
- | | s2b | A2-in, A1-enter | | ||
- | | s1c | A2-enter, A1-in | | ||
- | | s2c | A2-in, A1-enter | | ||
- | | s1d | A1-in | | ||
- | | s2d | A1-enter | | ||
- | | s1e | A1-in | | ||
- | | s2e | A1-enter | | ||
- | |||
- | |||
- | | **Route** | **From** | **To** | **Directions** | **Actions** | | ||
- | | 1 | A2 | B | all | t2 thrown | | ||
- | | 2 | A2 | C | all | t2 straight | | ||
- | | 3 | B | A1 | all | t1 thrown, t3 straight | | ||
- | | 4 | C | A1 | all | t1 straight | | ||
- | | 5 | A1 | A2 | all | - | | ||
- | | 6 | D | A1 | all | t3 thrown, t4 thrown | | ||
- | | 6 | E | A1 | all | t3 thrown, t4 straight | | ||
- | |||
- | |||
- | | **Schedule** | **Destinations** | **type** | **Remark** | | ||
- | | 1 | B, A1, A2, B | cycle: 10 times | - | | ||
- | | 2 | C, A2, A1, B | cycle: 10 times | using routes to/from will flip the direction bit of the train | | ||
- | | 3 | D, A1, E, A1, D | cycle: 2 times | using routes to/from will flip the direction bit of the train | | ||
- | |||
- | =====Schedule Actions===== | ||
- | {{schedules-actions-en.png}} | ||
- | Action to submit after reaching the last destination. | ||
deprecated/schedules-testcase-en.1542009364.txt.gz · Last modified: 2018/11/12 08:56 by 127.0.0.1