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

Bugs with Separator and ModelingToolkit #150

Closed
dpsanders opened this issue Jul 15, 2019 · 2 comments
Closed

Bugs with Separator and ModelingToolkit #150

dpsanders opened this issue Jul 15, 2019 · 2 comments

Comments

@dpsanders
Copy link
Member

vars = @variables x, y

julia> Separator(vars, x)
ERROR: BoundsError: attempt to access 0-element Array{Expression,1} at index [1]
Stacktrace:
 [1] getindex at ./array.jl:729 [inlined]
 [2] parse_comparison(::Operation) at /Users/dpsanders/.julia/dev/IntervalConstraintProgramming/src/separator.jl:94
 [3] Separator(::Tuple{Operation,Operation}, ::Operation) at /Users/dpsanders/.julia/dev/IntervalConstraintProgramming/src/separator.jl:199
 [4] top-level scope at none:0

julia> Separator(vars, x^2 + x)
ERROR: MethodError: no method matching iterate(::Nothing)
Closest candidates are:
  iterate(::Core.SimpleVector) at essentials.jl:568
  iterate(::Core.SimpleVector, ::Any) at essentials.jl:568
  iterate(::ExponentialBackOff) at error.jl:199
  ...
Stacktrace:
 [1] indexed_iterate(::Nothing, ::Int64) at ./tuple.jl:66
 [2] Separator(::Tuple{Operation,Operation}, ::Operation) at /Users/dpsanders/.julia/dev/IntervalConstraintProgramming/src/separator.jl:199
 [3] top-level scope at none:0

cc @Yashcodes

@dpsanders
Copy link
Member Author

I don't really understand why this is happening. Isn't the logic for Separators basically the same as for Contractors (which work)? It should be the same logic (i.e. no code duplication).

@dpsanders
Copy link
Member Author

No longer relevant

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