You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could either define Base.sign(x::AbstractJuMPScalar) = op_ifelse(op_strictly_greater_than(x, 0), 1, -1), or we could add direct support to JuMP and MOI.
The text was updated successfully, but these errors were encountered:
This has come up a few times.
It occurs in GasModels.jl, where they want
signpower(x, p) = sign(x) * abs(x)^p
, and a variant appeared in https://discourse.julialang.org/t/nonlinear-optimization-with-many-constraints-autodifferentiation-which-julia-solution/110678We could either define
Base.sign(x::AbstractJuMPScalar) = op_ifelse(op_strictly_greater_than(x, 0), 1, -1)
, or we could add direct support to JuMP and MOI.The text was updated successfully, but these errors were encountered: