Code: Select all
if (_date_fract == LinkGraph::COMPONENTS_SPAWN_TICK ||
_date_fract == LinkGraph::COMPONENTS_JOIN_TICK) {
LinkGraphSettings &settings = _settings_game.linkgraph;
/* This creates a fair distribution of all link graphs' turns over
* the available dates.
*/
uint interval = settings.recalc_interval;
for (uint cargo = _date % interval; cargo < NUM_CARGO; cargo += interval) {
/* don't calculate a link graph if the distribution is manual */
if (settings.GetDistributionType(cargo) == DT_MANUAL) continue;
if (_date_fract == LinkGraph::COMPONENTS_SPAWN_TICK) {
_link_graphs[cargo].NextComponent();
} else /* LinkGraph::COMPONENTS_JOIN_TICK */ {
_link_graphs[cargo].Join();
}
}
}
The "link graph" in this context is a partial copy of the game state calculated from the capacity measurements. It is fed through several link graph handlers which add demands and plan numbers and then "joined" back. What you see in the smallmap are the raw capacity, usage and flow numbers from the main game state.