mirror of
https://github.com/ANL-CEEESA/MIPLearn.jl.git
synced 2025-12-12 03:08:51 -06:00
Make python classes available in Julia
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
global SetCoverData = PyNULL()
|
||||
global SetCoverGenerator = PyNULL()
|
||||
|
||||
using JuMP
|
||||
using HiGHS
|
||||
|
||||
global SetCoverData = PyNULL()
|
||||
global SetCoverGenerator = PyNULL()
|
||||
|
||||
function __init_problems_setcover__()
|
||||
copy!(SetCoverData, pyimport("miplearn.problems.setcover").SetCoverData)
|
||||
copy!(SetCoverGenerator, pyimport("miplearn.problems.setcover").SetCoverGenerator)
|
||||
end
|
||||
|
||||
function build_setcover_model(data; optimizer = HiGHS.Optimizer)
|
||||
function build_setcover_model(data::Any; optimizer = HiGHS.Optimizer)
|
||||
if data isa String
|
||||
data = read_pkl_gz(data)
|
||||
end
|
||||
model = Model(optimizer)
|
||||
set_silent(model)
|
||||
n_elements, n_sets = size(data.incidence_matrix)
|
||||
|
||||
Reference in New Issue
Block a user