-
Notifications
You must be signed in to change notification settings - Fork 6
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
Read files #63
base: master
Are you sure you want to change the base?
Read files #63
Conversation
The goal is to implement an automatic decomposition such that the user does not need to provide the decomposition axis. To find the best axis for the decomposition 1. find the index sets of the constraints (get_constraints_and_axes(...)) 2. compute each possible subset of this set of axes; each of these subsets corresponds to one possible decomposition 3. find out how the decomposition/block structure would look like for each of these subsets; for each subset do: get_block_structure(...) 3.1. built a graph where there is a node for every constraint in the model that is not constructed over a set that is contained in the considered subset 3.2. find the connected compontents in this graph 3.3. each connected component will correspond to one block in the decomposition 3.4. store the possible decomposition as an instance of Block_Structure To do: 4. implement methods to compare the possible decompositons and determine which block structure should be used for the decomposition
- BlockDecomposition.jl: allow user to construct a BlockModel where automatic decomposition is activated - decomposition.jl: modify the function register_decomposition such that an automatic decomposition can be registered - tree.jl: adapt macro @danzig_wolfe_decomposition for automatic decomposition
Coeffecient matrix should be as white as possible; master constraints and blocks are black, everything else is white
It is now in automatic_decomposition.jl and was before in axis.jl.
The test only consists of optimizing the example problem for Coluna using automatic decomposition. Note: An error occurs during the execution for an unknown reason.
Includes check for all variables and constraints if they are annotated correctly.
…as the constraint
The user does not have to use the macro @dantzig_wolfe_decompostion(...) anymore if automatic decomposition is used but decompose(model) can be called after the constructing all constraints and variables. Also fix a bug in the plumple method that scores different decompositions. The "black value" of a block is now computed as v*c where v is the number of different variables used in the block and c is the number of constraints in the block
The standard value 1 for lower_multiplicity and upper_multiplicity is used for automatic decomposition. Therefore the user does not need to access the decomposition tree to set the multiplicities.
Instead, decompose(model::JuMP.Model) is now automatically called in JuMP.optimize!(model::JuMP.Model). If the user now wants to use automatic decomposition, all it needs to do is to set automatic_decomposition to true when creating the block model.
The score is defined in Khaniyev, Taghi, Samir Elhedhli, and Fatih Safa Erenay. "Structure detection in mixed-integer programs." INFORMS Journal on Computing 30.3 (2018): 570-587. When calling BlockModel(..., automatic_decomposition=true, automatic_decomposition_score_type=x) the user can give the type of decomposition score to be used in the automatic decomposition. x = 0 -> white score x = 1 -> block border score from Khaniyev et al. The standard score is the white score.
The score is defined in Bergner, Martin, et al. "Automatic Dantzig–Wolfe reformulation of mixed integer programs." Mathematical Programming 149.1-2 (2015): 391-424. The user can now choose between 3 different scores: BlockModel(..., automatic_decomposition=true, automatic_decomposition_score_type=x) for x = 0 -> white score x = 1 -> block border score x = 2 -> relative border area score
Add Metagraphs, LightGraphs, Combinatorics as dependencies.
Now for every subset S of the index sets, two structures are detected: 1. All constraints index by at least set from S are linking 2. All constraints not indexed by any set from S are linking Formatting of the code was improved, too.
is used in automatic decompositon
To reduce the arguments that need to be given to BlockModel(...) from two to one (when using automatic DW), the enum type AutoDwStrategy is introduced. One can now use the automatic Dantzig-Wolfe decomposition by creating the model with BlockModel(...,automatic_dantzig_wolfe=x) where x = white_score | block_border_score | relativ_border_area_score.
Improve readability of the function get_block_structure(...) which computes for a given set of index sets two candidate structures.
The automatic decompositon can now deal with constraints stored in SparseAxisArrays.
Rename from Constraints_and_axes to model_description
Write BlockDecomposition.white_score instead of white_score
There is some problem only when solving certain problems such as the one in read_decomposition_demos/bin_packing which I could not wrap my head around. The error message is Edit: |
Hi David, I'm sorry, I didn't see your PR ! Would you like to have a call to talk about what you did in this PR and in #31 ? |
Yes, that's a good idea! |
The goal is to apply a Dantzig-Wolfe decomposition to a model given as a .mps file where the decomposition structure is given in a .dec file. The motivation is that this would allow for an easy comparison of Coluna with other solvers.