fico® xpress
1150 TopicsHow can I use ODH for solving a MIP model using Xpress Python API?
Hi everyone, I want to play a bit with ODH for Xpress Solver. I did run ODH from the command line but now I want to integrate it in the whole pipeline of a Python program. What should I import? What are the functions/methods to use? Could you provide with a simple Python code snippet? Are there any example I could use to understand the minimum steps to launch ODH with the Xpress Solver? Thanks in advance!2Views0likes2CommentsHow 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 local to any node. Current approach: I register a preIntsol callback (AbstractPreIntsolListener). When a candidate integer solution is found, I check it, and if it violates one of my lazy constraints I build the cut, presolve it, and add it with prob.addCut(). I've disabled dual reductions (setMIPDualReductions(0)) as required for lazy constraints. This works correctly, but as I understand it XPRSaddcuts activates the cut at the current node and its descendants only. When the search backtracks above that node, the cut is deactivated (kept in the pool, but no longer in the active LP). Because my cuts are globally valid, this is safe, but it's inefficient: the same infeasible integer solution can be rediscovered elsewhere in the tree, re-triggering my callback to re-derive cuts I already found. What I want: I'd like each generated cut to be treated as globally valid — effectively added at the root node — so it stays active throughout the whole branch-and-bound tree and is never re-derived. Is there a way to add a cut from within a callback and have it applied globally (root node), rather than only to the current node's subtree?2Views0likes2CommentsIntroducing MoselPy: A Python Interface for FICO® Xpress Mosel
MoselPy is a new Python package that provides bindings to FICO® Xpress Mosel, enabling Python applications to compile and run Mosel models and to exchange data with them directly. Data can be passed in memory through the moselpy I/O driver, and Mosel3Views0likes0Comments
