I'm trying to figure out how to warm start the quadratic programming solver(s) for CPLEX. I am specifically interested in warm starting the QP solver for nonconvex quadratic programs terminating at first-order stationary points.
I believe the start() function should do this, but I can't figure out how to have the solver use the starting data.
def setproblemdata(p):
p.objective.set_sense(p.objective.sense.minimize)
target = p.parameters.optimalitytarget.values
p.parameters.optimalitytarget.set(target.first_order)
p.linear_constraints.add(rhs=[20.0, 30.0], senses="LL")
obj = [1.0, 2.0, 3.0]
ub = [40.0, cplex.infinity, cplex.infinity]
cols = [[[0, 1], [-1.0, 1.0]],
[[0, 1], [1.0, -3.0]],
[[0, 1], [1.0, 1.0]]]
p.variables.add(obj=obj, ub=ub, columns=cols,
names=["one", "two", "three"])
qmat = [[[0, 1, 2], [0.0, -1.0, 0.0]],
[[0, 1, 2], [-1.0, 2.0, -1.0]],
[[0, 1, 2], [0.0, -1.0, 2.0]]]
p.objective.set_quadratic(qmat)
p.parameters.advance.set(2)
s = p.start.status
def qpex1():
p = cplex.Cplex()
setproblemdata(p)
p.start.set_start([], [], [40.000000, 24.333333, 10.666667], [], [], [])
p.solve()
My starting point is at the first-order stationary point CPLEX outputs, but I am finding it not responding to my input.
Under the hood, the Cplex.start.set_start method calls CPXcopystart in the C Callable Library. From the documentation of CPXcopystart
it says:
Starting information is not applicable to the barrier optimizer nor to the mixed integer optimizer (MIP).
So, it is expected that the starting information is ignored in your test program above.