Generate timetables automatically Using AI to fill out station times
#1
Posted 06 April 2021 - 05:14 PM
After creating a few passenger Timetables for personal use, I've been wondering whether there is (or will be) a way to automatically fill out the Timetable spreadsheet (*.timetable_or) with station times using a path or a given set of paths.
As of now, I create the paths and play them in Activity Mode to manually record the schedule for each route, which is a fun yet time-consuming process, especially in routes with lots of branching. Then, I use the Timetable editor to translate my "offline" data into something actionable, usually struggling with nuances of one-track sections.
As far as I understand, when loading an activity in Timetable Mode, Open Rails does already calculate the runs for all trains (based on the spreadsheet data, route parameters, and the .pat file) to place each vehicle in the correct position. Therefore, I assume it should be technically feasible to automatically fill out a schedule for different routes (i.e., paths) given the same set of parameters (*.pat, *.stations, frequency, speed restrictions...).
I am naive when it comes to programming, but happy to contribute ideas.
As a gift, here is a custom timetable I made for the great A Vapore in Toscana 2 route with 6 different lines and + 200 trains to choose from (there are four different Consists types, you may have to adjust those to your rolling stock).
Thank you,
BarcelonaSants
#2
Posted 06 April 2021 - 06:01 PM
Great idea.
Furthermore, MSTS AE already have done such routine for player, though in quite a strange way.
Using given path, station-with stop list, entered by player "engineer performance"coefficient and platform stop times, taken from route data.
It was auto-calculated then.
Maybe, you would try it, then gain some new, or develop some of your existent ideas.
Thank for gift.
#3
Posted 06 April 2021 - 08:42 PM
#4
Posted 07 April 2021 - 04:54 AM
pschlik, on 06 April 2021 - 08:42 PM, said:
That is a great idea! I'm not familiar with Train Sim World's book but will take a look. Generating a one-time file (it could be a *.timetable_or) makes more sense than calculating train runs every loading cycle, which adds unnecessary time. Yes, you may need a few minutes for OpenRails to calculate full timetables for larger routes, but as a reward, you get hundreds of AI trains relatively easily (i.e. a semi-automated activity generator, that is).
As for the file size, I guess it will depend on how many points you are calculating for each train, but I think the size will be manageable.
Avoiding deadlocks will be a great improvement over manually calculating (i.e. guessing) crossing sections in single-track sections.
My experience with loading times in OpenRails/MSTS is that they are sometimes oddly predetermined by the *.tdb. I use the $stoptime=n parameter to override those.
#6
Posted 07 April 2021 - 06:10 AM
RR1, on 07 April 2021 - 05:23 AM, said:
Thank you for the suggestion. I know auto_table and I think it's a great tool (the perfect approach to simulate real-world timetables, actually).
My question was about an automatic timetable generator that could work on any route (real or not), given certain parameters (hourly Acela service, anyone? http://www.elvastower.com/forums/public/style_emoticons/default/whistling.gif)
Now that you mention it, I think this functionality could be easily integrated in/merged with auto_table
#7
Posted 07 April 2021 - 01:43 PM
If it will be shortened, the loading time increases proportionally.
#8
Posted 07 April 2021 - 02:18 PM
pschlik, on 06 April 2021 - 08:42 PM, said:
It could actually fairly easily be done (using the existing save and restore functions), but the problem is that any change in the route, consists, trains, paths, timetable or whatever would make all this data useless.
As until recently timetables were rarely if ever distributed and made available to users as complete packages there was little use for such a function.
Regards,
Rob Roeterdink
#9
Posted 07 April 2021 - 04:16 PM
roeter, on 07 April 2021 - 02:18 PM, said:
As until recently timetables were rarely if ever distributed and made available to users as complete packages there was little use for such a function.
Regards,
Rob Roeterdink
Of course, and the same sort of problem exists in Train Sim World, as any change to the schedule would indeed require a resimulation of the timetable. But that's just a case of detecting when there's a discrepancy between the timetable simulation and the timetable currently present and invalidating the simulation as a result. If a timetable is missing a valid simulation, the game could just forcibly re-simulate the timetable the next time the player tries to load it up. Either way, they would have to wait through a loading screen for the timetable to simulate, but with just a couple minutes more spent in the loading screen to finish the entire simulation, the next time it loads up could be 20 times faster. A worthwhile investment I'd say.
Though some changes wouldn't justify a resimulation: even TSW has shown the simulation idea is moderately robust, as TSW features minor randomization elements (usually this means different locomotives hauling a train in-game than in simulation) which generally don't cause any trouble. Randomized consists should be coming soon to Open Rails as well, and they'll be perfect for timetable variety. I don't think that would cause any major problems with a pre-simulated timetable.
Yes, "but sometimes" it could go wrong...and that's life. If the only thing stopping this is a "but sometimes" issue, well, that's no (good) reason to give up!
#10
Posted 07 April 2021 - 05:13 PM
roeter, on 07 April 2021 - 02:18 PM, said:
As until recently timetables were rarely if ever distributed and made available to users as complete packages there was little use for such a function.
Regards,
Rob Roeterdink
So glad to hear this should be fairly easy to implementhttp://www.elvastower.com/forums/public/style_emoticons/default/sign_rockon.gifAny idea on what would be needed?
pschlik, on 07 April 2021 - 04:16 PM, said:
Though some changes wouldn't justify a resimulation: even TSW has shown the simulation idea is moderately robust, as TSW features minor randomization elements (usually this means different locomotives hauling a train in-game than in simulation) which generally don't cause any trouble. Randomized consists should be coming soon to Open Rails as well, and they'll be perfect for timetable variety. I don't think that would cause any major problems with a pre-simulated timetable.
Yes, "but sometimes" it could go wrong...and that's life. If the only thing stopping this is a "but sometimes" issue, well, that's no (good) reason to give up!
I'm with pschlik that forcing a re-simulation of the timetable in every load is not ideal but it definitely sounds like a time worth waiting to me. As a first step, I'm wondering if this may be added as an option to the Timetable Editor (to assist in generating automated *.timetable_or files). This will avoid prolonged loading times, as data would be generated/recalculated "offline".