Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add convenient syntax for multidimensional set construction #5

Open
chriscoey opened this issue Nov 2, 2018 · 0 comments
Open

add convenient syntax for multidimensional set construction #5

chriscoey opened this issue Nov 2, 2018 · 0 comments

Comments

@chriscoey
Copy link

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)

@chriscoey chriscoey changed the title add convenient syntax for box set construction add convenient syntax for multidimensional set construction Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant