1
- using GLPKMathProgInterface : GLPKSolverLP
1
+ using Clp : ClpSolver
2
2
3
3
@testset " Minimum-cost flow" begin
4
4
@@ -24,7 +24,7 @@ using GLPKMathProgInterface: GLPKSolverLP
24
24
demand[4 ,6 ] = 1
25
25
capacity = ones (6 ,6 )
26
26
27
- flow = mincost_flow (g, capacity, demand, w, GLPKSolverLP (), 5 , 6 )
27
+ flow = mincost_flow (g, capacity, demand, w, ClpSolver (), 5 , 6 )
28
28
@test flow[5 ,1 ] == 1
29
29
@test flow[5 ,2 ] == 1
30
30
@test flow[3 ,6 ] == 1
@@ -42,7 +42,7 @@ using GLPKMathProgInterface: GLPKSolverLP
42
42
43
43
# no demand => null flow
44
44
d2 = spzeros (6 ,6 )
45
- flow = mincost_flow (g, capacity, d2, w, GLPKSolverLP (), 5 , 6 )
45
+ flow = mincost_flow (g, capacity, d2, w, ClpSolver (), 5 , 6 )
46
46
for idx in 1 : 6
47
47
for jdx in 1 : 6
48
48
@test flow[idx,jdx] ≈ 0.0
@@ -62,7 +62,7 @@ using GLPKMathProgInterface: GLPKSolverLP
62
62
demand = spzeros (6 ,6 )
63
63
demand[1 ,2 ] = 1
64
64
costs = ones (6 ,6 )
65
- flow = mincost_flow (g, capacity, demand, costs, GLPKSolverLP ())
65
+ flow = mincost_flow (g, capacity, demand, costs, ClpSolver ())
66
66
active_flows = [(1 ,2 ), (2 ,5 ), (5 ,6 ),(6 ,1 )]
67
67
for s in 1 : 6
68
68
for t in 1 : 6
@@ -79,7 +79,7 @@ using GLPKMathProgInterface: GLPKSolverLP
79
79
end
80
80
# higher short-circuit cost
81
81
costs[2 ,5 ] = 10.
82
- flow = mincost_flow (g, capacity, demand, costs, GLPKSolverLP ())
82
+ flow = mincost_flow (g, capacity, demand, costs, ClpSolver ())
83
83
active_flows = [(1 ,2 ),(2 ,3 ),(3 ,4 ),(4 ,5 ),(5 ,6 ),(6 ,1 )]
84
84
for s in 1 : 6
85
85
for t in 1 : 6
0 commit comments