Skip to content

Commit

Permalink
add test for jump direct model, closes lanl-ansi#275 (lanl-ansi#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoffrin authored Aug 13, 2023
1 parent 46ec8cd commit a7c6017
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
@test pm.model[:my_var] == x
@test m[:my_var] == x
end

@testset "run with user provided JuMP model in direct mode" begin
m = JuMP.direct_model(HiGHS.Optimizer())
JuMP.set_optimizer_attribute(m, "output_flag", false)
result = run_dc_opf("../test/data/matpower/case5.m", milp_solver, jump_model=m)

@test result["termination_status"] == OPTIMAL
@test isapprox(result["objective"], 17613; atol = 1e0)
end
end


Expand Down

0 comments on commit a7c6017

Please sign in to comment.