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

nasty error message when index sets contain repeated elements #199

Closed
mlubin opened this issue Jun 13, 2014 · 3 comments
Closed

nasty error message when index sets contain repeated elements #199

mlubin opened this issue Jun 13, 2014 · 3 comments

Comments

@mlubin
Copy link
Member

mlubin commented Jun 13, 2014

julia> m = Model();

julia> s = [:x,:x,:y];

julia> @defVar(m, x[s])
Error showing value of type JuMPDict##38282{Variable}:
ERROR: access to undefined reference
 in dictstring at /home/mlubin/.julia/v0.3/JuMP/src/print.jl:192
 in print at /home/mlubin/.julia/v0.3/JuMP/src/print.jl:480
 in show at /home/mlubin/.julia/v0.3/JuMP/src/print.jl:477
 in anonymous at show.jl:1067
 in with_output_limit at ./show.jl:1044
 in showlimited at show.jl:1066
 in writemime at replutil.jl:2
 in display at REPL.jl:117
 in display at REPL.jl:120
 in display at multimedia.jl:149
 in print_response at REPL.jl:139
 in print_response at REPL.jl:124
 in anonymous at REPL.jl:541
 in run_interface at ./LineEdit.jl:1349
 in run_frontend at ./REPL.jl:763
 in run_repl at ./REPL.jl:169
 in _start at ./client.jl:398
@mlubin
Copy link
Member Author

mlubin commented Jun 13, 2014

This could also fall out of #192.

@joehuchette
Copy link
Contributor

What should we even do in this situation? Create two variables, only one of which is accessible?

@mlubin
Copy link
Member Author

mlubin commented Jun 13, 2014

I'd say we should throw an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants