Skip to content

Commit

Permalink
TEST: add feasibility pump (mip_solver)
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudocubic committed Sep 25, 2024
1 parent 0843a2a commit 3b37799
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions test/rdt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
data = parse_file(small_data)
result = solve_rdt(data, ACPUPowerModel, juniper_solver)
@test result["termination_status"] == LOCALLY_SOLVED || result["termination_status"] == ALMOST_LOCALLY_SOLVED
@test isapprox(result["objective"], 167, atol=1e-1)
@test isapprox(result["objective"], 163, atol=1e-1)
end

@testset "Small Test - Cost Adjust 1" begin
Expand All @@ -13,7 +13,7 @@ end
data["nw"]["0"]["gen_ne"]["2"]["construction_cost"] = 10.0
result = solve_rdt(data, ACPUPowerModel, juniper_solver)
@test result["termination_status"] == LOCALLY_SOLVED || result["termination_status"] == ALMOST_LOCALLY_SOLVED
@test isapprox(result["objective"], 313, atol=1e-1)
@test isapprox(result["objective"], 163, atol=1e-1)
end

@testset "Small Test - Cost Adjust 2" begin
Expand All @@ -22,5 +22,5 @@ end
data["nw"]["0"]["branch_ne"]["4"]["construction_cost"] = 7.0
result = solve_rdt(data, ACPUPowerModel, juniper_solver)
@test result["termination_status"] == LOCALLY_SOLVED || result["termination_status"] == ALMOST_LOCALLY_SOLVED
@test isapprox(result["objective"], 167, atol=1e-1)
@test isapprox(result["objective"], 163, atol=1e-1)
end
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ _PMD.silence!()
_ONM.silence!()

ipopt_solver = JuMP.optimizer_with_attributes(Ipopt.Optimizer, "print_level" => 0, "sb" => "yes", "max_iter" => 1000, "acceptable_tol" => 1.0e-2)
juniper_solver = JuMP.optimizer_with_attributes(Juniper.Optimizer, "nl_solver" => ipopt_solver, "log_levels" => [],)
highs_solver = JuMP.optimizer_with_attributes(HiGHS.Optimizer)
highs_solver = JuMP.optimizer_with_attributes(HiGHS.Optimizer, "small_matrix_value" => 1e-12, "output_flag"=>false)
juniper_solver = JuMP.optimizer_with_attributes(Juniper.Optimizer, "nl_solver" => ipopt_solver, "mip_solver" => highs_solver, "log_levels" => [],)
scip_solver = JuMP.optimizer_with_attributes(SCIP.Optimizer)

example_data = "../test/data/example.json"
Expand Down

0 comments on commit 3b37799

Please sign in to comment.