-
Notifications
You must be signed in to change notification settings - Fork 42
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
Optimality tolerance depending on the algorithm #395
Conversation
Codecov Report
@@ Coverage Diff @@
## master #395 +/- ##
==========================================
- Coverage 76.75% 76.57% -0.19%
==========================================
Files 52 52
Lines 4122 4145 +23
==========================================
+ Hits 3164 3174 +10
- Misses 958 971 +13
Continue to review full report at Codecov.
|
"IP Gap is non-positive: ", ip_gap(getincumbents(node)), ". Abort treatment." | ||
) | ||
else | ||
if ip_gap_closed(nodestate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be a warning for me. It is totally ok to have no gap here, as the best primal solution may be improved between creation of a node and its treatment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so I put it as info
src/Algorithm/conquer.jl
Outdated
@@ -150,7 +150,10 @@ function run!(algo::ColCutGenConquer, data::ReformData, input::ConquerInput) | |||
colgen_output = run!(algo.colgen, data, OptimizationInput(nodestate)) | |||
update!(nodestate, getoptstate(colgen_output)) | |||
|
|||
while !to_be_pruned(node) && nb_tightening_rounds < algo.max_nb_cut_rounds | |||
subproblem_pruned = getterminationstatus(nodestate) == INFEASIBLE || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name subproblem_pruned
is not good for me, it should be node_pruned
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
src/Algorithm/conquer.jl
Outdated
@@ -150,7 +150,10 @@ function run!(algo::ColCutGenConquer, data::ReformData, input::ConquerInput) | |||
colgen_output = run!(algo.colgen, data, OptimizationInput(nodestate)) | |||
update!(nodestate, getoptstate(colgen_output)) | |||
|
|||
while !to_be_pruned(node) && nb_tightening_rounds < algo.max_nb_cut_rounds | |||
subproblem_pruned = getterminationstatus(nodestate) == INFEASIBLE || | |||
ip_gap_closed(nodestate, atol = algo.colgen.opt_atol, rtol = algo.colgen.opt_rtol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you use algo.colgen.opt_atol
and algo.colgen.opt_rtol
if you defined opt_atol
and opt_rtol
for ColCutGenConquer
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because if ColCutGenConquer
has a smaller tolerance than ColumnGeneration
, the node will be considered as not pruned whereas the ColumnGeneration
will. So we'll have an infinite loop. In the future, I'll create a method init
for algorithms that prepare storages and adjust tolerances if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed like you said and I put a TODO comment in the parameters of the algorithm.
end | ||
|
||
updatedualbound!(tsdata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dual bound calculation of the tree search algorithm should be corrected: the dual bound cannot be better than the worst dual bound of pruned nodes. The latter value should be stored and updated in the tree search data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
Fix #370
OPTIMAL
if the node is pruned,OTHER_LIMIT
otherwise.ColumnGeneration
lp_gap_closed
andip_gap_closed
to check convergence with opt tolerances as kw arguments.