@@ -225,7 +225,7 @@ MPB.setinfocallback!(m::GLPKMathProgModel, f::Union{Function,Nothing}) = (m.info
225
225
_check_tree (d:: GLPKCallbackData , funcname:: AbstractString ) =
226
226
(d. tree != C_NULL && d. reason != - 1 ) || error (" $funcname can only be called from within a callback" )
227
227
228
- cbgetstate (d:: GLPKCallbackData ) = d. state
228
+ MPB . cbgetstate (d:: GLPKCallbackData ) = d. state
229
229
230
230
function MPB. cbgetlpsolution (d:: GLPKCallbackData , output:: Vector )
231
231
_check_tree (d, " cbgetlpsolution" )
@@ -257,9 +257,9 @@ function MPB.cbgetmipsolution(d::GLPKCallbackData, output::Vector)
257
257
# the LP solution is actually integral.
258
258
# If we add an informational callback for GLPK.IBINGO,
259
259
# then this will need to be modified.
260
- return cbgetlpsolution (d, output)
260
+ return MPB . cbgetlpsolution (d, output)
261
261
end
262
- MPB. cbgetmipsolution (d:: GLPKCallbackData ) = cbgetlpsolution (d)
262
+ MPB. cbgetmipsolution (d:: GLPKCallbackData ) = MPB . cbgetlpsolution (d)
263
263
264
264
function MPB. cbgetbestbound (d:: GLPKCallbackData )
265
265
_check_tree (d, " cbbestbound" )
@@ -300,7 +300,7 @@ function MPB.cbaddlazy!(d::GLPKCallbackData, colidx::Vector, colcoef::Vector, se
300
300
error (" sense must be '=', '<' or '>'" )
301
301
end
302
302
# allocating a new vector is not efficient
303
- solution = cbgetmipsolution (d)
303
+ solution = MPB . cbgetmipsolution (d)
304
304
# if the cut does not exclude the current solution, ignore it
305
305
val = dot (colcoef,solution[colidx])
306
306
if (rowlb - 1e-8 <= val <= rowub + 1e-8 )
@@ -360,17 +360,17 @@ function MPB.cbaddsolution!(d::GLPKCallbackData)
360
360
_initsolution! (d)
361
361
_fillsolution! (d)
362
362
# test feasibility of solution, would be better if GLPK supported this
363
- l = getvarLB (d. model)
364
- u = getvarUB (d. model)
363
+ l = MPB . getvarLB (d. model)
364
+ u = MPB . getvarUB (d. model)
365
365
for i in 1 : length (l)
366
366
if d. sol[i] < l[i] - 1e-6 || d. sol[i] > u[i] + 1e-6
367
367
Compat. @warn (" Ignoring infeasible solution from heuristic callback" )
368
368
return
369
369
end
370
370
end
371
- A = getconstrmatrix (d. model)
372
- lb = getconstrLB (d. model)
373
- ub = getconstrUB (d. model)
371
+ A = MPB . getconstrmatrix (d. model)
372
+ lb = MPB . getconstrLB (d. model)
373
+ ub = MPB . getconstrUB (d. model)
374
374
y = A* d. sol
375
375
for i in 1 : length (lb)
376
376
if y[i] < lb[i] - 1e-6 || y[i] > ub[i] + 1e-6
0 commit comments