Commit Graph

24 Commits

Author SHA1 Message Date
Michael Lutz 4d3da0cf14 Codechange: [Linkgraph] Drop node/edge wrappers from LinkGraphJob. 2023-02-26 21:41:24 +01:00
Michael Lutz 7352f812e6 Codechange: [Linkgraph] Only store present link graph edges and not all possible edges. 2023-02-26 21:41:24 +01:00
Michael Lutz fe27db3dfd Codechange: [Linkgraph] Store edges in each node and not in a global matrix. 2023-02-26 21:41:24 +01:00
Nicolas Chappe b83820e723 Change: [Linkgraph] Delete links only served by vehicles stopped in depot
A stale link is not deleted if the link refresher finds a vehicle that still serves it.
This commit excludes vehicles stopped in depot for a very long time from the link refresher,
so that their stale links can be deleted.
2021-08-20 22:37:03 +02:00
Nicolas Chappe 977604ef08 Feature: [Linkgraph] Prioritize faster routes for passengers, mail and express cargo
Passengers usually prefer fast paths to short paths.
Average travel times of links are updated in real-time for use in Dijkstra's algorithm,
and newer travel times weigh more, just like capacities.
2021-08-17 14:57:59 +02:00
Patric Stout 7b135a8269 Codechange: use SLE_STRUCT(LIST) for Linkgraph chunks 2021-06-14 21:58:05 +02:00
Patric Stout 9fff00ba20
Codechange: C++-ify lists for SaveLoad (#9323)
Basically, this changes "SaveLoad *" to either:
1) "SaveLoadTable" if a list of SaveLoads was meant
2) "SaveLoad &" if a single entry was meant

As added bonus, this removes SL_END / SLE_END / SLEG_END. This
also adds core/span.hpp, a "std::span"-lite.
2021-05-31 22:26:44 +02:00
rubidium42 6fe4d4ad7b Codechange: linkgraph always iterates with NodeIDs over the Size(), so make Size() the same type to prevent infinite loops 2021-05-27 18:30:56 +02:00
Rubidium bb9121dbd4 Fix: comparison of narrow type to wide type in loop (potential for infinite loops) 2021-05-15 10:16:10 +02:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
Michael Lutz f2b40f40aa Codechange: Replace SmallPair with std::pair.
std::pair is already the smallest possible pair, and it already handles non-POD types correctly.
2020-05-21 20:02:34 +02:00
glx 09fa39c5b5 Codechange: Replace linkgraph related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 2019-03-28 00:09:33 +01:00
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 2019-03-26 20:15:57 +00:00
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 2019-03-26 20:15:57 +00:00
fonsinchen 957f5ca117 (svn r26646) -Fix [FS#6041]: Save locations instead of distances in link graphs to reduce size. 2014-06-14 13:35:39 +00:00
fonsinchen 11d98f043e (svn r26549) -Change: better estimation for link capacities during full load 2014-05-01 14:50:52 +00:00
fonsinchen 5d3fcce725 (svn r26393) -Fix: Update distances between link graph nodes when station sign is moved 2014-03-06 21:19:41 +00:00
fonsinchen e37656f2e5 (svn r26331) -Fix: some inconsistencies regarding link graph (job) IDs. 2014-02-10 20:13:07 +00:00
fonsinchen 2f9c48b859 (svn r25901) -Fix [FS#5675]: Check if any vehicles are still serving a link before deleting it. 2013-10-22 16:19:31 +00:00
fonsinchen 29e987f3fc (svn r25898) -Codechange: Add second timestamp for 'restricted links' to all edges. 2013-10-22 16:13:28 +00:00
rubidium 0fbc7140c5 (svn r25320) -Fix [FS#5577]: link graph start time was not accounted for when cheating dates 2013-06-04 15:06:22 +00:00
rubidium 06313e4981 (svn r25257) -Add: basic link graph (fonsinchen) 2013-05-19 14:11:20 +00:00