Link graph: Explicitly flag invalidated flow stats instead of minimising their flows

Entirely exclude invalidated flow stats from link stats

Delete invalidated flow stats if they stay invalid for 32 link graph jobs

This is to prevent large numbers of invalidated flow stats from
unduly influencing link statistics
This commit is contained in:
Jonathan G Rennison
2019-10-20 07:46:21 +01:00
parent 115af44f3a
commit b6e9817edb
7 changed files with 101 additions and 42 deletions

View File

@@ -1594,6 +1594,7 @@ struct StationViewWindow : public Window {
{
const CargoDataEntry *source_dest = this->cached_destinations.Retrieve(i);
for (FlowStatMap::const_iterator it = flows.begin(); it != flows.end(); ++it) {
if (it->IsInvalid()) continue;
StationID from = it->GetOrigin();
const CargoDataEntry *source_entry = source_dest->Retrieve(from);
for (FlowStat::const_iterator flow_it = it->begin(); flow_it != it->end(); ++flow_it) {