Forum Discussion
FICO
2 months agoCommunity Manager
How to make cuts added in a preIntsol callback globally valid (root node) instead of local to the current subtree?
I'm using the Xpress Optimizer Java API (com.dashoptimization, Xpress 9.4) to solve a MIP with lazy constraints that are generated dynamically. My constraints are all globally valid — they are not lo...
FICO
2 months agoCommunity Manager
Dear Emanuele,
Your approach is correct. Your cuts should be added at integral tree nodes (soltype==0) if the integral solution violates one of your constraints. If the infeasible solution stems from a heuristic (soltype!=0), you can only reject it, not derive a cut from it. In addition, you can hook into the optnode callback to generate violated constraints.
There are a few examples on separating lazy constraints, including in this community: https://community.fico.com/s/question/0D54W00008P73MsSAJ/lazy-cut-callback-in-java. Also check examples around the traveling salesman problem and subtour elimination constraints, available for different APIs: https://examples.xpress.fico.com/example.pl?id=tsp_java.
For the moment, cuts in Xpress are managed locally — it is not possible to add global cuts in the sense of an automation that keeps a cut permanently enforced at the root. We are aware of this limitation and are actively working on solutions that would address use-cases like yours.
Best regards,
Christian Raack
Related Content
Related Content
Are preintsol callbacks threadsafe?
The optimizer documentation states "When the MIP callbacks are called they are MUTEX protected to allow non threadsafe user callbacks." In my Java code for one-tree Benders, if I specify a single thr...9 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum3 unread comments3 unread2Views0likes3CommentsVariable names in callback (Java API)
I construct a cut in a preintsol callback using variables from the model containing the callback. When constructing the model, I give the variables names (using withName(...)) and store them in a vec...9 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum4 unread comments4 unread1View0likes4CommentsVariable object mapping issue in Python Callbacks with Presolve enabled
Hi, I am implementing a Branch-and-Cut algorithm using the Xpress Python interface. I have structured my code as a class where I create variables (using xp.var) and store them in a dictionary attrib...8 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum6 unread comments6 unread0Views0likes6Comments