12 #include "../stdafx.h" 15 #include "../safeguards.h" 23 for (NodeID node_id = 0; node_id < job.
Size(); ++node_id) {
24 Node prev_node = job[node_id];
25 StationID prev = prev_node.
Station();
26 PathList &paths = prev_node.Paths();
27 for (PathList::iterator i = paths.begin(); i != paths.end(); ++i) {
33 StationID origin = job[path->
GetOrigin()].Station();
34 assert(prev != via && via != origin);
36 node.Flows().AddFlow(origin, via, flow);
40 prev_node.Flows().PassOnFlow(origin, via, flow);
43 prev_node.Flows().AddFlow(origin, via, flow);
48 for (NodeID node_id = 0; node_id < job.
Size(); ++node_id) {
50 Node node = job[node_id];
58 for (FlowStatMap::iterator i = flows.begin(); i != flows.end(); ++i) {
59 i->second.ScaleToMonthly(runtime);
63 PathList &paths = node.Paths();
64 for (PathList::iterator i = paths.begin(); i != paths.end(); ++i) {
const bool scale
Whether the flow mapper should scale all flows to monthly values.
void FinalizeLocalConsumption(StationID self)
Subtract invalid flows from locally consumed flow.
Date LastCompression() const
Get the date when the underlying link graph was last compressed.
StationID Station() const
Get ID of station belonging to wrapped node.
virtual void Run(LinkGraphJob &job) const
Map the paths generated by the MCF solver into flows associated with nodes.
NodeID GetOrigin() const
Get the overall origin of the path.
const LinkGraphSettings & Settings() const
Get the link graph settings for this component.
Declaration of flow mapper; maps paths into flows at nodes.
uint GetFlow() const
Get the flow on this leg.
NodeID GetNode() const
Get the node this leg passes.
A leg of a path in the link graph.
Date JoinDate() const
Get the date when the job should be finished.
uint Size() const
Get the size of the underlying link graph.
Flow descriptions by origin stations.
uint16 recalc_time
time (in days) for recalculating each link graph component.
Class for calculation jobs to be run on link graphs.