Skip to content

Commit cbcb936

Browse files
committed
80 character edit
1 parent 3df02ed commit cbcb936

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

ext/InfiniteDisjunctiveProgramming.jl

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,19 @@ end
118118

119119
function JuMP.add_constraint(
120120
model::M,
121-
c::JuMP.ScalarConstraint{JuMP.GenericAffExpr{C, DP.LogicalVariableRef{M}}, S},
121+
c::JuMP.ScalarConstraint{
122+
JuMP.GenericAffExpr{C, DP.LogicalVariableRef{M}}, S
123+
},
122124
name::String = ""
123125
) where {M <: InfiniteOpt.InfiniteModel, S, C}
124126
error("Cannot add, subtract, or multiply with logical variables.")
125127
end
126128

127129
function JuMP.add_constraint(
128130
model::M,
129-
c::JuMP.ScalarConstraint{JuMP.GenericQuadExpr{C, DP.LogicalVariableRef{M}}, S},
131+
c::JuMP.ScalarConstraint{
132+
JuMP.GenericQuadExpr{C, DP.LogicalVariableRef{M}}, S
133+
},
130134
name::String = ""
131135
) where {M <: InfiniteOpt.InfiniteModel, S, C}
132136
error("Cannot add, subtract, or multiply with logical variables.")
@@ -135,7 +139,9 @@ end
135139
################################################################################
136140
# METHODS
137141
################################################################################
138-
function DP.get_constant(expr::JuMP.GenericAffExpr{T, InfiniteOpt.GeneralVariableRef}) where {T}
142+
function DP.get_constant(
143+
expr::JuMP.GenericAffExpr{T, InfiniteOpt.GeneralVariableRef}
144+
) where {T}
139145
constant = JuMP.constant(expr)
140146
param_expr = zero(typeof(expr))
141147
for (var, coeff) in expr.terms
@@ -172,12 +178,12 @@ end
172178
# ERROR MESSAGES
173179
################################################################################
174180
function DP.reformulate_model(::InfiniteOpt.InfiniteModel, ::DP.MBM)
175-
error("The `MBM` reformulation method is not supported for `InfiniteModel`. " *
181+
error("The `MBM` method is not supported for `InfiniteModel`." *
176182
"Please use `BigM`, `Hull`, `Indicator`, or `PSplit` instead.")
177183
end
178184

179185
function DP.reformulate_model(::InfiniteOpt.InfiniteModel, ::DP.cutting_planes)
180-
error("The `cutting_planes` reformulation method is not supported for `InfiniteModel`. " *
186+
error("The `cutting_planes` method is not supported for `InfiniteModel`." *
181187
"Please use `BigM`, `Hull`, `Indicator`, or `PSplit` instead.")
182188
end
183189

0 commit comments

Comments
 (0)