OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Private Attributes
FlowMapper Class Reference

Map the path trees generated by the MCF solver into flows. More...

`#include <flowmapper.h>`

Inheritance diagram for FlowMapper:

## Public Member Functions
| FlowMapper (bool scale)
| Create a flow mapper.
virtual void | Run (LinkGraphJob &job) const
| Map the paths generated by the MCF solver into flows associated with nodes.
virtual | ~FlowMapper ()
| Virtual destructor has to be defined because of virtual Run().
Public Member Functions inherited from ComponentHandler
virtual | ~ComponentHandler ()
| Destroy the handler.

## Private Attributes
const bool | scale
| Whether the flow mapper should scale all flows to monthly values.

## Detailed Description

Map the path trees generated by the MCF solver into flows.

The path tree is useful to cache capacities and distances and allow quick disconnecting and reconnecting to other paths. The flows show how much cargo from which nodes is to be routed in which direction at a given node. This is what we need in the end.

Definition at line 24 of file flowmapper.h.

## Constructor & Destructor Documentation

FlowMapper::FlowMapper | ( | bool | scale | ) |
| inline

Create a flow mapper.

Parameters

  scale | Whether the flow mapper should scale all flows to monthly values. Only do that on the very last flow mapping.

Definition at line 32 of file flowmapper.h.

## Member Function Documentation

void FlowMapper::Run | ( | LinkGraphJob & | job | ) | const
| virtual

Map the paths generated by the MCF solver into flows associated with nodes.

Parameters

  component | the link graph component to be used.

Implements ComponentHandler.

Definition at line 21 of file flowmapper.cpp.

References FlowStatMap::FinalizeLocalConsumption(), Path::GetFlow(), Path::GetNode(), Path::GetOrigin(), LinkGraphJob::JoinDate(), LinkGraphJob::LastCompression(), LinkGraphSettings::recalc_time, scale, LinkGraphJob::Settings(), LinkGraphJob::Size(), and LinkGraph::NodeWrapper< Tnode, Tedge >::Station().

The documentation for this class was generated from the following files:

- src/linkgraph/flowmapper.h
- src/linkgraph/flowmapper.cpp