Skip to content

Commit be130ea

Browse files
committed
Fix
1 parent b53f315 commit be130ea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: src/Utilities/feasibility_relaxation.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"""
88
FeasibilityRelaxation(
99
penalties = Dict{MOI.ConstraintIndex,Float64}(),
10-
) <: MOI.AbstractFunctionModification
10+
)
1111
1212
A problem modifier that, when passed to [`MOI.modify`](@ref), destructively
1313
modifies the model in-place to create a feasibility relaxation.
@@ -62,7 +62,7 @@ VariableIndex-in-GreaterThan{Float64}
6262
v[2] >= 0.0
6363
```
6464
"""
65-
mutable struct FeasibilityRelaxation{T} <: MOI.AbstractFunctionModification
65+
mutable struct FeasibilityRelaxation{T}
6666
penalties::Dict{MOI.ConstraintIndex,T}
6767
scale::T
6868
function FeasibilityRelaxation(p::Dict{MOI.ConstraintIndex,T}) where {T}
@@ -122,7 +122,7 @@ end
122122
function MOI.modify(
123123
model::MOI.ModelLike,
124124
ci::MOI.ConstraintIndex{F,<:MOI.AbstractScalarSet},
125-
relax::FeasibilityRelaxation,
125+
relax::FeasibilityRelaxation{T},
126126
) where {T,F<:Union{MOI.ScalarAffineFunction{T},MOI.ScalarQuadraticFunction{T}}}
127127
y = MOI.add_variable(model)
128128
z = MOI.add_variable(model)
@@ -141,7 +141,7 @@ end
141141
function MOI.modify(
142142
model::MOI.ModelLike,
143143
ci::MOI.ConstraintIndex{F,MOI.GreaterThan{T}},
144-
relax::FeasibilityRelaxation,
144+
relax::FeasibilityRelaxation{T},
145145
) where {T,F<:Union{MOI.ScalarAffineFunction{T},MOI.ScalarQuadraticFunction{T}}}
146146
# Performance optimization: we don't need the z relaxation variable.
147147
y = MOI.add_variable(model)
@@ -157,7 +157,7 @@ end
157157
function MOI.modify(
158158
model::MOI.ModelLike,
159159
ci::MOI.ConstraintIndex{F,MOI.LessThan{T}},
160-
relax::FeasibilityRelaxation,
160+
relax::FeasibilityRelaxation{T},
161161
) where {T,F<:Union{MOI.ScalarAffineFunction{T},MOI.ScalarQuadraticFunction{T}}}
162162
# Performance optimization: we don't need the y relaxation variable.
163163
z = MOI.add_variable(model)

0 commit comments

Comments
 (0)