OpenTTD
|
A job edge. More...
#include <linkgraphjob.h>
Public Member Functions | |
Edge (const LinkGraph::BaseEdge &edge, EdgeAnnotation &anno) | |
Constructor. | |
uint | Demand () const |
Get the transport demand between end the points of the edge. | |
uint | UnsatisfiedDemand () const |
Get the transport demand that hasn't been satisfied by flows, yet. | |
uint | Flow () const |
Get the total flow on the edge. | |
void | AddFlow (uint flow) |
Add some flow. | |
void | RemoveFlow (uint flow) |
Remove some flow. | |
void | AddDemand (uint demand) |
Add some (not yet satisfied) demand. | |
void | SatisfyDemand (uint demand) |
Satisfy some demand. | |
![]() | |
EdgeWrapper (Tedge &edge) | |
Wrap a an edge. | |
uint | Capacity () const |
Get edge's capacity. | |
uint | Usage () const |
Get edge's usage. | |
Date | LastUnrestrictedUpdate () const |
Get the date of the last update to the edge's unrestricted capacity. | |
Date | LastRestrictedUpdate () const |
Get the date of the last update to the edge's restricted capacity. | |
Date | LastUpdate () const |
Get the date of the last update to any part of the edge's capacity. |
Private Attributes | |
EdgeAnnotation & | anno |
Annotation being wrapped. |
Additional Inherited Members | |
![]() | |
Tedge & | edge |
Actual edge to be used. |
A job edge.
Wraps a link graph edge and an edge annotation. The annotation can be modified, the edge is constant.
Definition at line 77 of file linkgraphjob.h.
|
inline |
Constructor.
edge | Link graph edge to be wrapped. |
anno | Annotation to be wrapped. |
Definition at line 86 of file linkgraphjob.h.
|
inline |
Add some (not yet satisfied) demand.
demand | Demand to be added. |
Definition at line 127 of file linkgraphjob.h.
References anno, LinkGraphJob::EdgeAnnotation::demand, and LinkGraphJob::EdgeAnnotation::unsatisfied_demand.
|
inline |
Add some flow.
flow | Flow to be added. |
Definition at line 111 of file linkgraphjob.h.
References anno, and LinkGraphJob::EdgeAnnotation::flow.
Referenced by Path::AddFlow().
|
inline |
Get the transport demand between end the points of the edge.
Definition at line 93 of file linkgraphjob.h.
References anno, and LinkGraphJob::EdgeAnnotation::demand.
|
inline |
Get the total flow on the edge.
Definition at line 105 of file linkgraphjob.h.
References anno, and LinkGraphJob::EdgeAnnotation::flow.
Referenced by Path::AddFlow().
|
inline |
Remove some flow.
flow | Flow to be removed. |
Definition at line 117 of file linkgraphjob.h.
References anno, and LinkGraphJob::EdgeAnnotation::flow.
|
inline |
Satisfy some demand.
demand | Demand to be satisfied. |
Definition at line 137 of file linkgraphjob.h.
References anno, and LinkGraphJob::EdgeAnnotation::unsatisfied_demand.
|
inline |
Get the transport demand that hasn't been satisfied by flows, yet.
Definition at line 99 of file linkgraphjob.h.
References anno, and LinkGraphJob::EdgeAnnotation::unsatisfied_demand.