SemialgebraicSets.jl
SemialgebraicSets.jl copied to clipboard
add convenient syntax for multidimensional set construction
to specify a domain of multidimensional x (from @polyvar x[1:n]) in the hyperbox -5...5, currently I am writing something like:
dom = BasicSemialgebraicSet{Float64,Polynomial{true,Float64}}()
for xi in x
addinequality!(dom, -xi+5)
addinequality!(dom, xi+5)
end
but it would be much more convenient if I could write something like (kind of JuMP-style):
dom = @set -5 .<= x .<= 5
or at least:
dom = @set -5 .<= x && x .<= 5
or:
dom = @set (-5 <= xi && xi <= 5 for xi in x)