mirror of
https://github.com/ANL-CEEESA/MIPLearn.jl.git
synced 2025-12-08 17:28:51 -06:00
Implement FileInstance
This commit is contained in:
25
test/solvers/jump_test.jl
Normal file
25
test/solvers/jump_test.jl
Normal file
@@ -0,0 +1,25 @@
|
||||
# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization
|
||||
# Copyright (C) 2020-2021, UChicago Argonne, LLC. All rights reserved.
|
||||
# Released under the modified BSD license. See COPYING.md for more details.
|
||||
|
||||
using Test
|
||||
using MIPLearn
|
||||
using Gurobi
|
||||
using PyCall
|
||||
using JuMP
|
||||
|
||||
miplearn_tests = pyimport("miplearn.solvers.tests")
|
||||
traceback = pyimport("traceback")
|
||||
|
||||
@testset "JuMPSolver" begin
|
||||
solver = JuMPSolver(Gurobi.Optimizer)
|
||||
try
|
||||
miplearn_tests.run_internal_solver_tests(solver)
|
||||
catch e
|
||||
if isa(e, PyCall.PyError)
|
||||
printstyled("Uncaught Python exception:\n", bold=true, color=:red)
|
||||
traceback.print_exception(e.T, e.val, e.traceback)
|
||||
end
|
||||
rethrow()
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user