I am trying to define a constraint using the IntervalConstraintProgramming.jl package as follows:
a=3
C = @constraint x^2 + y^2 - $a <= 0
Here, I wanted x and y to be treated as variables and a as a constant, defined elsewhere. But I get the following error:
UndefVarError: `a` not defined
Stacktrace:
[1] top-level scope
@ C:\Users\user\.julia\packages\IntervalConstraintProgramming\8OYsb\src\separator.jl:156
If I remove the ‘$’ before a, I get:
Separator:
- variables: x, y, a
- expression: (x ^ 2 + y ^ 2) - a ∈ [-∞, 0]
But here, a is also treated as a variable, which is not what I wanted. Any help would be deeply appreciated. Thanks in advance!