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

Replace UserInfo with regular storage. #748

Merged
merged 11 commits into from
Nov 29, 2022

Conversation

guimarqu
Copy link
Contributor

@artalvpes the last test does not pass. I find max_info_val equals 1110.
I don't have time to go further this week. You can review it if you have time. I'll work back on this next week.

***************************************************************************************
**** B&B tree root node
**** Local DB = -Inf, global bounds: [ -Inf , Inf ], time = 0.00 sec.
***************************************************************************************
  <it=  1> <et= 0.00> <mst= 0.00> <sp= 0.00> <cols= 1> <al= 0.00> <DB=-29997.0000> <mlp=30000.0000> <PB=Inf>
  <it=  2> <et= 0.00> <mst= 0.00> <sp= 0.00> <cols= 1> <al= 0.00> <DB=-29997.0000> <mlp=10001.0000> <PB=Inf>
  <it=  3> <et= 0.00> <mst= 0.00> <sp= 0.00> <cols= 1> <al= 0.00> <DB=-29997.0000> <mlp=10001.0000> <PB=Inf>
  <it=  4> <et= 0.00> <mst= 0.00> <sp= 0.00> <cols= 0> <al= 0.00> <DB=    1.5000> <mlp=    1.5000> <PB=Inf>
[ Info: Column generation algorithm has converged.
***************************************************************************************
**** B&B tree node N°3, parent N°1, depth 1, 1 untreated node
**** Local DB = 1.5000, global bounds: [ 1.5000 , Inf ], time = 1.06 sec.
**** Branching constraint: y[1]<=1.0
***************************************************************************************
  <it=  1> <et= 1.11> <mst= 0.01> <sp= 0.00> <cols= 0> <al= 0.00> <DB= 5001.5000> <mlp= 5001.5000> <PB=Inf>
[ Info: Column generation algorithm has converged.
# <it=  1> <et= 1.15> <mst= 0.00> <sp= 0.00> <cols= 0> <al= 0.00> <DB= 5000.0000> <mlp= 5000.0000> <PB=Inf>
[ Info: Phase one determines infeasibility.
***************************************************************************************
**** B&B tree node N°2, parent N°1, depth 1, 0 untreated node
**** Local DB = 1.5000, global bounds: [ 5000.0000 , Inf ], time = 1.15 sec.
**** Branching constraint: y[1]>=2.0
***************************************************************************************
  <it=  1> <et= 1.18> <mst= 0.03> <sp= 0.00> <cols= 1> <al= 0.00> <DB=    1.5000> <mlp= 5001.5000> <PB=Inf>
  <it=  2> <et= 1.18> <mst= 0.00> <sp= 0.00> <cols= 1> <al= 0.00> <DB=    1.5000> <mlp=    2.0000> <PB=2.0000>
  <it=  3> <et= 1.18> <mst= 0.00> <sp= 0.00> <cols= 1> <al= 0.00> <DB=    1.5000> <mlp=    2.0000> <PB=2.0000>
  <it=  4> <et= 1.18> <mst= 0.00> <sp= 0.00> <cols= 0> <al= 0.00> <DB=    2.0000> <mlp=    2.0000> <PB=2.0000>
[ Info: Dual bound reached primal bound.
 ──────────────────────────────────────────────────────────────────────────────────────
                                              Time                    Allocations      
                                     ───────────────────────   ────────────────────────
          Tot / % measured:               1.41s /  83.9%           73.5MiB /  85.9%    

 Section                     ncalls     time    %tot     avg     alloc    %tot      avg
 ──────────────────────────────────────────────────────────────────────────────────────
 Coluna                           1    1.18s  100.0%   1.18s   63.1MiB  100.0%  63.1MiB
   SolveLpForm                   10   45.2ms    3.8%  4.52ms    496KiB    0.8%  49.6KiB
   Update Lagrangian bound       10   59.3μs    0.0%  5.93μs   8.12KiB    0.0%     832B
   Update reduced costs          10   57.5μs    0.0%  5.75μs   18.4KiB    0.0%  1.84KiB
   Cleanup columns               10   37.5μs    0.0%  3.75μs   2.02KiB    0.0%     206B
   Smoothing update              10   9.49μs    0.0%   949ns   1.09KiB    0.0%     112B
 ──────────────────────────────────────────────────────────────────────────────────────
[ Info: Terminated
[ Info: Primal bound: 2.0
[ Info: Dual bound: 2.0
JuMP.objective_value(model) = 2.0
max_info_val = 1110
                                Pass    Fail   Total
Improve relaxation callback |     20       1      21

Improve relaxation callback: Test Failed at /Users/guimarqu/.julia/dev/Coluna/test/integration/improve_relax_callback.jl:224
  Expression: do_improve || max_info_val == 888

ERROR: LoadError: Some tests did not pass: 20 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /Users/guimarqu/.julia/dev/Coluna/test/runtests.jl:8
ERROR: Package Coluna errored during testing

@artalvpes
Copy link
Collaborator

@artalvpes the last test does not pass. I find max_info_val equals 1110. I don't have time to go further this week. You can review it if you have time. I'll work back on this next week.

***************************************************************************************
**** B&B tree root node
**** Local DB = -Inf, global bounds: [ -Inf , Inf ], time = 0.00 sec.
***************************************************************************************
  <it=  1> <et= 0.00> <mst= 0.00> <sp= 0.00> <cols= 1> <al= 0.00> <DB=-29997.0000> <mlp=30000.0000> <PB=Inf>
  <it=  2> <et= 0.00> <mst= 0.00> <sp= 0.00> <cols= 1> <al= 0.00> <DB=-29997.0000> <mlp=10001.0000> <PB=Inf>
  <it=  3> <et= 0.00> <mst= 0.00> <sp= 0.00> <cols= 1> <al= 0.00> <DB=-29997.0000> <mlp=10001.0000> <PB=Inf>
  <it=  4> <et= 0.00> <mst= 0.00> <sp= 0.00> <cols= 0> <al= 0.00> <DB=    1.5000> <mlp=    1.5000> <PB=Inf>
[ Info: Column generation algorithm has converged.
***************************************************************************************
**** B&B tree node N°3, parent N°1, depth 1, 1 untreated node
**** Local DB = 1.5000, global bounds: [ 1.5000 , Inf ], time = 1.06 sec.
**** Branching constraint: y[1]<=1.0
***************************************************************************************
  <it=  1> <et= 1.11> <mst= 0.01> <sp= 0.00> <cols= 0> <al= 0.00> <DB= 5001.5000> <mlp= 5001.5000> <PB=Inf>
[ Info: Column generation algorithm has converged.
# <it=  1> <et= 1.15> <mst= 0.00> <sp= 0.00> <cols= 0> <al= 0.00> <DB= 5000.0000> <mlp= 5000.0000> <PB=Inf>
[ Info: Phase one determines infeasibility.
***************************************************************************************
**** B&B tree node N°2, parent N°1, depth 1, 0 untreated node
**** Local DB = 1.5000, global bounds: [ 5000.0000 , Inf ], time = 1.15 sec.
**** Branching constraint: y[1]>=2.0
***************************************************************************************
  <it=  1> <et= 1.18> <mst= 0.03> <sp= 0.00> <cols= 1> <al= 0.00> <DB=    1.5000> <mlp= 5001.5000> <PB=Inf>
  <it=  2> <et= 1.18> <mst= 0.00> <sp= 0.00> <cols= 1> <al= 0.00> <DB=    1.5000> <mlp=    2.0000> <PB=2.0000>
  <it=  3> <et= 1.18> <mst= 0.00> <sp= 0.00> <cols= 1> <al= 0.00> <DB=    1.5000> <mlp=    2.0000> <PB=2.0000>
  <it=  4> <et= 1.18> <mst= 0.00> <sp= 0.00> <cols= 0> <al= 0.00> <DB=    2.0000> <mlp=    2.0000> <PB=2.0000>
[ Info: Dual bound reached primal bound.
 ──────────────────────────────────────────────────────────────────────────────────────
                                              Time                    Allocations      
                                     ───────────────────────   ────────────────────────
          Tot / % measured:               1.41s /  83.9%           73.5MiB /  85.9%    

 Section                     ncalls     time    %tot     avg     alloc    %tot      avg
 ──────────────────────────────────────────────────────────────────────────────────────
 Coluna                           1    1.18s  100.0%   1.18s   63.1MiB  100.0%  63.1MiB
   SolveLpForm                   10   45.2ms    3.8%  4.52ms    496KiB    0.8%  49.6KiB
   Update Lagrangian bound       10   59.3μs    0.0%  5.93μs   8.12KiB    0.0%     832B
   Update reduced costs          10   57.5μs    0.0%  5.75μs   18.4KiB    0.0%  1.84KiB
   Cleanup columns               10   37.5μs    0.0%  3.75μs   2.02KiB    0.0%     206B
   Smoothing update              10   9.49μs    0.0%   949ns   1.09KiB    0.0%     112B
 ──────────────────────────────────────────────────────────────────────────────────────
[ Info: Terminated
[ Info: Primal bound: 2.0
[ Info: Dual bound: 2.0
JuMP.objective_value(model) = 2.0
max_info_val = 1110
                                Pass    Fail   Total
Improve relaxation callback |     20       1      21

Improve relaxation callback: Test Failed at /Users/guimarqu/.julia/dev/Coluna/test/integration/improve_relax_callback.jl:224
  Expression: do_improve || max_info_val == 888

ERROR: LoadError: Some tests did not pass: 20 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /Users/guimarqu/.julia/dev/Coluna/test/runtests.jl:8
ERROR: Package Coluna errored during testing

This probably means that the right child is receiving the user info updated by the left child while it should inherit a clean copy of the one generated at the root node. This test was designed to capture that.

@artalvpes
Copy link
Collaborator

Investigating a bit more the bug, I found that restore_from_record! is never called. It should be called whenever a new node starts to be conquered. This is done only for master branching constraints, and there is no interface that allows to add user info to this list:

push!(units_to_restore.units_used, (master, MasterBranchConstrsUnit))

@codecov
Copy link

codecov bot commented Nov 28, 2022

Codecov Report

❗ No coverage uploaded for pull request base (before_cut_gen_callback@1dd95e5). Click here to learn what that means.
Patch has no changes to coverable lines.

❗ Current head cd3e064 differs from pull request most recent head 820e85f. Consider uploading reports for the commit 820e85f to get more accurate results

Additional details and impacted files
@@                    Coverage Diff                     @@
##             before_cut_gen_callback     #748   +/-   ##
==========================================================
  Coverage                           ?   49.13%           
==========================================================
  Files                              ?       59           
  Lines                              ?     5422           
  Branches                           ?        0           
==========================================================
  Hits                               ?     2664           
  Misses                             ?     2758           
  Partials                           ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@guimarqu guimarqu changed the base branch from improve-relax-callback to before_cut_gen_callback November 29, 2022 08:34
@guimarqu guimarqu merged commit 8739645 into before_cut_gen_callback Nov 29, 2022
@guimarqu guimarqu deleted the guillaume_review branch November 29, 2022 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants