Knapsack count - #2482
Conversation
…ng in data from sub-MIPs; now to generate data!
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## latest #2482 +/- ##
==========================================
+ Coverage 79.55% 79.60% +0.04%
==========================================
Files 346 346
Lines 85401 85710 +309
==========================================
+ Hits 67942 68229 +287
- Misses 17459 17481 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Also tested by unit test |
|
Now incorporated integral scaling into |
…resolve; formatted
Opt-Mucca
left a comment
There was a problem hiding this comment.
The changes look good! I've left a comment or two, but they're for minor things.
I think I screwed up the language when talking about knapsacks and sub-milps. I was referring to some higher dimensional generalisations (an example MIPLIB benchmark instance: https://miplib.zib.de/instance_details_mik-250-20-75-4.html).
If we want some instances of (what I believe are normal knapsacks) then we can use: https://matilda.unimelb.edu.au/matilda/problems/opt/knapsack#knapsack (although off memory they are all rather trivial for current solvers)
| " permitted reductions\n", | ||
| postsolve_stack.numReductions(), reductionLimit); | ||
| "\nPresolve: Performed %" PRId64 " of %" PRId64 | ||
| " permitted true reductions\n", |
There was a problem hiding this comment.
Should it being worded differently to something like x reductions (y from scaling) or x reductions and y scaling reductions.
That would avoid using ambiguous like "true reductions".
| lp.offset_ - sense * knapsack_optimal_objective_value; | ||
|
|
||
| // Compute the objective directly as a check | ||
| double check_objective = lp.offset_; |
There was a problem hiding this comment.
Would this check be removed if we merge this?
| num_item + 1, std::vector<double>(capacity + 1, -1)); | ||
| // Set up the item use array, indicating that items are not used | ||
| std::vector<std::vector<bool>> use_item( | ||
| num_item + 1, std::vector<bool>(capacity + 1, false)); |
There was a problem hiding this comment.
I guess the downside here is that this vector can be huge?
|
No value in having a knapsack solver in HiGHS |
If the MIP solver is given a knapsack problem, it solves it by DP. Stats on the occurrence of knapsack problems are accumulated and logged. Tested by unit test
knapsack.