Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  addMIPStart: Am I doing something wrong?

    Posted 06/19/12 11:44 AM

    Originally posted by: MarkusS.


    Hello,

    I am trying to add a starting solution in the following way:
    
    cerr<<
    "added start: "; 
    
    for(
    
    int i=0;i<n_nodes;i++) 
    { vars.add(y[i]); 
    
    if(mySolutionPool->mySolutions[epsilon].y[i]>0.9 ) 
    { vals.add(1); cerr<<i<<
    " "; 
    } 
    
    else 
    { vals.add(0); 
    } 
    } 
    
    for(
    
    int i=0;i<n_arcs;i++) 
    { vars.add(x[i]); 
    
    if(mySolutionPool->mySolutions[epsilon].x[i]>0.9 ) 
    { vals.add(1); 
    } 
    
    else 
    { vals.add(0); 
    } 
    } cplex->addMIPStart(vars,vals,IloCplex::MIPStartAuto);
    

    where mySolution contains a feasible solution. However, it does not seem to work, since I get the following output, the line after the warning are the solutions I get when solving, displayed by a incumbent callback.
    
    added start: 38 135 288 312 Warning: Control callbacks may disable some MIP features. 19.5557 38 135 155 198 288 312 15.5557 38 135 288 312
    

    Note that I am adding an additional constraint to the model after adding the MIPStart, could this be the reason it doesn't work?

    Thank you,
    Markus
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: addMIPStart: Am I doing something wrong?

    Posted 06/19/12 06:01 PM

    Originally posted by: SystemAdmin


    > MarkusS. wrote:
    > Note that I am adding an additional constraint to the model after adding the MIPStart, could this be the reason it doesn't work?

    Does the MIPStart satisfy the added constraint? If so, I don't think that's the problem.

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: addMIPStart: Am I doing something wrong?

    Posted 06/20/12 02:25 AM

    Originally posted by: MarkusS.


    Yes, it certainly does. As can be seen in the output, the added starting solution is also the optimal solution, but another solution with worse objective value is found before it.

    Is it possible that something (i.e. a solution) from a previous run (I am iteratively solving ILPs with some changed constraints) interferes?
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: addMIPStart: Am I doing something wrong?

    Posted 06/20/12 07:06 AM

    Originally posted by: SystemAdmin


    Do you see any messages like
    n of N MIP starts provided a solution
     No solution found from N MIP starts
    

    in the output?
    When you add the additional constraint to the model, do you just call model.add() or do you also re-extract the model? Re-extraction of the model will clear the MIP starts.
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: addMIPStart: Am I doing something wrong?

    Posted 06/21/12 01:53 AM

    Originally posted by: MarkusS.


    Thank you, re-extracting was the problem.

    I have s ahort follow-up question: Is CPLEX automatically doing, what I am trying to do (i.e. adds (non-optimal) integer solutions from previous runs to the solution pool)? I am refering to "If you are solving a sequence of problems, for example, by modifying and re-solving the model, CPLEX creates a MIP start corresponding to the incumbent and to each member of the solution pool." in the manual. Is it somehow possible, to only use solutions added myself? Moreover, what is the most elegant way to clear the MIPStarts? Extracting the model, turning the advanced start switch off and on or something else?
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: addMIPStart: Am I doing something wrong?

    Posted 06/21/12 02:20 AM

    Originally posted by: SystemAdmin


    By default CPLEX uses solution pool members from a previous solve as MIP starts. To inhibit this behavior either disable the advanced starting switch or delete the undesired MIP starts using IloCplex::deleteMIPStarts(). If you assign unique names to the MIP starts you create yourself it should be easy to distinguish between MIP starts created by you and those automatically created by CPLEX. Maybe also clear the solution pool using IloCplex::delSolnPoolSolns().
    #CPLEXOptimizers
    #DecisionOptimization