Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Sep 5, 2023
1 parent ccf2183 commit 2b0185e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/docs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#print(pm.model)

@test JuMP.num_nonlinear_constraints(pm.model) == 0
@test JuMP.num_constraints(pm.model, JuMP.NonlinearExpr{JuMP.VariableRef}, JuMP.MOI.EqualTo{Float64}) == 12
@test JuMP.num_constraints(pm.model, JuMP.NonlinearExpr, JuMP.MOI.EqualTo{Float64}) == 12
@test JuMP.num_variables(pm.model) == 28

result = optimize_model!(pm, optimizer=JuMP.optimizer_with_attributes(Ipopt.Optimizer, "print_level"=>0))
Expand Down
2 changes: 1 addition & 1 deletion test/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
pm = instantiate_model("../test/data/matpower/case5.m", ACPPowerModel, PowerModels.build_opf, jump_model=m)

@test JuMP.num_nonlinear_constraints(pm.model) == 0
@test JuMP.num_constraints(pm.model, JuMP.NonlinearExpr{JuMP.VariableRef}, JuMP.MOI.EqualTo{Float64}) == 28
@test JuMP.num_constraints(pm.model, JuMP.NonlinearExpr, JuMP.MOI.EqualTo{Float64}) == 28
@test JuMP.num_variables(pm.model) == 49

@test pm.model[:my_var] == x
Expand Down
2 changes: 1 addition & 1 deletion test/opf-obj.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ end

@testset "jump model objective type" begin
pm = instantiate_model(data, ACPPowerModel, build_opf)
@test JuMP.objective_function(pm.model) isa JuMP.NonlinearExpr{JuMP.VariableRef}
@test JuMP.objective_function(pm.model) isa JuMP.NonlinearExpr
end

@testset "opf objective" begin
Expand Down

0 comments on commit 2b0185e

Please sign in to comment.