Forum Discussion
FICO
6 years agoCommunity Manager
How to solve MPEC (non-convex QCQP) through Python API?
I am trying to solve MPEC (non-convex QCQP) with Xpress through the Python API. I am running v8.5.13 (due to institutional license).
I get the following error: ?900 Warning: The quadratic part of row 'xx' defines a nonconvex region. Please check your model or use Xpress-SLP
I have tried turning off the convexity check and forcing the solver to Xpress-SLP as stated in the API guide.
However then I get a 'lp_unsolved' error.
Does this mean that there is an issue with my problem or with the solver settings?
I have a MILP reformulation which works correctly but is fairly slow, so am looking to use the MPEC solution information to reduce the MILP computational time.
Thanks,
Saurab
3 Replies
- FICOCommunity Manager
Do you solve the problem with the solve() method? If so, the library might be attempting to use the Optimizer's QP solver. Can you try replacing
p.solve()
with
p.nlpoptimize()
and see if this works? The latter calls the nonlinear solver directly.
Hope this helps.
- FICOCommunity Manager
Thank you! Works perfectly now.
One additional question, what is the simplest way to set initial values of the decision variables for the problem?
- FICOCommunity Manager
Hi, a starting solution can be specified by either setting the xslp_defaultiv control (which sets all variables to one value) as follows:
p = xpress.problem()
p.controls.xslp_defaultiv = 42
or using the xpress.problem.loadvars() method, which allows for setting a differnet initial value for each variable.
Hope this helps.
Related Content
Related Content
Final solution of a nonlinear non-convex problem solved with Knitro (via Xpress) looks worse than the initial solution
Dear all, I have a couple of questions on the use of the procedure setinitval and more in general on the use of an initial solution for solving a nonlinear problem. I am solving a series of nonline...4 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum7 unread comments7 unread1View0likes7CommentsIs an interface between Xpress-Mosel and the global (non-convex) optimization solvers Baron or Antigone possible?
I'm working for several years in a PhD-project on engineering problems in membrane cascades containing bilinear terms (MINLP). We initially tried to solve the generated problems with (I presume an SL...6 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread0Views0likes2Comments