I am using a cut callback in some python code. Normally, I would follow the example set in the tsp.py code, which does the following:
You can see that it passes the callback "subtourelim" to optimize(). For code organization reasons, I would like to separate these two things, similar to the tsp.cpp example:
// Set callback function
subtourelim cb = subtourelim(vars, n);
// Optimize model
Can this be done in python?
Please sign in to leave a comment.