Skip to content

Commit e0a8287

Browse files
committed
own_function -> allow_modify_function
1 parent 694928f commit e0a8287

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/Bridges/detbridge.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function subsum(model, t::MOI.ScalarAffineFunction, l::Vector{MOI.VariableIndex}
109109
n = length(l)
110110
f = MOIU.operate!(-, T, t, MOIU.operate(sum, T, l))
111111
return MOIU.add_scalar_constraint(model, f, MOI.LessThan(zero(T)),
112-
own_function=true)
112+
allow_modify_function=true)
113113
end
114114

115115
# Attributes, Bridge acting as an model

src/Bridges/geomeanbridge.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function GeoMeanBridge{T, F, G}(model, f::MOI.AbstractVectorFunction,
7171
tubc = MOIU.add_scalar_constraint(model,
7272
MOIU.operate!(+, T, t, -sN * xl1),
7373
MOI.LessThan(zero(T)),
74-
own_function=true)
74+
allow_modify_function=true)
7575

7676
socrc = Vector{CI{G, MOI.RotatedSecondOrderCone}}(undef, N-1)
7777
offset = offsetnext = 0

src/Bridges/squarepsdbridge.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function SquarePSDBridge{T, F, G}(model::MOI.ModelLike, f::F,
9696
if !MOIU.isapprox_zero(diff, 1e-10)
9797
push!(sym, (i, j) => MOIU.add_scalar_constraint(model, diff,
9898
MOI.EqualTo(zero(T)),
99-
own_function=true))
99+
allow_modify_function=true))
100100
end
101101
end
102102
k += dim - j

src/Utilities/constraints.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
add_scalar_constraint(model::MOI.ModelLike,
33
func::MOI.AbstractScalarFunction,
44
set::MOI.AbstractScalarSet;
5-
own_function::Bool=false)
5+
allow_modify_function::Bool=false)
66
77
Adds the scalar constraint obtained by moving the constant term in `func` to
8-
the set in `model`. If `own_function` is `true` then the function `func`, can
9-
be modified.
8+
the set in `model`. If `allow_modify_function` is `true` then the function
9+
`func`, can be modified.
1010
"""
1111
function add_scalar_constraint end
1212

@@ -18,9 +18,9 @@ function add_scalar_constraint(model::MOI.ModelLike,
1818
func::Union{MOI.ScalarAffineFunction{T},
1919
MOI.ScalarQuadraticFunction{T}},
2020
set::MOI.AbstractScalarSet;
21-
own_function::Bool=false) where T
21+
allow_modify_function::Bool=false) where T
2222
set = shift_constant(set, -func.constant)
23-
if !own_function
23+
if !allow_modify_function
2424
func = copy(func)
2525
end
2626
func.constant = zero(T)

0 commit comments

Comments
 (0)