1
$\begingroup$

Does anyone have an idea how to create a custom B&B on CPLEX or GAMS? In my work, I need to add custom cuts on integer solutions in certain conditions by adding only one branch. Also, I need to get the optimal tableau of simplex of the relaxed problem to detect this conditions.

Is there any way to do that without going to do it manually?

I'm using C++.

$\endgroup$

1 Answer 1

1
$\begingroup$

It seems BranchCallback function in cplex. I provide the introduction about BranchCallback on the official website and I did a very simple example by using VS C++ as well.

  1. Cplex website https://www.ibm.com/docs/pt/icos/20.1.0?topic=classes-cplexcallbacksbranchcallback

  2. my github link https://github.com/ytsao/MyBranchAndCut/blob/master/MyBranchAndCut/MyBranchAndCut.cpp

$\endgroup$
3
  • $\begingroup$ Thank you very much for your answer, i just run your example now, but i have not understand how it works ? what is "MyBranchGoal" and if you can explain what your branch do exactly to understand the code. Thanks again $\endgroup$ Commented Mar 7 at 19:24
  • $\begingroup$ For my code, since at that time, I also tried to understand how it works, I just refer the sample code on other websites. I just found the one that introduces it pretty well. tu-chemnitz.de/mathematik/discrete/manuals/cplex/doc/userman/… $\endgroup$
    – ytsao
    Commented Mar 7 at 22:06
  • $\begingroup$ So, for me, I would imagine MyBranchandGoal is a function name to link with cplex engine. You can change any name to whatever you want, just be consistent with the below when you call solve. $\endgroup$
    – ytsao
    Commented Mar 7 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.