Skip to content

Commit 13677a1

Browse files
authored
Merge pull request #41 from JuliaOpt/cb/fixdepwarns
Fix deprecation warnings on Julia 0.6
2 parents ae65225 + f4a9604 commit 13677a1

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
julia 0.5
22
GLPK 0.2.8
33
MathProgBase 0.5 0.7
4+
Compat 0.17.0

src/GLPKInterfaceBase.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module GLPKInterfaceBase
22

3+
using Compat
34
import GLPK
45

56
importall MathProgBase.SolverInterface
@@ -28,7 +29,7 @@ export
2829
getrawsolver
2930

3031

31-
abstract GLPKMathProgModel <: AbstractLinearQuadraticModel
32+
@compat abstract type GLPKMathProgModel <: AbstractLinearQuadraticModel end
3233

3334
function loadproblem!(lpm::GLPKMathProgModel, filename::AbstractString)
3435
if endswith(filename, ".mps") || endswith(filename, ".mps.gz")
@@ -393,7 +394,7 @@ function addvar!(lpm::GLPKMathProgModel, rowidx::Vector, rowcoef::Vector, collb:
393394
return
394395
end
395396

396-
function delvars!(lpm::GLPKMathProgModel, idx::Vector)
397+
function delvars!(lpm::GLPKMathProgModel, idx::Vector)
397398
GLPK.std_basis(lpm.inner)
398399
GLPK.del_cols(lpm.inner, length(idx), idx)
399400
end
@@ -423,7 +424,7 @@ function addconstr!(lpm::GLPKMathProgModel, colidx::Vector, colcoef::Vector, row
423424
return
424425
end
425426

426-
function delconstrs!(lpm::GLPKMathProgModel, idx::Vector)
427+
function delconstrs!(lpm::GLPKMathProgModel, idx::Vector)
427428
GLPK.std_basis(lpm.inner)
428429
GLPK.del_rows(lpm.inner, length(idx), idx)
429430
end

src/GLPKInterfaceLP.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module GLPKInterfaceLP
22

3+
using Compat
4+
35
import GLPK
46
importall MathProgBase.SolverInterface
57
importall ..GLPKInterfaceBase
@@ -394,7 +396,7 @@ function getunboundedray(lpm::GLPKMathProgModelLP)
394396
ri > m && (ray[ri - m] = rv)
395397
end
396398

397-
if (GLPK.get_obj_dir(lp) == GLPK.MAX) $ (get_dual(lp, k) > 0)
399+
if (GLPK.get_obj_dir(lp) == GLPK.MAX) (get_dual(lp, k) > 0)
398400
scale!(ray, -1.0)
399401
end
400402
else

0 commit comments

Comments
 (0)