Forum Discussion
FICO
8 months agoCommunity Manager
Implementation of B&B with python
HI! I'm trying to implement a branc-and-bound solver by using the python interface of Xpress. I implemented a MINLP model, and I am trying to solve the linearization with the B&B algorithm. Even t...
FICO
8 months agoCommunity Manager
Dear Daniel and Imre,
thanks to both of you for the answers.
I am trying to implement a specific B&B because the problem is highly nonlinear with some very nasty constraints and the global optimizer has troubles in solving the problem.
- perfect, I will try with both the intsol and the preintsol callbacks. For the gapnotify it does not work because in my problem I do not find a a feasible (for the original problem, before linear reformulation) solution, so it never changes.
- Yes, I'm sure. If I leave MIPLOG set to -n I get output every n-th node, but setting it to 3 I get the information only on the first node. I sent you the codes, so you can see it.
- I have a procedure that tells me whether new nodes are created or nodes are closed (either optimal, infeasible or cutoff). After your answer (thanks) I added also the prenode callback, to have an info on the currently processed node. I was curious whether there was something automatic, since there is the attribute ACTIVENODES I thought it was possible to print the string of those nodes.
- I used it, and the nodes are created from the branches that I defined. I sent you the code (with some explanation) so you can check.
- Ok, thanks for the detailed answer. So in which callback should I call them to see the info on my branching? (I wanted to use them ot check the correctness of point 4)
Thanks a lot for your answer, and I hope you can help me with the codes I sent you!
Related Content
Related Content
- 0Views0likes1Comment
How can I use ODH for solving a MIP model using Xpress Python API?
Hi everyone, I want to play a bit with ODH for Xpress Solver. I did run ODH from the command line but now I want to integrate it in the whole pipeline of a Python program. What should I import? What...1 month agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread4Views0likes2Comments