Skip to content

Commit 2abc9b3

Browse files
blegatjoehuchette
authored andcommitted
Export Benders #47 (#49)
1 parent 616588a commit 2abc9b3

File tree

5 files changed

+5
-11
lines changed

5 files changed

+5
-11
lines changed

src/Benders_pmap.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
2020
call with: julia -p <num_threads> <myscript>
2121
================================================================#
22-
@everywhere using JuMP
23-
24-
@everywhere begin
22+
using JuMP
2523

2624
# this function loads and solves a conic problem and returns its dual
2725
function loadAndSolveConicProblem(c, A, b, K, C, solver)
@@ -43,8 +41,6 @@ function loadAndSolveConicProblem(c, A, b, K, C, solver)
4341
return status, MathProgBase.getdual(model)
4442
end
4543

46-
end
47-
4844
function loadMasterProblem(c, A, b, K, C, v, num_scen, solver)
4945
num_var = length(c)
5046
# load master problem

src/StructJuMP.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import ReverseDiffSparse
1111
# import MPI
1212

1313
export StructuredModel, getStructure, getparent, getchildren, getProcIdxSet,
14-
num_scenarios, @second_stage, getprobability, getMyRank
14+
num_scenarios, @second_stage, getprobability, getMyRank,
15+
BendersBridge, DLP, loadAndSolveConicProblem
1516
# Macro to exportall
1617
macro exportall(pkg)
1718
Expr(:export, names(JuMP)...)
@@ -189,4 +190,6 @@ end
189190

190191
include("nlp.jl")
191192

193+
include("BendersBridge.jl")
194+
192195
end

test/benderstest.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ using ECOS
44
using Cbc
55
using Base.Test
66

7-
include("../src/BendersBridge.jl")
8-
97
misocp_solver = CbcSolver()
108
socp_solver = ECOS.ECOSSolver(verbose=false)
119

test/farmer.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ using Base.Test
22

33
using Clp
44

5-
include("../src/BendersBridge.jl")
6-
75
@testset "farmer" begin
86
include("../examples/farmer.jl")
97
status, objval, soln = DLP(m, ClpSolver())

test/runtests.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ include("benderstest.jl")
55
include("farmer.jl")
66

77
include("examples_smoketest.jl")
8-

0 commit comments

Comments
 (0)