Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/sos_polynomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function MOI.Bridges.Constraint.bridge_constraint(
# As `*(::MOI.ScalarAffineFunction{T}, ::S)` is only defined if `S == T`, we
# need to call `similar`. This is critical since `T` is
# `Float64` when used with JuMP and the coefficient type is often `Int` if
# `set.domain.V` is `FullSpace` or `FixedPolynomialsSet`.
# `set.domain.V` is `FullSpace` or `FixedPolynomialSet`.
# FIXME convert needed because the coefficient type of `r` is `Any` otherwise if `domain` is `AlgebraicSet`
r = SOS.Certificate.reduced_polynomial(
s.certificate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function MOI.Bridges.Constraint.bridge_constraint(
# As `*(::MOI.ScalarAffineFunction{T}, ::S)` is only defined if `S == T`, we
# need to call `similar`. This is critical since `T` is
# `Float64` when used with JuMP and the coefficient type is often `Int` if
# `set.domain.V` is `FullSpace` or `FixedPolynomialsSet`.
# `set.domain.V` is `FullSpace` or `FixedPolynomialSet`.
g = Certificate.generator(set.certificate, index, preprocessed)
# TODO replace with `MA.sub_mul` when it works.
p = MA.operate!!(MA.add_mul, p, -one(T), λ, similar(g, T))
Expand Down
1 change: 1 addition & 0 deletions src/attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ GramMatrixAttribute() = GramMatrixAttribute(1)
struct SOSDecompositionAttribute
ranktol::Real
dec::MultivariateMoments.LowRankLDLTAlgorithm
result_index::Int
end

A constraint attribute for the [`SOSDecomposition`](@ref) of a constraint.
Expand Down