3

I want to implement a custom variable selection heuristic for solving an MLP using the CPLEX Python API.

Unfortunately, I cannot find any examples or documentation for this.

Ist this actually possible using the CPLEX Python API, or do I need to use C++?

Can I achieve this using the BranchCallback [1]?

[1] https://www.ibm.com/support/knowledgecenter/SSSA5P_12.5.0/ilog.odms.cplex.help/refpythoncplex/html/cplex.callbacks.BranchCallback-class.html

2
  • wich Python API, what are you using? Commented Apr 1, 2019 at 9:50
  • 1
    CPLEX, I edited the question. Commented Apr 1, 2019 at 10:58

1 Answer 1

1

The functionality of the BranchCallback in the CPLEX Python API should be nearly identical to that of BranchCallbackI provided in the C++ API. Parallel callbacks are hindered by the global interpreter lock (aka, the GIL) in Python, however.

The admipex1.py, and admipex3.py Python examples demonstrate how to use the BranchCallback class and are included with CPLEX. For the corresponding C++ examples, see iloadmipex1.cpp and iloadmipex3.cpp.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.