Skip to content

Commit 85a7f78

Browse files
committed
(#2) Add documentation about to heuristics used in determining the start and finish nodes in maximum flow and minimum cost flow
1 parent 9e5b3d9 commit 85a7f78

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/maximumflow.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ julia> result.path
9999
julia> result.flow
100100
7.0
101101
```
102+
103+
!!! info "Determining start and finish nodes"
104+
105+
In this function it's assumed that the problem has a unique start and finish node.
106+
A heuristic approach is used to find the start and finish nodes. If a node has only
107+
outcoming connections, it is considered the start node. If a node has only incoming connections,
108+
it is considered the finish node. Of course a network can have multiple start and finish nodes,
109+
but this heuristic simplifies the problem. Future implementations could explore more complex
110+
scenarios with multiple start and finish nodes.
102111
"""
103112
function solve(problem::MaximumFlowProblem)::MaximumFlowResult
104113

src/minimumcostflow.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,15 @@ then using the flow value to solve the Minimum Cost Flow problem.
133133
134134
- `problem::MinimumCostFlowProblem`: The problem in type of MinimumCostFlowProblem
135135
136+
137+
!!! info "Determining start and finish nodes"
138+
139+
In this function it's assumed that the problem has a unique start and finish node.
140+
A heuristic approach is used to find the start and finish nodes. If a node has only
141+
outcoming connections, it is considered the start node. If a node has only incoming connections,
142+
it is considered the finish node. Of course a network can have multiple start and finish nodes,
143+
but this heuristic simplifies the problem. Future implementations could explore more complex
144+
scenarios with multiple start and finish nodes.
136145
"""
137146
function solve(problem::MinimumCostFlowProblem)::MinimumCostFlowResult
138147

0 commit comments

Comments
 (0)