Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  WarmStart with OPL Script

    Posted 08/18/17 09:53 AM

    Originally posted by: naveendivakaran


    Hi,

     

    I am trying to perform a warmstart on my model to see if I can get to an optimal solution faster. I am trying this for the first time, and I might be doing something wrong. I get a warning saying that no solution found from one mip starts. I dont know why I get that. If I see that the values that I am trying to warm start with is feasible, I should expect the warmstart to accept that as a starting solution right? Is it because I am only warmstarting one variable array, when there are multiple other variable arrays that have not been warmstarted. I dont think I have to warmstart all, because I have seen examples where only one variable array is started, and it starts from that solution.

    This is how I am trying to do warm starts:

    Section where I define warmstart array and decision variable

    tuple tisi{int int1;string str1; int int2;};

    {tisi} WSWWIndex = {<itr,ws,ww>|<itr,ws,ww,req> in setToolsReq};

     float warmstart_tool_add[WSWWIndex];

    execute {for(var i in setWarmStart) warmstart_tool_add[WSWWIndex.find(i.int1,i.str1,i.int2)]= i.flt1;};

    dvar int+ tool_add[WSWWIndex];

     

    Section in mainblock where I try to perform warmstart

     

    //warm start
    var vectors = new IloOplCplexVectors();
    vectors.attach(thisOplModel.tool_add,thisOplModel.warmstart_tool_add);//thisOplModel.warmstart_tool_add);
     vectors.setVectors(cplex); 

     

    I am using 12.4 version of CPLEX. I think I am doing something wrong somewhere, I dont know where. If i introduce a constraint that does the following, I do get a feasible solution:

    forall (w in WSWWIndex)
         tool_add[w]
        ==warmstart_tool_add[w];

     

    Please help me understand what I am doing wrong here.

     

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: WarmStart with OPL Script

    Posted 08/22/17 02:10 AM

    Are tool_add the only decision variables in your model? If not then CPLEX will have to find feasible values for the other variables in the model. This can take quite some time, especially if these other variables are of type int or bool. There is a limit on the time CPLEX spends in trying to complete a solution. If CPLEX does not manage to find a feasible solution within that limit then it just gives up.

    If you solve with the constraint tool_add[w] == warmstart_tool_add[w], how many search tree nodes does CPLEX need to find the first feasible solution (this information should be available in the engine log)?


    #DecisionOptimization
    #OPLusingCPLEXOptimizer