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
julia> model =Model()
A JuMP Model
Feasibility problem with:
Variables:0
Model mode: AUTOMATIC
CachingOptimizer state: NO_OPTIMIZER
Solver name: No optimizer attached.
julia>@variable(model, p ==1, Param())
p
julia>@variable(model, x)
x
julia>@expression(model, ex, 1* p)
p
julia>@constraint(model, ex <=0)
ERROR: MethodError: no method matching shift_constant(::MathOptInterface.LessThan{Float64}, ::Int64)
Closest candidates are:shift_constant(::Union{MathOptInterface.EqualTo{T}, MathOptInterface.GreaterThan{T}, MathOptInterface.LessThan{T}}, ::T) where T at /Users/oscar/.julia/packages/MathOptInterface/5WwpK/src/Utilities/sets.jl:13shift_constant(::MathOptInterface.Interval, ::Any) at /Users/oscar/.julia/packages/MathOptInterface/5WwpK/src/Utilities/sets.jl:19shift_constant(::MathOptInterface.Test.UnknownScalarSet, ::Any) at /Users/oscar/.julia/packages/MathOptInterface/5WwpK/src/Test/modellike.jl:8
Stacktrace:
[1] build_constraint(::Function, ::ParameterJuMP.DoubleGenericAffExpr{Int64,VariableRef,ParameterRef}, ::MathOptInterface.LessThan{Float64}) at /Users/oscar/.julia/dev/ParameterJuMP/src/constraints.jl:162
[2] top-level scope at /Users/oscar/.julia/packages/JuMP/y5vgk/src/macros.jl:448
[3] top-level scope at REPL[180]:1
julia>@constraint(model, ex <= x)
ERROR: MethodError: no method matching +(::GenericAffExpr{Float64,VariableRef}, ::ParameterJuMP.DoubleGenericAffExpr{Int64,VariableRef,ParameterRef})
Closest candidates are:+(::Any, ::Any, ::Any, ::Any...) at operators.jl:538+(::ChainRulesCore.DoesNotExist, ::Any) at /Users/oscar/.julia/packages/ChainRulesCore/7d1hl/src/differential_arithmetic.jl:23+(::MutableArithmetics.Zero, ::Any) at /Users/oscar/.julia/packages/MutableArithmetics/bPWR4/src/rewrite.jl:52...
Stacktrace:
[1] -(::ParameterJuMP.DoubleGenericAffExpr{Int64,VariableRef,ParameterRef}, ::VariableRef) at /Users/oscar/.julia/dev/ParameterJuMP/src/operators.jl:122
[2] sub_mul(::ParameterJuMP.DoubleGenericAffExpr{Int64,VariableRef,ParameterRef}, ::VariableRef) at /Users/oscar/.julia/packages/MutableArithmetics/bPWR4/src/MutableArithmetics.jl:31
[3] operate(::typeof(MutableArithmetics.sub_mul), ::ParameterJuMP.DoubleGenericAffExpr{Int64,VariableRef,ParameterRef}, ::VariableRef) at /Users/oscar/.julia/packages/MutableArithmetics/bPWR4/src/interface.jl:110
[4] operate_fallback!(::MutableArithmetics.NotMutable, ::Function, ::ParameterJuMP.DoubleGenericAffExpr{Int64,VariableRef,ParameterRef}, ::VariableRef) at /Users/oscar/.julia/packages/MutableArithmetics/bPWR4/src/interface.jl:327
[5] operate!(::typeof(MutableArithmetics.sub_mul), ::ParameterJuMP.DoubleGenericAffExpr{Int64,VariableRef,ParameterRef}, ::VariableRef) at /Users/oscar/.julia/packages/MutableArithmetics/bPWR4/src/rewrite.jl:80
[6] top-level scope at /Users/oscar/.julia/packages/MutableArithmetics/bPWR4/src/rewrite.jl:276
[7] top-level scope at /Users/oscar/.julia/packages/JuMP/y5vgk/src/macros.jl:447
[8] top-level scope at REPL[181]:1
julia>@constraint(model, x - ex <=0)
ERROR: MethodError: no method matching shift_constant(::MathOptInterface.LessThan{Float64}, ::Int64)
Closest candidates are:shift_constant(::Union{MathOptInterface.EqualTo{T}, MathOptInterface.GreaterThan{T}, MathOptInterface.LessThan{T}}, ::T) where T at /Users/oscar/.julia/packages/MathOptInterface/5WwpK/src/Utilities/sets.jl:13shift_constant(::MathOptInterface.Interval, ::Any) at /Users/oscar/.julia/packages/MathOptInterface/5WwpK/src/Utilities/sets.jl:19shift_constant(::MathOptInterface.Test.UnknownScalarSet, ::Any) at /Users/oscar/.julia/packages/MathOptInterface/5WwpK/src/Test/modellike.jl:8
Stacktrace:
[1] build_constraint(::Function, ::ParameterJuMP.DoubleGenericAffExpr{Int64,VariableRef,ParameterRef}, ::MathOptInterface.LessThan{Float64}) at /Users/oscar/.julia/dev/ParameterJuMP/src/constraints.jl:162
[2] top-level scope at /Users/oscar/.julia/packages/JuMP/y5vgk/src/macros.jl:448
[3] top-level scope at REPL[182]:1
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: