Forum Discussion
FICO
1 year agoCommunity Manager
getCallbackSolution failing and yielding error 422 inside a chgbranchobject callback?
Hi sll,I'm using the Python API of the Xpress Optimizer to try and implement through the addcbchgbranchobject callback a custom branching choice during a MIP search.According to the reference manual,...
FICO
1 year agoCommunity Manager
According to the documentation getCallbackSolution() from within a chgbranchobject callback should indeed return the current relaxation.
I cannot reproduce your problem, though. I tried several problems with Xpress 45.1.2 and called getCallbackSolution() for each and every invocation of the callback. I did not observe any problem.
What version of Xpress are you using? What object are you calling getCallbackSolution() on? You must call it on the problem object that is passed as first argument into the callback, not on the problem object on which you called optimize(). Can you share your code or provide a short example that reproduces the problem?
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 unread1View0likes6Comments