OpenTTD Source: AsymmetricScaler Class Reference

OpenTTD Source 14.0-RC3

Public Member Functions
AsymmetricScaler Class Reference

A scaler for asymmetric distribution. More...

Inheritance diagram for AsymmetricScaler:

## Public Member Functions
void | AddNode (const Node &)
| Nothing to do here. More...
void | SetDemandPerNode (uint)
| Nothing to do here. More...
uint | EffectiveSupply (const Node &from, const Node &)
| Get the effective supply of one node towards another one. More...
bool | HasDemandLeft (const Node &to)
| Check if there is any acceptance left for this node. More...
Public Member Functions inherited from Scaler
void | SetDemands (LinkGraphJob &job, NodeID from, NodeID to, uint demand_forw)
| Set the demands between two nodes using the given base demand. More...

## Detailed Description

A scaler for asymmetric distribution.

Definition at line 86 of file demands.cpp.

## Member Function Documentation

## ◆ AddNode()

void AsymmetricScaler::AddNode | ( | const Node & |  | ) |
| inline

Nothing to do here.

Parameters

  unused. |

Definition at line 92 of file demands.cpp.

## ◆ EffectiveSupply()

uint AsymmetricScaler::EffectiveSupply | ( | const Node & | from,
|  | const Node & |
| ) |  |
| inline

Get the effective supply of one node towards another one.

Parameters

  from | The supplying node.
  unused. |

Definition at line 109 of file demands.cpp.

References LinkGraph::BaseNode::supply.

## ◆ HasDemandLeft()

bool AsymmetricScaler::HasDemandLeft | ( | const Node & | to | ) |
| inline

Check if there is any acceptance left for this node.

In asymmetric distribution nodes always accept as long as their demand > 0.

Parameters

  to | The node to be checked.

Definition at line 119 of file demands.cpp.

References LinkGraph::BaseNode::demand.

## ◆ SetDemandPerNode()

void AsymmetricScaler::SetDemandPerNode | ( | uint |  | ) |
| inline

Nothing to do here.

Parameters

  unused. |

Definition at line 100 of file demands.cpp.

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

- src/linkgraph/demands.cpp