Skip to content

Commit 2095d14

Browse files
vitornesellomlubin
authored andcommitted
updates for julia 1.0 (#52)
* updates for julia 1.0 * fixing issues by @mlubin * Formatting fixes
1 parent 3a4ca1b commit 2095d14

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/GLPKInterfaceBase.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function MPB.getvarLB(lpm::GLPKMathProgModel)
108108
lb = Array{Float64}(undef, n)
109109
for c = 1:n
110110
l = GLPK.get_col_lb(lp, c)
111-
if l <= -realmax(Float64)
111+
if l <= -floatmax(Float64)
112112
l = -Inf
113113
end
114114
lb[c] = l
@@ -126,7 +126,7 @@ function MPB.setvarLB!(lpm::GLPKMathProgModel, collb)
126126
GLPK.jl_set_preemptive_check(false)
127127
for c = 1:n
128128
u = GLPK.get_col_ub(lp, c)
129-
if u >= realmax(Float64)
129+
if u >= floatmax(Float64)
130130
u = Inf
131131
end
132132
if nonnull(collb) && collb[c] != -Inf
@@ -157,7 +157,7 @@ function MPB.getvarUB(lpm::GLPKMathProgModel)
157157
ub = Array{Float64}(undef, n)
158158
for c = 1:n
159159
u = GLPK.get_col_ub(lp, c)
160-
if u >= realmax(Float64)
160+
if u >= floatmax(Float64)
161161
u = Inf
162162
end
163163
ub[c] = u
@@ -175,7 +175,7 @@ function MPB.setvarUB!(lpm::GLPKMathProgModel, colub)
175175
GLPK.jl_set_preemptive_check(false)
176176
for c = 1:n
177177
l = GLPK.get_col_lb(lp, c)
178-
if l <= -realmax(Float64)
178+
if l <= -floatmax(Float64)
179179
l = -Inf
180180
end
181181
if nonnull(colub) && colub[c] != Inf
@@ -206,7 +206,7 @@ function MPB.getconstrLB(lpm::GLPKMathProgModel)
206206
lb = Array{Float64}(undef, m)
207207
for r = 1:m
208208
l = GLPK.get_row_lb(lp, r)
209-
if l <= -realmax(Float64)
209+
if l <= -floatmax(Float64)
210210
l = -Inf
211211
end
212212
lb[r] = l
@@ -224,7 +224,7 @@ function MPB.setconstrLB!(lpm::GLPKMathProgModel, rowlb)
224224
GLPK.jl_set_preemptive_check(false)
225225
for r = 1:m
226226
u = GLPK.get_row_ub(lp, r)
227-
if u >= realmax(Float64)
227+
if u >= floatmax(Float64)
228228
u = Inf
229229
end
230230
if nonnull(rowlb) && rowlb[r] != -Inf
@@ -255,7 +255,7 @@ function MPB.getconstrUB(lpm::GLPKMathProgModel)
255255
ub = zeros(m)
256256
for r = 1:m
257257
u = GLPK.get_row_ub(lp, r)
258-
if u >= realmax(Float64)
258+
if u >= floatmax(Float64)
259259
u = Inf
260260
end
261261
ub[r] = u
@@ -273,7 +273,7 @@ function MPB.setconstrUB!(lpm::GLPKMathProgModel, rowub)
273273
GLPK.jl_set_preemptive_check(false)
274274
for r = 1:m
275275
l = GLPK.get_row_lb(lp, r)
276-
if l <= -realmax(Float64)
276+
if l <= -floatmax(Float64)
277277
l = -Inf
278278
end
279279
if nonnull(rowub) && rowub[r] != Inf

src/GLPKInterfaceLP.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ function MPB.getunboundedray(lpm::GLPKMathProgModelLP)
387387
end
388388

389389
if (GLPK.get_obj_dir(lp) == GLPK.MAX) (get_dual(lp, k) > 0)
390-
scale!(ray, -1.0)
390+
ray .*= -1.0
391391
end
392392
else
393393
for i = 1:n

0 commit comments

Comments
 (0)