Page 1 of 1
|Timetable creation hints 17/01/2018 at 01:10 #105161|
A thread to collect 'how to' on making timetables easily.
Those who have been doing timetables for a while still miss 'convdata' and the workarounds that evolved editing timetable files as text.
In the new 'single wtt' it is really a zip file containg two xml files that are human readable and so editable. The xml structure makes it easy to read but not so great to edit.
However for some bulk text edits it works, eg train type fixes, naming errors or finding times to edit manually (eg I want to change all Greenhill lower entries back by 1 minute).
I still use 'PFEedit' (a programmer text editor) not an xml editor for this.
Log in to reply
|Timetable creation hints 17/01/2018 at 01:36 #105162|
Bulk rule generation, file attached.
I needed a lot of rules for Cowlairs 2016 as trains exit and then re-enter about 30 minutes later having gone round Queen St low level (Hyndland to Belgrove or vice versa). Clearly going to be a pain typing them all in (about 100 rules), and as it was the same rule it was suitable for automation.
I got the .xml file from the .wtt file - renamed .wtt to .zip and extracted with winzip or natively.
Having already made and tested one rule I got the rule text format from the xml.
Using 'analysis' I got the list of trains at the exit and entry points, and it was simple as I was still working from 'mini timetables' for each service group not the whole sim timetable.
I deleted all but the Hyndland and Bellgrove locations text and imported it into a spreadsheet (I used Openoffice, MSExcel similar). At import I parsed the text file to put data into columns, most vital is separating the headcode or UID. Parse by 'space delimiter' was OK.
I then moved the 'Bellgrove' text beside the Hyndland text and lined up the linked trains on the same row. Also allows me to check train types match. This is rows 1 - 50 on the attached spreadsheet.
There were a couple that did not 'go round' and became trains in a different service group. These rules had to go in manually and in one timetable only. This is why 1R03 is missing between row 9 and row 10.
I could then create a string formula to create rules text which also picked out the two Train ID from the analysis text block.
The text is rows 56 to 97 of the spreadsheet.
Next rule, next line and the spreadsheet references keep up as usual.
Finally I joined up the text elements into a single string - rows 102 to 143.
Then just copy the whole text block (now just one cell per row G102 to G143) over into the timetable .xml file pulled out of the .wtt file:
Each rule can be input in the xml file as one line, you do not need to do the formatting.
Save the xml and put back into the zip file.
Rename zip back to wtt.
A load and save with the sim sorts out the formatting.
Post has attachments. Log in to view them.
Log in to reply