Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

feeding warm start solutions between cplex runs

  • 1.  feeding warm start solutions between cplex runs

    Posted Wed May 13, 2015 10:50 PM

    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


  • 2.  Re: feeding warm start solutions between cplex runs

    Posted Mon May 18, 2015 12:47 AM

    My first guess would be that this is an issue with numerics. Does the problem persist if you enable CPX_PARAM_NUMERICALEMPHASIS and set CPX_PARAM_EPINT to 0? You could also try to run the conflict refiner on the offending MIP start to try to figure out why CPLEX rejects the MIP start. Maybe there is an unexpected difference in your model and some solutions that are feasible in model A are infeasible in model B. After all, what is the purpose in switching between the two models if they both allow the same set of feasible solutions?


    #CPLEXOptimizers
    #DecisionOptimization