-
Notifications
You must be signed in to change notification settings - Fork 69
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
I want to implement a branch and bound algorithm. How to warm start dual simplex in Cylp? #108
Comments
I found @tkralphs has implemented a CuPPy package using the Cutting Plane algorithm to solve MIP. But the code just uses the primal simplex algorithm. It did not use the simplex information to warm start. Are there some difficulties to warm start? I'm a Ph.D. student, I want to implement my own solver to understand this subject deeply. I would appreciate it a lot if you can give me some advice. |
The way simplex is called in CuPPY does in fact do the warm start.
If you don't want warm-starting, you can explicitly call In case you are interested, I also have Python branch-and-bound implementation here, which you may want to look at. It currently uses PuLP as the LP interface, but I was planning to change to CyLP when I get some time. I will integrate cutting plane generation to get a full branch-and-cut. |
Thanks a lot. I'll first read your code and then implement my solver. I'm a little confused about the warm start. I'm taking an integer course now. It seems when adding a constraint or changing a variable bound, The primal feasibility isn't satisfied. It's better to use dual simplex. Do you know any document about CLP which explaining the details of simplex? Thanks a lot. |
Yeah, you're right, it should be |
Ok, I'm writing the code now. I want it to be a general framework support B&B, cutting plane, and other methods like column generation and decomposition methods. Like you, I write it mainly for educational purposes. I already finished B&B. After I finished cutting plane algorithm, I will open-source it. If I have some other questions, I then ask you. Thanks a lot. |
I have finished my first edition. |
Your framework looks nice, along the lines of the abstractions in Alps. It would be interesting to put a Python wrapper around Alps and allow the branching and bounding methods to be written in Python, while the search is done using the Alps library itself. I'm teaching integer programming next semester and since this is along the lines of what I tended to do with the Python branch-and-bound in GrUMPy, I may use and contribute to it. I do have one request. I noticed that you put a copy of CuPPy in your repository and I think you copied and modified some stuff from it in other places. Meanwhile, your code doesn't have a license. I have been remiss in putting license and copyright information into the source files of CuPPy, as no one was really using it anyway. Since CuPPy is on Pypi and is easily installed with I should also point out DipPy, which is a Python wrapper around Dip. It already allows you to do cut and column generation in Python, while utilizing a state-of-the-art branch-cut-and-price framework underneath. That is probably not what you're going for, but thought I would point it out. |
Ok, I had included an EPL license. I'm a novice to open source code. I think this license will give you freedom to do your own job. |
I have tried GrUMPy. The cutting plane part works well. But I can't get the B&B tree as your image. I wrote my test result in an issue. I think it is because of the python's version. |
Hello. I'm now improving my code to warm start simplex using the dual simplex algorithm. I want to use the basises information of a parent node to accelerate the child node. In my implementation, these two nodes are two simplex objects.
The following code is from the example of CLP.
I think it may be useful. |
I add the following code in the CyClpSimplex.pyx
But it doesn't work.
It is very strange if I change print(123) to print(123 |
I adopted the following steps. It works fine.
Then I use
Then I call setBasisStatus and directly assign the dual variable values with the optimal value. It works normally and says optimal arrived. The LP iterations equal 0.
Following is the output
|
Hello, I'm trying to implement my own simple branch and bound algorithm using Cylp. I want to use the basis in the parent node to warm start the child node. In the CyClpSimplex, I didn't find any API to do this. In this page, https://www.coin-or.org/Doxygen/Clp/classCoinWarmStartPrimalDual.html, I find that Clp support warm start. Do you have some idea? Thanks a lot.
The text was updated successfully, but these errors were encountered: