Skip to content

Missing method for mutable_operate! with add_mul #48

@blegat

Description

@blegat

Reported on slack in the math-optimization channel

julia> using JuMP

julia> model = Model();

julia> @variable(model, x);

julia> A = ones(2, 2);

julia> B = AffExpr.(A);

julia> JuMP._MA.@rewrite(B + x * A)
ERROR: StackOverflowError:
Stacktrace:
 [1] mutable_operate!(::typeof(MutableArithmetics.add_mul), ::Array{GenericAffExpr{Float64,VariableRef},2}, ::VariableRef, ::Array{Float64,2}) at /home/blegat/.julia/packages/MutableArithmetics/ZGFsK/src/linear_algebra.jl:69

julia> JuMP._MA.mutable_operate!(JuMP._MA.add_mul, B, x, A)
ERROR: StackOverflowError:
Stacktrace:
 [1] mutable_operate!(::typeof(MutableArithmetics.add_mul), ::Array{GenericAffExpr{Float64,VariableRef},2}, ::VariableRef, ::Array{Float64,2}) at /home/blegat/.julia/packages/MutableArithmetics/ZGFsK/src/linear_algebra.jl:69

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions