MethodError: no method matching similar_array_type

Hi there,

I am running my code and have the following error:

MethodError: no method matching similar_array_type(::Type{JuMP.Containers.DenseAxisArray{VariableRef,1,Tuple{UnitRange{Int64}},Tuple{Dict{Int64,Int64}}}}, ::Type{GenericAffExpr{Float64,VariableRef}})
Closest candidates are:
similar_array_type(::Type{LinearAlgebra.Symmetric{T,MT}}, ::Type{S}) where {S, T, MT} at /Users/Javi/.julia/packages/MutableArithmetics/bPWR4/src/linear_algebra.jl:137
similar_array_type(::Type{Array{T,N}}, ::Type{S}) where {S, T, N} at /Users/Javi/.julia/packages/MutableArithmetics/bPWR4/src/linear_algebra.jl:141
similar_array_type(::Type{var"#s17"} where var"#s17"<:Union{LinearAlgebra.Adjoint{T,A}, LinearAlgebra.Transpose{T,A}}, ::Type{S}) where {S, T, A} at /Users/Javi/.julia/packages/MutableArithmetics/bPWR4/src/linear_algebra.jl:353

Stacktrace:
[1] promote_operation(::typeof(*), ::Type{Int64}, ::Type{JuMP.Containers.DenseAxisArray{VariableRef,1,Tuple{UnitRange{Int64}},Tuple{Dict{Int64,Int64}}}}) at /Users/Javi/.julia/packages/MutableArithmetics/bPWR4/src/linear_algebra.jl:156
[2] promote_operation(::typeof(MutableArithmetics.sub_mul), ::Type{T} where T, ::Type{T} where T, ::Type{T} where T) at /Users/Javi/.julia/packages/MutableArithmetics/bPWR4/src/shortcuts.jl:53
[3] mutability(::Type{T} where T, ::Function, ::Type{T} where T, ::Type{T} where T, ::Type{T} where T) at /Users/Javi/.julia/packages/MutableArithmetics/bPWR4/src/interface.jl:154
[4] mutability(::GenericAffExpr{Float64,VariableRef}, ::Function, ::GenericAffExpr{Float64,VariableRef}, ::Int64, ::JuMP.Containers.DenseAxisArray{VariableRef,1,Tuple{UnitRange{Int64}},Tuple{Dict{Int64,Int64}}}) at /Users/Javi/.julia/packages/MutableArithmetics/bPWR4/src/interface.jl:160
[5] operate!(::typeof(MutableArithmetics.sub_mul), ::GenericAffExpr{Float64,VariableRef}, ::Int64, ::JuMP.Containers.DenseAxisArray{VariableRef,1,Tuple{UnitRange{Int64}},Tuple{Dict{Int64,Int64}}}) at /Users/Javi/.julia/packages/MutableArithmetics/bPWR4/src/rewrite.jl:80
[6] macro expansion at /Users/Javi/.julia/packages/MutableArithmetics/bPWR4/src/rewrite.jl:276 [inlined]
[7] macro expansion at /Users/Javi/.julia/packages/JuMP/y5vgk/src/macros.jl:447 [inlined]
[8] top-level scope at ./In[60]:43
[9] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091

The problem occurs with this constraint: [@constraint] (m, p_gen[t]-p_load[t]+epsilon<=M*z_excess), p_gen is a continuos variable, z_excess a binary variable, p_load is data from a csv

Welcome to the Julia community!

It would be much easier to help with a minimal code example that reproduces your problem.