-
Notifications
You must be signed in to change notification settings - Fork 43
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
ColGen Iteration & Phases API #759
Conversation
ping @rrsadykov @artalvpes |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #759 +/- ##
===========================================
+ Coverage 1.91% 19.34% +17.43%
===========================================
Files 58 62 +4
Lines 5337 5501 +164
===========================================
+ Hits 102 1064 +962
+ Misses 5235 4437 -798
... and 21 files with indirect coverage changes 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 in Codecov by Sentry. |
Guillaume @guimarqu, You say that "It allows us to easily test the main definition of the algorithm". Can you give example(s) of the tests you can do without creating (re)formulations? The API for the column generation you prepare will be used only for two implementations (fake one for the tests and the normal one for standard col.gen.) or there will other implementations? For the API itself, I find it ok. The only thing: why you have loop arcs for essential cut separation? I do not think that it is necessary to restart a phase when we add a violated cut, we can just resolve the master and continue to generate columns. Ruslan |
Example for the tree search interface: We need to test the boundaries carefully. In colgen: what should happen if the master optimization fails (define behavior for each termination status), same for subproblems. What should be the return status if the time limit is reached, and max nb of iterations is reached? Make sure all the transitions work. We can do that quite easily only if we stop testing the column generation as a black box. |
Thanks, Guillaume, I will study the interface for the tree search, I forgot it already. Normally, for an API there should be at least two uses. We can say here that it will be used for tests for the default implementation. Thus it is ok for me. |
I'll update the description from time to time to take into account the feedback
Defining interfaces make algorithms easier to test, document, and customize.
It should lead to:
The main definition of the algorithm must be independent of MathProg.
It allows us to easily test the main definition of the algorithm with stub & fake methods of the interface.
The default implementation of the interface has dependencies with Coluna MathProg/Base…
It’s not easy to test because it usually requires the creation of a formulation/reformulation.
Column generation
I'm preparing the API for column generation. I suggest three generic methods for this algorithm:
1.
A first one that "iterates" on column generation phases (phase 1, phase 2, phase 3)
I think this one is ok.
2.
A second is the main column generation algorithm
3.
A third one is an iteration of the column generation
WIP (stabilization, cuts, error handling)
These three methods should only depend on the ColGen interface. They should not call any other methods from Coluna that manipulated complicated objects. Otherwise, it will be a pain to test them.
Sequence of phases
This is the first suggestion for the implementation of
next_phase
:Edits:
run_colgen_iteration
(comments of fv & Ruslan)