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
MixedIntegerLinearProgram should provide a way to get the variables in the order they are provided to the polyhedron method #26302
Comments
comment:2
I'm not aware of all the ways to use At least, in class |
comment:3
A trick to control the order is to touch all MIP variables in the desired order (before adding constraints to the system). |
comment:4
Replying to @mkoeppe:
In your answer to that ask.sagemath question,
to
|
comment:5
Instead of trying to produce a mapping from backend variables to frontend variables, I would propose to:
|
comment:6
MIP variables are stored in a dictionary. So even if you touch them in a certain order, you rely on the ordering of the keys of the dictionary, which might be different. Nonetheless, why is the order of the keys of the dictionary not sufficient ? We have an ordering of instances of class MIPVariable inside |
comment:7
No, the mapping to backend indices is created in |
comment:8
Also see: This could be a nice idiomatic way to ensure consecutive backend indices of a MIPVariable's component variables. |
comment:9
Also see the proposed new method |
comment:10
#20773 now has an implementation, please review. |
comment:11
Thanks for the pointers, the |
comment:12
It's fine with me to make it a public method. If you want, go ahead and put this code from #20656 on some separate ticket. |
comment:13
Replying to @sagetrac-tmonteil:
I'd say let's first go for the |
New commits:
|
Commit: |
Author: Matthias Koeppe |
When creating a
MixedIntegerLinearProgram
, we may have no control on the order in which the (one-dimensional) variables are defined (because of complicated loops).When we use the
polyhedron
method, the basis of the underlying vector space is ordered according to some order on the variables, which basically follows the order in which they are defined.However, there is no simple way to get this order for the user. We need a method to get this order if we want to be able to connect information provided by the polytope (e.g. its set of integral points) to the original linear problem.
To provide a concrete example of the issue, see my answer of this as question.
CC: @jplab @mkoeppe @mo271 @videlec @yuan-zhou
Component: linear programming
Author: Matthias Koeppe
Branch/Commit: u/mkoeppe/mixedintegerlinearprogram_should_provide_a_way_to_get_the_variables_in_the_order_they_are_provided_to_the_polyhedron_method @
db6571e
Issue created by migration from https://trac.sagemath.org/ticket/26302
The text was updated successfully, but these errors were encountered: