Originally posted by: prashanw
I have the following questions
1. I have 2 versions of the mip and I run them alternatively in a loop.
step 0: Initialize and Run version_A
step 1: Feed results from version_A as a warm start to version_B
step 2: Run version_B.
step 3: Feed results from version_B as a warm start to version_A.
step 4: Run version_A
Go back to step 1.
The idea is as the iterations increase the objective keeps going down. The difference between version_A and version_B are in the constraints (the objective is the same). When I feed a solution from one version to another I feed all the variables
sp=cplex.SparsePair(my_prob_prev.variables.get_names(),my_prob_prev.solution.get_values())
my_prob.MIP_starts.add(sp,4,"ws")
where
the previous solution -> my_prob_prev
current solution -> my_prob
I also do the following check to ensure that the variable names are in order
my_prob_prev.variables.get_names()==my_prob.variables.get_names()
I run this for
(i) 100 points with 3 features
(ii) 100 points with 10 features
When I do this sometimes the warm starts are rejected or retained for possible repair. When warm start rejection happens it defeats the purpose of the whole iterative process because the search starts from the beginning.On another note this shouldn't happen at all since the previous solution is a viable solution that was a result from an optimization run. I tried playing around with presolve, emphasis, mip warm start effort levels , repair retries,advanced start switch, integrality and a lot of other stuff but I really can't pin point where its going wrong. In some cases(specially for 100 points with 3 features) the process runs smoothly without the warm start being rejected. In other instances (100 points with 10 features) the warm start is rejected at least a couple of times. Right now I have the following setting
emphasis : 1 =
Emphasize feasibility over optimality
MIP warm start effort level : repair = 4
advanced start switch : 1 = Use an advanced basis supplied by the user
presolve switch : 0 = Do not apply presolve (because if I had presolve on it would return with CPLEX error : no solution exists)
the relative and absolute mip gaps are set to default.
tolerances.integrality: 0
parameters.timelimit: 300s
2. Does the fact that the constraints are changes from version_A to version_B have an effect on this issue?
I guess my main requirement is getting a solution from one run and using it to warm start the other without having the warm start solution being thrown away by CPLEX!
my main problem is basically
"Retaining values of one MIP start for possible repair". that happens in a certain iteration
I would greatly appreciate any help!
#CPLEXOptimizers#DecisionOptimization