Commit Graph

42 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 58f2e0cdf0 Clamp link graph compression ticks when loading old saves 4 months ago
Jonathan G Rennison 1f5b35fac4 Change link graph join and compression times to use scaled tick counter 4 months ago
Jonathan G Rennison 7ce06e22b8 Split date types into calendar and economy dates
See: 735abfe1
4 months ago
Jonathan G Rennison 0ea57528c9 Rename DateTicksScaled to StateTicks
Rename various other related/derived types and variables
4 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
5 months ago
Jonathan G Rennison 03e0ec8276 Strong typedef: Use strong typedefs for date, date tick, minutes types
Add delta types
Adjust/add type conversion functions
Add various utility methods on types
Remove the various minute macros
Fix some minute conversion inconsistencies
6 months ago
Jonathan G Rennison acc54fabfe Link graph: Fix last_compression adjustments for link graph jobs 7 months ago
Jonathan G Rennison e1cce4d9f7 Link graph: Store last compression in scaled date ticks
Higher accuracy than using dates at high day legnths
12 months ago
Jonathan G Rennison 6091d7470c Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/release-macos.yml
#	src/company_gui.cpp
#	src/linkgraph/linkgraph.cpp
#	src/newgrf_debug_gui.cpp
#	src/strgen/strgen_base.cpp
#	src/timetable_gui.cpp
1 year ago
PeterN 57f2d70fef
Change: Use cstdint instead of rolling our own types. (#10651) 1 year ago
Tyler Trahan 930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 1 year ago
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 1 year ago
Michael Lutz aab580e0ac Codechange: [Linkgraph] Drop node/edge wrappers from LinkGraph. 1 year ago
Michael Lutz 7352f812e6 Codechange: [Linkgraph] Only store present link graph edges and not all possible edges. 1 year ago
Michael Lutz fe27db3dfd Codechange: [Linkgraph] Store edges in each node and not in a global matrix. 1 year ago
Jonathan G Rennison 760cbcbb8b Merge branch 'master' into jgrpp
# Conflicts:
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_base.hpp
#	src/blitter/8bpp_base.hpp
#	src/blitter/null.hpp
#	src/cheat_gui.cpp
#	src/gfx.cpp
#	src/linkgraph/linkgraph.cpp
#	src/spriteloader/grf.cpp
#	src/station_cmd.cpp
1 year ago
Patric Stout 1fb101eabb
Codechange: address CodeQL issue "Multiplication result converted to larger type" (#10306)
Most are very unlikely to ever be triggered in our codebase; two
stand out: linkgraph and money cheat. Those, potentially, could
wrap earlier than expected.
1 year ago
Jonathan G Rennison 599b016c91 Adjust link graph edge travel time updates in refresh mode 2 years ago
Jonathan G Rennison 5c2d5782a4 Fixes incorrect link graph edge travel times with non-unity day length
Change vehicle last_loading_tick to be relative to _scaled_tick_counter
2 years ago
Jonathan G Rennison e647075870 Change LinkGraph::EdgeMatrix to a sparse storage format
Use a btree_map instead of a SmallMatrix.
This avoids excessive storage requirements for large graphs,
and overly expensive edge matrix resize operations.
Remove next_edge iteration mechanism.
2 years ago
Jonathan G Rennison 0bf1c9bb9d Merge tag '13.0-beta1' into jgrpp 2 years ago
Nicolas Chappe a43a1902bb 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.

(cherry picked from commit 977604ef08)
2 years ago
Nicolas Chappe c5369caa45 Fix: [Linkgraph] possible rounding errors for travel times of low-capacity links 2 years ago
Jonathan G Rennison 89181ea9fd Add setting to increase cost/distance of aircraft linkgraph links 2 years ago
Nicolas Chappe de28817d9f Fix 977604ef: [Linkgraph] Add a special case for unknown travel times on link update 3 years ago
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.
3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
PeterN 32fda83d39
Fix aa7ca7fe6: Linkgraph node index order must be maintained due to other references. (#7431)
Linkgraph nodes require a specific order that was maintained by swapping just the last
element for the node to be removed. std::vector::erase() changed this to removing the
node is then shuffling the remain items down, which upsets other references to this
indices.

This is fixed by switching back to the original swap & pop method.
5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson aa7ca7fe64 Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + n 5 years ago
Henry Wilson bad2c2154b Codechange: Replaced SmallVector::Resize() with std::vector::resize() 5 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
fonsinchen 957f5ca117 (svn r26646) -Fix [FS#6041]: Save locations instead of distances in link graphs to reduce size. 10 years ago
rubidium 89c25b955e (svn r26580) -Codechange: s/GES_PICKUP/GES_RATING/ (it has nothing to do with actual pickup), s/acceptance_pickup/status/ (the enum isn't called GoodEntryStatus for a reason; it's not only acceptance and pickup anymore) 10 years ago
fonsinchen 11d98f043e (svn r26549) -Change: better estimation for link capacities during full load 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
fonsinchen afd1263ce1 (svn r26411) -Change [FS#5941]: Use better distance metric for link graph (MildaIV) 10 years ago
fonsinchen 5d3fcce725 (svn r26393) -Fix: Update distances between link graph nodes when station sign is moved 10 years ago
fonsinchen 29e987f3fc (svn r25898) -Codechange: Add second timestamp for 'restricted links' to all edges. 11 years ago
rubidium 0fbc7140c5 (svn r25320) -Fix [FS#5577]: link graph start time was not accounted for when cheating dates 11 years ago
rubidium 06313e4981 (svn r25257) -Add: basic link graph (fonsinchen) 11 years ago