-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
getValue of an array of Variables #118
Comments
That probably isn't a great general solution, e.g. consider |
Why? If you pass in an array of Variables, it makes sense to get an array of same size back
|
what if you mix ranges slicing with arbitrary sets? |
I just feel like getting a JuMPDict back is probably the right thing to do |
or even better, throw errors, and slice the result of getValue(x) |
I see what you're getting at, but it seems silly to construct a JuMPDict when the argument is an array. What about
|
I could get behind throwing an error, but I don't find anything particularly egregious about this behavior |
How about
|
Since you can't do |
Thats what I think, or alternatively x[-3:+3] is an error - no ambiguity possible. |
Would there be any obvious performance reasons not to return a JuMPDict? |
Iain, when you wrote: Are you suggesting that getValue(x[-10:10]) would work, but no other slicing would be possible? I find that sort of weird and sad... |
No, I'd mean that no slicing would work on JuMPDicts so
|
I'm still not entirely sure about this use case, though. If you're slicing into an array you have no expectation that the original indexing is preserved:
Why should you have that expectation for JuMPDicts? It seems that if you need your crazy indexing somewhere down the pipeline, you should just work on the original JuMPDict. |
You know, more I think about this, more around in circles I go
to work. It doesn't right now, because of how
|
We can and should define |
I agree about dot working on arrays; that's arguably even more natural than on JuMPDicts, since |
Fix handling of MIQP problem type. Fixes #115
This code seems to choke with error:
ERROR: no method getValue(Array{Variable,1},)
A small example is:
The text was updated successfully, but these errors were encountered: