@@ -82,9 +82,9 @@ julia> solve(ShortestPathProblem(conns));
8282
8383julia> result.path
84843-element Vector{Connection}:
85- Connection(1, 3, 2, "x13" )
86- Connection(3, 6, 1, "x36" )
87- Connection(6, 7, 5, "x67" )
85+ Connection(1, 3, 2)
86+ Connection(3, 6, 1)
87+ Connection(6, 7, 5)
8888
8989julia> result.cost
90908.0
@@ -94,7 +94,7 @@ function solve(problem::ShortestPathProblem)
9494
9595 cns = problem. connections
9696
97- function leftexpressions (node:: Int64 , nodes:: Vector{Connection} , model)
97+ function inflow (node:: Int64 , nodes:: Vector{Connection} , model)
9898 lst = []
9999 for conn in nodes
100100 if conn. to == node
@@ -111,7 +111,7 @@ function solve(problem::ShortestPathProblem)
111111 return expr
112112 end
113113
114- function rightexpressions (node:: Int64 , nodes:: Vector{Connection} , model)
114+ function outflow (node:: Int64 , nodes:: Vector{Connection} , model)
115115 lst = []
116116 for conn in nodes
117117 if conn. from == node
@@ -150,8 +150,8 @@ function solve(problem::ShortestPathProblem)
150150
151151 # Constraints
152152 for nextnode in mynodes
153- leftexpr = leftexpressions (nextnode, cns, model)
154- rightexpr = rightexpressions (nextnode, cns, model)
153+ leftexpr = inflow (nextnode, cns, model)
154+ rightexpr = outflow (nextnode, cns, model)
155155 if nextnode in [startnode, finishnode]
156156 @constraint (model, leftexpr + rightexpr == 1 )
157157 else
0 commit comments