Skip to content

Commit

Permalink
Run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbowly committed Oct 29, 2024
1 parent 89d8e38 commit 490ce31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 7 additions & 1 deletion src/MOI_wrapper/MOI_nonlinear.jl
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,13 @@ function _process_nonlinear(
elseif typeof(s) == Float64
_add_expression_tree_constant(opcode, data, parent, s, parent_index)
elseif typeof(s) == Int64
_add_expression_tree_constant(opcode, data, parent, convert(Float64, s), parent_index)
_add_expression_tree_constant(
opcode,
data,
parent,
convert(Float64, s),
parent_index,
)
else
throw(MOI.UnsupportedAttribute(s))
end
Expand Down
4 changes: 0 additions & 4 deletions test/MOI/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,6 @@ function test_nonlinear_constraint_vector_delete()
end

function test_nonlinear_pow2()

if !Gurobi._supports_nonlinear()
return
end
Expand All @@ -1237,11 +1236,9 @@ function test_nonlinear_pow2()
c = MOI.add_constraint(model, g, MOI.LessThan(1.0))
MOI.optimize!(model)
@test (MOI.get(model, MOI.ObjectiveValue()), 2 / sqrt(2); atol = 1e-3)

end

function test_nonlinear_scalarquadraticfunction()

if !Gurobi._supports_nonlinear()
return
end
Expand All @@ -1266,7 +1263,6 @@ function test_nonlinear_scalarquadraticfunction()
c = MOI.add_constraint(model, g, MOI.LessThan(1.0))
MOI.optimize!(model)
@test (MOI.get(model, MOI.ObjectiveValue()), 2 / sqrt(2); atol = 1e-3)

end

function test_ModelName_too_long()
Expand Down

0 comments on commit 490ce31

Please sign in to comment.