diff --git a/test/runtests.jl b/test/runtests.jl index 1546c2f..a2c2024 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -24,7 +24,17 @@ using Test ipopt_solver = JuMP.optimizer_with_attributes(Ipopt.Optimizer, "tol" => 1e-6, "print_level" => 0) scs_solver = JuMP.optimizer_with_attributes(SCS.Optimizer, "verbose" => 0) -cbc = JuMP.optimizer_with_attributes(Cbc.Optimizer, "logLevel" => 0, "threads"=>Threads.nthreads()) + +# Cbc cannot be used on Windows with multiple threads: +# The `threads` argument is already disabled on Windows since Cbc v1.0.0: +# We cannot use Cbc v1.0.0 at the moment because it requires MathOptInterface v1 and we require MathOptInterface v0.10.9. +# Removal of MathOptInterface from FlexPlan.jl dependencies is to be done: +if Sys.iswindows() + cbc = JuMP.optimizer_with_attributes(Cbc.Optimizer, "logLevel" => 0) +else + cbc = JuMP.optimizer_with_attributes(Cbc.Optimizer, "logLevel" => 0, "threads"=>Threads.nthreads()) +end + juniper = JuMP.optimizer_with_attributes(Juniper.Optimizer, "nl_solver" => ipopt_solver, "mip_solver" => cbc, "time_limit" => 7200) @testset "FlexPlan" begin