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 authored Jan 23, 2024
1 parent 7627b6a commit 99a071d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ function test_quadratic_modification_from_affine()
x = MOI.add_variable(model)
MOI.add_constraint(model, x, MOI.GreaterThan(2.0))
f = 2.0 * x + 1.0
MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
attr = MOI.ObjectiveFunction{typeof(f)}()
MOI.set(model, attr, f)
MOI.optimize!(model)
Expand All @@ -500,6 +501,7 @@ function test_quadratic_off_diagonal_modification()
x = MOI.add_variables(model, 2)
MOI.add_constraint.(model, x, MOI.GreaterThan.([2.0, 3.0]))
f = 4.0 * x[1] * x[1] + 2.0 * x[1] * x[2] + 2.0 * x[2] * x[2]
MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
attr = MOI.ObjectiveFunction{typeof(f)}()
MOI.set(model, attr, f)
MOI.optimize!(model)
Expand All @@ -524,6 +526,7 @@ function test_quadratic_diagonal_modification()
x = MOI.add_variable(model)
MOI.add_constraint(model, x, MOI.GreaterThan(2.0))
f = 3.0 * x * x + 2.0 * x + 1.0
MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
attr = MOI.ObjectiveFunction{typeof(f)}()
MOI.set(model, attr, f)
MOI.optimize!(model)
Expand Down

0 comments on commit 99a071d

Please sign in to comment.