Forum Discussion
FICO
10 years agoCommunity Manager
Implementing 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...
FICO
10 years agoCommunity Manager
With the Xpress-Optimizer, you could implement "lazy constraints" as "delayed rows" (see XPRSloaddelayedrows; or if you are using a modelling tool for stating your problem: Mosel: defdelayedrows, BCL C: XPRBsetdelayed) - however, this means that you need to state all constraints upfront which certainly is impractical in the context of TSP.
Regarding the use of Optimizer callbacks from Java, please take a look at the examples FICO Xpress Examples Repository: Demonstrates setting up and using callbacks (http://examples.xpress.fico.com/example.pl?id=optimizer_java_1) and FICO Xpress Examples Repository: Els - An economic lot-sizing problem solved by cut-and-branch and branch-and-cut heuris… (http://examples.xpress.fico.com/example.pl?id=bcl_java_12_2)
One of the Mosel examples implements a subtour elimination algorithm for TSP, looping over complete MIP solves: FICO Xpress Examples Repository: Air transport (http://examples.xpress.fico.com/example.pl?id=mosel_book_6_11)
which is extended to a heuristic for larger instances in this version of the example: FICO Xpress Examples Repository: Solving the TSP problem by a series of optimization subproblems. (http://examples.xpress.fico.com/example.pl?id=mosel_solv_11)
Below I am attaching an alternative Mosel implementation of the TSP subproblem solving that uses MIP callbacks: if your initial problem statement does not correspond to the full problem and you wish to use the cut manager to add further constraints during the MIP search you need to configure the solver correspondingly (in particular, disable dual reductions).
See PDF attached.
Related Content
Related Content
- 0Views0likes1Comment
Implementation of B&B with python
HI! I'm trying to implement a branc-and-bound solver by using the python interface of Xpress. I implemented a MINLP model, and I am trying to solve the linearization with the B&B algorithm. Even t...8 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum4 unread comments4 unread2Views0likes4CommentsImplementing Lazy Constraints (C++)
I'm implementing a B&Cut algorithm with BCL - C++ using the cut manager callback. Also I have to implement Lazy Constraints, that is, after each integer solution, search the violated constraints and...9 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum5 unread comments5 unread0Views0likes5Comments