Hint, performance Trackbuilding
Posted: Sat Apr 01, 2017 12:58 pm
Hi,
after your Explanation, how Trackbuilding works today, I would suggest, to put a Segment layer in between.
So a Track is member of a Segment. A Segment is a Connection between 2 Points.
And only if A Track Action leads do a Change, that 2 connected Points are affekted, you Need to recalculate path finding.
So if you have a double sided connected Segment, and you delete a track, you get 2 new Segmentes, with open Ends.
In this case, you Need to recalculate only those paths, used by the Segment.
If you build a track. And only, if this Action leads to the Situation, that this Segments connect 2 Points with Connections to the Network, then, all paths Need to be recalculated.
To Stretch calculations, I would mark Train scedules as Calculated. Only if a new Segment closes a new Connection, I would reset this mark. So if a Train goes for new Destination, it calculates the way new, if this mark is false.
And at the end, recalculating the rest of the paths, not actualy used, is something, a backround working Task in a multithreading enviroment can handle.
after your Explanation, how Trackbuilding works today, I would suggest, to put a Segment layer in between.
So a Track is member of a Segment. A Segment is a Connection between 2 Points.
And only if A Track Action leads do a Change, that 2 connected Points are affekted, you Need to recalculate path finding.
So if you have a double sided connected Segment, and you delete a track, you get 2 new Segmentes, with open Ends.
In this case, you Need to recalculate only those paths, used by the Segment.
If you build a track. And only, if this Action leads to the Situation, that this Segments connect 2 Points with Connections to the Network, then, all paths Need to be recalculated.
To Stretch calculations, I would mark Train scedules as Calculated. Only if a new Segment closes a new Connection, I would reset this mark. So if a Train goes for new Destination, it calculates the way new, if this mark is false.
And at the end, recalculating the rest of the paths, not actualy used, is something, a backround working Task in a multithreading enviroment can handle.