OpenTTD Source 20250312-master-gcdcc6b491d
|
Declaration of link graph types used for cargo distribution. More...
#include "../core/pool_type.hpp"
Go to the source code of this file.
Typedefs | |
using | LinkGraphID = PoolID< uint16_t, struct LinkGraphIDTag, 0xFFFF, 0xFFFF > |
using | LinkGraphJobID = PoolID< uint16_t, struct LinkGraphJobIDTag, 0xFFFF, 0xFFFF > |
typedef uint16_t | NodeID |
Enumerations | |
enum | DistributionType : uint8_t { DT_BEGIN = 0 , DT_MIN = 0 , DT_MANUAL = 0 , DT_ASYMMETRIC = 1 , DT_MAX_NONSYMMETRIC = 1 , DT_SYMMETRIC = 2 , DT_MAX = 2 , DT_NUM = 3 , DT_END = 3 } |
enum | EdgeUpdateMode : uint8_t { EUM_INCREASE = 1 , EUM_REFRESH = 1 << 1 , EUM_RESTRICTED = 1 << 2 , EUM_UNRESTRICTED = 1 << 3 } |
Special modes for updating links. More... | |
Variables | |
static const NodeID | INVALID_NODE = UINT16_MAX |
Declaration of link graph types used for cargo distribution.
Definition in file linkgraph_type.h.
using LinkGraphID = PoolID<uint16_t, struct LinkGraphIDTag, 0xFFFF, 0xFFFF> |
Definition at line 15 of file linkgraph_type.h.
using LinkGraphJobID = PoolID<uint16_t, struct LinkGraphJobIDTag, 0xFFFF, 0xFFFF> |
Definition at line 16 of file linkgraph_type.h.
typedef uint16_t NodeID |
Definition at line 18 of file linkgraph_type.h.
enum DistributionType : uint8_t |
Definition at line 21 of file linkgraph_type.h.
enum EdgeUpdateMode : uint8_t |
Special modes for updating links.
'Restricted' means that vehicles with 'no loading' orders are serving the link. If a link is only served by such vehicles it's 'fully restricted'. This means the link can be used by cargo arriving in such vehicles, but not by cargo generated or transferring at the source station of the link. In order to find out about this condition we keep two update timestamps in each link, one for the restricted and one for the unrestricted part of it. If either one times out while the other is still valid the link becomes fully restricted or fully unrestricted, respectively. Refreshing a link makes just sure a minimum capacity is kept. Increasing actually adds the given capacity.
Enumerator | |
---|---|
EUM_INCREASE | Increase capacity. |
EUM_REFRESH | Refresh capacity. |
EUM_RESTRICTED | Use restricted link. |
EUM_UNRESTRICTED | Use unrestricted link. |
Definition at line 46 of file linkgraph_type.h.
|
static |
Definition at line 19 of file linkgraph_type.h.