I have a set of many similar linear programs (LP). All these LPs have the same objective function, and almost all constraints are the same. The only difference is for one linear constraint $f(x)=a_{i}$, where $a_{i}$ is a constant that changes from one LP to the next. Instead of solving each LP from scratch, I am trying to use the information from the first LP problem to solve the other LPs more quickly.
Thanks to this conversation, I was told that this kind of change preserves dual feasibility, so I should apply the dual simplex method with a warm start from the previous optimal basis.
Based on this suggestion, I was trying to iteratively warm start LP number $i$ with the optimal solution from LP number $(i-1)$. Concretely, I was using the following steps using PuLP with Gurobi:
- Update the only constraint that changes in the LP:
prob.constraints['cst_a'] += a[i-1] - a[i]
- Set the initial value to all LP variables:
for t in ts: varProb[t].setInitialValue(optimalVarPreviousProb[t])
- Solve the new LP using warm start and dual simplex:
prob.solve(pulp.GUROBI_CMD(logPath="LogFile.log", warmStart=True, options=[("method",1)]))
However, I was surprised to see that the total computation time did not decrease. If anything, it actually increased slightly (certainly due to the extra time to set initial values).
I compared the log files with and without warm starting the problem, and the number of dual simplex iterations for each LP is exactly the same. In other words, it looks like the warm starting did not do anything.
Actually, the log file does not seem to acknowledge any warm starting. But when I use warm start with MILP problems, the log file does acknowledge the use of a "User MIP start". Does that mean LP warm start does not work with PuLP and/or Gurobi?
Any other idea what I could be doing wrong?