mirror of
https://github.com/ANL-CEEESA/MIPLearn.jl.git
synced 2025-12-06 08:28:52 -06:00
Use HDF5 for instance files
This commit is contained in:
@@ -14,11 +14,15 @@ using Cbc
|
||||
filename = tempname()
|
||||
save(filename, instance)
|
||||
|
||||
h5 = MIPLearn.Hdf5Sample(filename)
|
||||
@test h5.get_scalar("miplearn_version") == "0002"
|
||||
@test length(h5.get_bytes("mps")) > 0
|
||||
@test length(h5.get_scalar("jump_ext")) > 0
|
||||
|
||||
file_instance = FileInstance(filename)
|
||||
solver = LearningSolver(Cbc.Optimizer)
|
||||
solve!(solver, file_instance)
|
||||
|
||||
loaded = load_instance(filename)
|
||||
@test length(loaded.samples) == 1
|
||||
@test length(h5.get_vector("mip_var_values")) == 3
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user