Skip to content

Commit

Permalink
add test for jump direct model, closes #275
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoffrin committed Aug 13, 2023
1 parent 46ec8cd commit 26cc8e9
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 26cc8e9

Please sign in to comment.