Skip to content
Draft
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
6 changes: 3 additions & 3 deletions src/Bridges/Constraint/to_polynomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ end
function MOI.Bridges.Constraint.bridge_constraint(
::Type{ToPolynomialBridge{T,S}},
model,
f::MOI.AbstractScalarFunction,
f::MOI.ScalarNonlinearFunction,
s::S,
) where {T,S}
constraint = MOI.add_constraint(model, convert(FuncType{T}, f), s)
Expand All @@ -47,7 +47,7 @@ end

function MOI.supports_constraint(
::Type{ToPolynomialBridge{T}},
::Type{<:MOI.AbstractScalarFunction},
::Type{<:MOI.ScalarNonlinearFunction},
::Type{<:MOI.AbstractScalarSet},
) where {T}
return true
Expand All @@ -67,7 +67,7 @@ end

function MOI.Bridges.Constraint.concrete_bridge_type(
::Type{<:ToPolynomialBridge{T}},
::Type{<:MOI.AbstractScalarFunction},
::Type{<:MOI.ScalarNonlinearFunction},
::Type{S},
) where {T,S<:MOI.AbstractScalarSet}
return ToPolynomialBridge{T,S}
Expand Down
6 changes: 3 additions & 3 deletions src/Bridges/Objective/to_polynomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ where ``f(x)`` is a scalar function and ``p(x)`` is a polynomial.

`ToPolynomialBridge` supports:

* `MOI.ObjectiveFunction{F}` where `F` is a `MOI.AbstractScalarFunction` for
* `MOI.ObjectiveFunction{F}` where `F` is a `MOI.ScalarNonlinearFunction` for
which `convert(::Type{PolyJuMP.ScalarPolynomialFunction}, ::Type{F})`. That
is for instance the case for `MOI.VariableIndex`, `MOI.ScalarAffineFunction`
and `MOI.ScalarQuadraticFunction`.
Expand All @@ -38,7 +38,7 @@ struct ToPolynomialBridge{T} <: MOI.Bridges.Objective.AbstractBridge end
function MOI.Bridges.Objective.bridge_objective(
::Type{ToPolynomialBridge{T}},
model::MOI.ModelLike,
func::MOI.AbstractScalarFunction,
func::MOI.ScalarNonlinearFunction,
) where {T}
F = FuncType{T}
MOI.set(model, MOI.ObjectiveFunction{F}(), convert(F, func))
Expand All @@ -48,7 +48,7 @@ end
function MOI.Bridges.Objective.supports_objective_function(
::Type{ToPolynomialBridge{T}},
::Type{F},
) where {T,F<:MOI.AbstractScalarFunction}
) where {T,F<:MOI.ScalarNonlinearFunction}
return MOI.Utilities.is_coefficient_type(F, T)
end

Expand Down
Loading