mirror of
https://github.com/ANL-CEEESA/MIPLearn.jl.git
synced 2025-12-10 10:18:51 -06:00
Add gmi_dual
This commit is contained in:
22
test/src/Cuts/tableau/test_gmi_dual.jl
Normal file
22
test/src/Cuts/tableau/test_gmi_dual.jl
Normal file
@@ -0,0 +1,22 @@
|
||||
# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization
|
||||
# Copyright (C) 2020-2024, UChicago Argonne, LLC. All rights reserved.
|
||||
# Released under the modified BSD license. See COPYING.md for more details.
|
||||
|
||||
using HiGHS
|
||||
|
||||
function test_cuts_tableau_gmi_dual()
|
||||
mps_filename = "$BASEDIR/../fixtures/bell5.mps.gz"
|
||||
h5_filename = "$BASEDIR/../fixtures/bell5.h5"
|
||||
stats = collect_gmi_dual(mps_filename, optimizer = HiGHS.Optimizer)
|
||||
h5 = H5File(h5_filename, "r")
|
||||
try
|
||||
cuts_basis_vars = h5.get_array("cuts_basis_vars")
|
||||
cuts_basis_sizes = h5.get_array("cuts_basis_sizes")
|
||||
cuts_rows = h5.get_array("cuts_rows")
|
||||
@test size(cuts_basis_vars) == (15, 402)
|
||||
@test size(cuts_basis_sizes) == (15,4)
|
||||
@test size(cuts_rows) == (15,)
|
||||
finally
|
||||
h5.close()
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user