Page 1 of 1

[2.1] performance of TrainManager#request_train_path

Posted: Sun Oct 04, 2026 6:26 am
by hgschmie
Is there any information available on how request_train_path performs?

I have some use cases where I am trying to route large(ish) numbers of trains to a station. Do a lot of starts or a lot of goals affect the performance; if those were constant, does the TrainPathRequestType affect it? Is there an upper limit on how long this call may take?

Basically, I try to get a handle on an "upper bound" of that operation. Whether it could end up taking seconds or more to compute pathes.

Grateful for any information.

Re: [2.1] performance of TrainManager#request_train_path

Posted: Sun Oct 04, 2026 7:33 am
by boskid
Upper bound is proportional to how many rail segments (sections of rails not interrupted by signals, train stops, merges or splits) are reachable from the starting positions and this upper bound is reached each time trains pathfinder fails due to no path. Depending on request type some requests may stop early when the result is found.