|
|
@ -2,12 +2,21 @@
|
|
|
|
# Copyright (C) 2020-2021, UChicago Argonne, LLC. All rights reserved.
|
|
|
|
# Copyright (C) 2020-2021, UChicago Argonne, LLC. All rights reserved.
|
|
|
|
# Released under the modified BSD license. See COPYING.md for more details.
|
|
|
|
# Released under the modified BSD license. See COPYING.md for more details.
|
|
|
|
|
|
|
|
|
|
|
|
__precompile__(false)
|
|
|
|
|
|
|
|
module MIPLearn
|
|
|
|
module MIPLearn
|
|
|
|
|
|
|
|
|
|
|
|
using PyCall
|
|
|
|
using PyCall
|
|
|
|
global miplearn = pyimport("miplearn")
|
|
|
|
|
|
|
|
global traceback = pyimport("traceback")
|
|
|
|
global DynamicLazyConstraintsComponent = PyNULL()
|
|
|
|
|
|
|
|
global JuMPSolver = PyNULL()
|
|
|
|
|
|
|
|
global MinPrecisionThreshold = PyNULL()
|
|
|
|
|
|
|
|
global miplearn = PyNULL()
|
|
|
|
|
|
|
|
global ObjectiveValueComponent = PyNULL()
|
|
|
|
|
|
|
|
global PrimalSolutionComponent = PyNULL()
|
|
|
|
|
|
|
|
global PyFileInstance = PyNULL()
|
|
|
|
|
|
|
|
global PyJuMPInstance = PyNULL()
|
|
|
|
|
|
|
|
global StaticLazyConstraintsComponent = PyNULL()
|
|
|
|
|
|
|
|
global traceback = PyNULL()
|
|
|
|
|
|
|
|
global UserCutsComponent = PyNULL()
|
|
|
|
|
|
|
|
|
|
|
|
include("utils/log.jl")
|
|
|
|
include("utils/log.jl")
|
|
|
|
include("utils/exceptions.jl")
|
|
|
|
include("utils/exceptions.jl")
|
|
|
@ -19,12 +28,19 @@ include("solvers/learning.jl")
|
|
|
|
include("solvers/macros.jl")
|
|
|
|
include("solvers/macros.jl")
|
|
|
|
include("utils/benchmark.jl")
|
|
|
|
include("utils/benchmark.jl")
|
|
|
|
|
|
|
|
|
|
|
|
DynamicLazyConstraintsComponent = miplearn.DynamicLazyConstraintsComponent
|
|
|
|
function __init__()
|
|
|
|
UserCutsComponent = miplearn.UserCutsComponent
|
|
|
|
copy!(miplearn, pyimport("miplearn"))
|
|
|
|
ObjectiveValueComponent = miplearn.ObjectiveValueComponent
|
|
|
|
copy!(traceback, pyimport("traceback"))
|
|
|
|
PrimalSolutionComponent = miplearn.PrimalSolutionComponent
|
|
|
|
copy!(DynamicLazyConstraintsComponent, miplearn.DynamicLazyConstraintsComponent)
|
|
|
|
StaticLazyConstraintsComponent = miplearn.StaticLazyConstraintsComponent
|
|
|
|
copy!(UserCutsComponent, miplearn.UserCutsComponent)
|
|
|
|
MinPrecisionThreshold = miplearn.MinPrecisionThreshold
|
|
|
|
copy!(ObjectiveValueComponent, miplearn.ObjectiveValueComponent)
|
|
|
|
|
|
|
|
copy!(PrimalSolutionComponent, miplearn.PrimalSolutionComponent)
|
|
|
|
|
|
|
|
copy!(StaticLazyConstraintsComponent, miplearn.StaticLazyConstraintsComponent)
|
|
|
|
|
|
|
|
copy!(MinPrecisionThreshold, miplearn.MinPrecisionThreshold)
|
|
|
|
|
|
|
|
__init_PyFileInstance__()
|
|
|
|
|
|
|
|
__init_PyJuMPInstance__()
|
|
|
|
|
|
|
|
__init_JuMPSolver__()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
export DynamicLazyConstraintsComponent,
|
|
|
|
export DynamicLazyConstraintsComponent,
|
|
|
|
UserCutsComponent,
|
|
|
|
UserCutsComponent,
|
|
|
|