@@ -4,9 +4,8 @@ import GLPK
44import MathProgBase
55const MPB = MathProgBase
66using .. GLPKInterfaceBase
7- using Compat
8- using Compat. SparseArrays
9- using Compat. LinearAlgebra
7+ using SparseArrays
8+ using LinearAlgebra
109
1110export GLPKSolverMIP, GLPKCallbackData
1211
@@ -41,14 +40,14 @@ function Base.copy(m::GLPKMathProgModelMIP)
4140 m2. param = deepcopy (m. param)
4241 m2. smplxparam = deepcopy (m. smplxparam)
4342
44- m. lazycb == nothing || @Compat . warn " Callbacks can't be copied, lazy callback ignored"
45- m. cutcb == nothing || @Compat . warn " Callbacks can't be copied, cut callback ignored"
46- m. heuristiccb == nothing || @Compat . warn " Callbacks can't be copied, heuristic callback ignored"
47- m. infocb == nothing || @Compat . warn " Callbacks can't be copied, info callback ignored"
43+ m. lazycb == nothing || @warn " Callbacks can't be copied, lazy callback ignored"
44+ m. cutcb == nothing || @warn " Callbacks can't be copied, cut callback ignored"
45+ m. heuristiccb == nothing || @warn " Callbacks can't be copied, heuristic callback ignored"
46+ m. infocb == nothing || @warn " Callbacks can't be copied, info callback ignored"
4847
4948 m2. objbound = m. objbound
5049
51- m. cbdata == nothing || @Compat . warn " Callbacks can't be copied, callbackdata ignored"
50+ m. cbdata == nothing || @warn " Callbacks can't be copied, callbackdata ignored"
5251
5352 m2. binaries = deepcopy (m. binaries)
5453 m2. userlimit = m. userlimit
@@ -165,7 +164,7 @@ function MPB.LinearQuadraticModel(s::GLPKSolverMIP)
165164
166165 for (k,v) in s. opts
167166 if k in [:cb_func , :cb_info ]
168- Compat . @warn ( " ignored option: $(string (k)) ; use the MathProgBase callback interface instead" )
167+ @warn " ignored option: $(string (k)) ; use the MathProgBase callback interface instead"
169168 continue
170169 end
171170 i = findfirst (x-> x== k, fieldnames (typeof (lpm. param)))
@@ -177,7 +176,7 @@ function MPB.LinearQuadraticModel(s::GLPKSolverMIP)
177176 t = typeof (lpm. smplxparam). types[s]
178177 setfield! (lpm. smplxparam, s, convert (t, v))
179178 else
180- Compat . @warn ( " Ignored option: $(string (k)) " )
179+ @warn " Ignored option: $(string (k)) "
181180 continue
182181 end
183182 end
@@ -364,7 +363,7 @@ function MPB.cbaddsolution!(d::GLPKCallbackData)
364363 u = MPB. getvarUB (d. model)
365364 for i in 1 : length (l)
366365 if d. sol[i] < l[i] - 1e-6 || d. sol[i] > u[i] + 1e-6
367- Compat . @warn ( " Ignoring infeasible solution from heuristic callback" )
366+ @warn " Ignoring infeasible solution from heuristic callback"
368367 return
369368 end
370369 end
@@ -374,7 +373,7 @@ function MPB.cbaddsolution!(d::GLPKCallbackData)
374373 y = A* d. sol
375374 for i in 1 : length (lb)
376375 if y[i] < lb[i] - 1e-6 || y[i] > ub[i] + 1e-6
377- Compat . @warn ( " Ignoring infeasible solution from heuristic callback" )
376+ @warn " Ignoring infeasible solution from heuristic callback"
378377 return
379378 end
380379 end
0 commit comments