Skip to content

Commit e7916b1

Browse files
committed
Fix format
1 parent 29f1946 commit e7916b1

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

src/Bridges/Constraint/bridges/IntervalToHyperRectangleBridge.jl

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ function MOI.supports_constraint(
5656
return MOI.Utilities.is_coefficient_type(F, T)
5757
end
5858

59-
function MOI.Bridges.added_constrained_variable_types(::Type{<:IntervalToHyperRectangleBridge})
59+
function MOI.Bridges.added_constrained_variable_types(
60+
::Type{<:IntervalToHyperRectangleBridge},
61+
)
6062
return Tuple{Type}[]
6163
end
6264

@@ -89,7 +91,10 @@ function MOI.get(
8991
return [bridge.vector_constraint]
9092
end
9193

92-
function MOI.delete(model::MOI.ModelLike, bridge::IntervalToHyperRectangleBridge)
94+
function MOI.delete(
95+
model::MOI.ModelLike,
96+
bridge::IntervalToHyperRectangleBridge,
97+
)
9398
MOI.delete(model, bridge.vector_constraint)
9499
return
95100
end
@@ -99,7 +104,11 @@ function MOI.supports(
99104
attr::Union{MOI.ConstraintPrimalStart,MOI.ConstraintDualStart},
100105
::Type{IntervalToHyperRectangleBridge{T,F,G}},
101106
) where {T,F,G}
102-
return MOI.supports(model, attr, MOI.ConstraintIndex{F,MOI.HyperRectangle{T}})
107+
return MOI.supports(
108+
model,
109+
attr,
110+
MOI.ConstraintIndex{F,MOI.HyperRectangle{T}},
111+
)
103112
end
104113

105114
function MOI.get(
@@ -120,12 +129,7 @@ function MOI.set(
120129
bridge::IntervalToHyperRectangleBridge,
121130
value,
122131
)
123-
MOI.set(
124-
model,
125-
attr,
126-
bridge.vector_constraint,
127-
[value],
128-
)
132+
MOI.set(model, attr, bridge.vector_constraint, [value])
129133
return
130134
end
131135

@@ -199,9 +203,14 @@ function MOI.get(
199203
attr::MOI.ConstraintFunction,
200204
bridge::IntervalToHyperRectangleBridge{T,F,G},
201205
) where {T,F,G}
202-
return convert(G, only(MOI.Utilities.scalarize(
203-
MOI.get(model, attr, bridge.vector_constraint),
204-
)))
206+
return convert(
207+
G,
208+
only(
209+
MOI.Utilities.scalarize(
210+
MOI.get(model, attr, bridge.vector_constraint),
211+
),
212+
),
213+
)
205214
end
206215

207216
function MOI.get(

test/Bridges/Constraint/IntervalToHyperRectangleBridge.jl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ function test_linear_integration(T)
8080
return
8181
end
8282

83-
8483
function test_runtests(T)
8584
MOI.Bridges.runtests(
8685
MOI.Bridges.Constraint.IntervalToHyperRectangleBridge,
@@ -90,7 +89,11 @@ function test_runtests(T)
9089
end,
9190
model -> begin
9291
x = MOI.add_variable(model)
93-
MOI.add_constraint(model, MOI.VectorOfVariables([x]), MOI.HyperRectangle(T[3], T[5]))
92+
MOI.add_constraint(
93+
model,
94+
MOI.VectorOfVariables([x]),
95+
MOI.HyperRectangle(T[3], T[5]),
96+
)
9497
end,
9598
eltype = T,
9699
)
@@ -102,7 +105,11 @@ function test_runtests(T)
102105
end,
103106
model -> begin
104107
x = MOI.add_variable(model)
105-
MOI.add_constraint(model, MOI.Utilities.vectorize([T(2) * x]), MOI.HyperRectangle(T[3], T[5]))
108+
MOI.add_constraint(
109+
model,
110+
MOI.Utilities.vectorize([T(2) * x]),
111+
MOI.HyperRectangle(T[3], T[5]),
112+
)
106113
end,
107114
eltype = T,
108115
)

0 commit comments

Comments
 (0)