diff --git a/src/MOI_wrapper/MOI_nonlinear.jl b/src/MOI_wrapper/MOI_nonlinear.jl index 1e115b0..dbc861b 100644 --- a/src/MOI_wrapper/MOI_nonlinear.jl +++ b/src/MOI_wrapper/MOI_nonlinear.jl @@ -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 diff --git a/test/MOI/MOI_wrapper.jl b/test/MOI/MOI_wrapper.jl index 6cdc7cc..a95241b 100644 --- a/test/MOI/MOI_wrapper.jl +++ b/test/MOI/MOI_wrapper.jl @@ -1212,7 +1212,6 @@ function test_nonlinear_constraint_vector_delete() end function test_nonlinear_pow2() - if !Gurobi._supports_nonlinear() return end @@ -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 @@ -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()