-
Notifications
You must be signed in to change notification settings - Fork 2
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
Parsing double inequalities #19
Comments
Just a guess: You need to split double inequalities |
At least parsing the string works as expected: julia> SX.parse_sxmath("-1 <= x <= 1")
1-element Array{Expr,1}:
:(-1 <= x <= 1) |
Yes, i think your guess is correct. This type of expression is a julia> using SX
julia> expr = SX.parse_sxmath("-9 <= aL <= 9")
1-element Array{Expr,1}:
:(-9 <= aL <= 9)
julia> expr[1].head
:comparison
julia> expr[1].args
5-element Array{Any,1}:
-9
:(<=)
:aL
:(<=)
9 It is easy to add a new case, checking that the args 2 and 4 are |
Another model with uses this conjunction notation is the linear switching SX model. |
In the platooning benchmark, the parsing induces the following error:
invariant -9 <= aL <= 1 in location 1 not understood
The text was updated successfully, but these errors were encountered: