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.
35 lines
829 B
35 lines
829 B
# 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 Cbc
|
|
using JuMP
|
|
using MIPLearn
|
|
using PyCall
|
|
using Test
|
|
|
|
if is_gurobi_available
|
|
using Gurobi
|
|
end
|
|
|
|
miplearn_tests = pyimport("miplearn.solvers.tests")
|
|
traceback = pyimport("traceback")
|
|
|
|
function _test_solver(optimizer_factory)
|
|
MIPLearn.@python_call miplearn_tests.run_internal_solver_tests(
|
|
JuMPSolver(optimizer_factory),
|
|
)
|
|
end
|
|
|
|
@testset "JuMPSolver" begin
|
|
@testset "Cbc" begin
|
|
_test_solver(Cbc.Optimizer)
|
|
end
|
|
if is_gurobi_available
|
|
using Gurobi
|
|
@testset "Gurobi" begin
|
|
_test_solver(Gurobi.Optimizer)
|
|
end
|
|
end
|
|
end
|