-
-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recent matrix changes broke JuMPeR #577
Comments
As you can see, I have the correct |
Which commit is this on? |
JuMPeR any version (e.g. released version |
We should have a fallback method for |
Something I haven't defined maybe? |
Should still hopefully work, though. |
julia> Base.promote_type(eltype(A*matvar), eltype(b))
JuMP.GenericAffExpr{Float64,JuMP.Variable}
julia> Base.promote_type(eltype(A*matunc), eltype(b))
Any |
You need to add the equivalent of Base.promote_rule{R<:Real}(::Type{Variable},::Type{R} ) = AffExpr
Base.promote_rule( ::Type{Variable},::Type{AffExpr} ) = AffExpr
Base.promote_rule( ::Type{Variable},::Type{QuadExpr}) = QuadExpr
Base.promote_rule{R<:Real}(::Type{AffExpr}, ::Type{R} ) = AffExpr
Base.promote_rule( ::Type{AffExpr}, ::Type{QuadExpr}) = QuadExpr
Base.promote_rule{R<:Real}(::Type{QuadExpr},::Type{R} ) = QuadExpr to JuMPeR, I think. |
Got it, will try that now |
Success! Close this, or is it worth adding the fallback? |
I'm (hoping) we can solve this completely in JuMP, actually... |
Fixed? |
Yep, and tagged |
The text was updated successfully, but these errors were encountered: