Forum Discussion
FICO
9 months agoCommunity Manager
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...
FICO
9 months agoCommunity Manager
I agree that the toString() function should work. Unfortunately, at the moment it does not and at the moment this is the expected behavior (for the technical reasons described above). I have filed an internal request for improvement. Obviously, printing out a cut for debugging reasons is a very valid use case that should work out of the box.
You get this NullPointerException from XpressProblem.getVariables() because the problem passed into the callback is in presolved state and thus has no Variable instances: interaction with a model in presolved state requires indices rather than Variable instances to reference columns.
So everything boils down to the known limitation that LinExpression.toString() does not work from inside a callback.
Related Content
Related Content
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...2 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread3Views0likes2CommentsVariable 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