You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
745 B
24 lines
745 B
# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization
|
|
# Copyright (C) 2020-2023, UChicago Argonne, LLC. All rights reserved.
|
|
# Released under the modified BSD license. See COPYING.md for more details.
|
|
|
|
using HDF5
|
|
using MIPLearn
|
|
|
|
function test_cuts_blackbox_cplex()
|
|
# Prepare filenames
|
|
mps_filename = joinpath(@__DIR__, "../../fixtures/bell5.mps.gz")
|
|
h5_filename = replace(mps_filename, ".mps.gz" => ".h5")
|
|
|
|
# Run collector
|
|
MIPLearn.collect(mps_filename, CplexBlackBoxCuts())
|
|
|
|
# Read HDF5 file
|
|
h5 = Hdf5Sample(h5_filename)
|
|
lhs = h5.get_sparse("cuts_cpx_lhs")
|
|
rhs = h5.get_array("cuts_cpx_rhs")
|
|
h5.file.close()
|
|
@test lhs.shape == (22, 100)
|
|
@test length(rhs) == 22
|
|
end
|