Skip to content

Commit b3e7bff

Browse files
authored
Fix ConstraintDual transformation for SplitHyperRectangleBridge (#2809)
1 parent 9417b6e commit b3e7bff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Bridges/Constraint/bridges/SplitHyperRectangleBridge.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ function MOI.set(
229229
set = bridge.set
230230
new_values = vcat(
231231
T[max(T(0), v) for (v, l) in zip(values, set.lower) if isfinite(l)],
232-
T[min(T(0), v) for (v, u) in zip(values, set.upper) if isfinite(u)],
232+
T[max(T(0), -v) for (v, u) in zip(values, set.upper) if isfinite(u)],
233233
)
234234
MOI.set(model, attr, bridge.ci, new_values)
235235
return
@@ -255,7 +255,7 @@ function MOI.get(
255255
for (i, u) in enumerate(bridge.set.upper)
256256
if isfinite(u)
257257
row += 1
258-
ret[i] += values[row]
258+
ret[i] -= values[row]
259259
end
260260
end
261261
return ret

0 commit comments

Comments
 (0)