Hi,
I started playing with the IntervalConstraintProgramming module in Julia, and ran into a problem.
Here is a minimal example:
using IntervalConstraintProgramming
using IntervalArithmetic
using ModelingToolkit
function test(X, vars)
hc4 = Contractor(vars, x + y)
return hc4(0..0, X)
end
vars = @variables x y
X = IntervalBox(0..5, 0..Inf)
new_X = test(X, vars)
and I get:
ERROR: MethodError: no method matching (::getfield(IntervalConstraintProgramming, Symbol("##53#54")))(::IntervalBox{2,Float64})
The applicable method may be too new: running in world age 25183, while current world is 25185.
Closest candidates are:
#53(::Any) at /u/v/vanaret/.julia/packages/IntervalConstraintProgramming/MlctF/src/code_generation.jl:192 (method too new to be called from this world context.)
Stacktrace:
[1] (::IntervalConstraintProgramming.GeneratedFunction{getfield(IntervalConstraintProgramming, Symbol("##53#54"))})(::IntervalBox{2,Float64}) at /u/v/vanaret/.julia/packages/IntervalConstraintProgramming/MlctF/src/code_generation.jl:12
[2] contract(::Contractor{2,1,getfield(IntervalConstraintProgramming, Symbol("##53#54")),getfield(IntervalConstraintProgramming, Symbol("##55#56")),Operation}, ::IntervalBox{1,Float64}, ::IntervalBox{2,Float64}) at /u/v/vanaret/.julia/packages/IntervalConstraintProgramming/MlctF/src/contractor.jl:54
[3] (::Contractor{2,1,getfield(IntervalConstraintProgramming, Symbol("##53#54")),getfield(IntervalConstraintProgramming, Symbol("##55#56")),Operation})(::IntervalBox{1,Float64}, ::IntervalBox{2,Float64}) at /u/v/vanaret/.julia/packages/IntervalConstraintProgramming/MlctF/src/contractor.jl:78
[4] (::Contractor{2,1,getfield(IntervalConstraintProgramming, Symbol("##53#54")),getfield(IntervalConstraintProgramming, Symbol("##55#56")),Operation})(::Interval{Float64}, ::IntervalBox{2,Float64}) at /u/v/vanaret/.julia/packages/IntervalConstraintProgramming/MlctF/src/contractor.jl:82
[5] test(::IntervalBox{2,Float64}, ::Tuple{Variable,Variable}) at ./REPL[36]:3
[6] top-level scope at none:0
Does it have to do with the @variables passed as function parameter? The error mentions the code generation of the contractor, and my knowledge of Julia is too limited to understand.
Thanks for your help,
Charlie