Forum Discussion
FICO
5 years agoCommunity Manager
Lazy cut callback in Java
In Java, how can one separate cuts in a lazy manner, i.e. only separate cuts at the integer nodes? Such an approach is common in for instance a standard TSP formulation where the subtour elimination ...
FICO
5 years agoCommunity Manager
Cuts are expected to be added in the 'OPTNODE' callback (so XPRSoptNodeListener from Java). Regarding the use of this callback for the implementation of TSP subtour elimination constraints you may want to take a look at the example f5touroptcbrandom.mos that shows an implementation with Mosel (the use of the Optimizer callbacks follows the same logic as what one would employ in a Java program): within the implementation of the OPTNODE callback function the solver parameter MIPINFEAS is queried to decide whether to trigger cut generation.
Related Content
Related Content
Variable 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 unread1View0likes4CommentsAre 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 unread3Views0likes3CommentsImplementing Lazy Constraints (Java)
We are interested in using Lazy Constraints in Xpress (Java) to implement a TSP algorithm. In particular, after each integer solution is generated, we would like to search for violated constraints an...10 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum6 unread comments6 unread0Views0likes6Comments