Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Initial Feasible solution to MIP problem

    Posted Thu January 05, 2012 05:34 PM

    Originally posted by: kaarthiksundar


    I wanted to know how to do the following in an MIP problem.

    I generate a feasible solution to the MIP problem using some heuristic that I come up with.
    What is the way in which I can ask the solver to use the feasible solution that my heuristic generates
    as the initial solution - the MIPStart solution. This i see can reduce the search space and the size of the tree

    Kaarthik
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Initial Feasible solution to MIP problem

    Posted Thu January 05, 2012 06:00 PM

    Originally posted by: NikhilaArkalgud


    There are several ways to provide an initial starting solution to MIP in CPLEX. CPLEX can accept multiple starting solutions. You can establish MIP starting values by using the method addMIPStart in a Concert Technology application, or by using CPXaddmipstarts in a Callable Library application. You can also create a MST format file to read in the starting values. You will find the following documentation section useful, it lists the methods used to read/modify and write in the starting values.
    >>
    CPLEX > Guide to API reference manuals of CPLEX > Overview of the APIs of CPLEX > Using MIP starts

    http://publib.boulder.ibm.com/infocenter/cosinfoc/v12r4/topic/ilog.odms.cplex.help/CPLEX/Overview_of_APIs/topics/MIP_starts.html?resultof=%22%4d%49%50%22%20%22%6d%69%70%22%20%22%73%74%61%72%74%22%20
    >>
    Hope this helps,
    Nikhila.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Initial Feasible solution to MIP problem

    Posted Sat January 07, 2012 05:46 PM

    Originally posted by: kaarthiksundar


    Thanks,

    But the problem is I do the two methods specified in those links and have tried both the setvector and addMIPStart. This is what I did and it seems to have no effect on the way cplex solves the problem

    IloNumArray vals(env);
    IloNumVarArray vars(env);
    for(int i = 0; i < NoOfTargets; i++)
    {
    for(int j = 0; j < NoOfTargets; j++)
    {
    vars.add(x[i][j]);
    vals.add(initial[i][j]);
    }
    }

    IloCplex cplex(model);
    //cplex.setVectors(vals, 0, vars, 0, 0, 0);
    cplex.addMIPStart(vars,vals);
    cplex.extract(model);
    cplex.solve();

    Regards
    Kaarthik
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Initial Feasible solution to MIP problem

    Posted Sat January 07, 2012 07:54 PM

    Originally posted by: SystemAdmin


    Extracting the model (using 'cplex.extract(model);') after the addMIPStart or setVectors call, will result in the loss of the MIP start. Could you try extracting the model before the MIP start calls and then see if helps you get the expected results. You also may want to look at an existing technote on this approach:

    http://www-01.ibm.com/support/docview.wss?uid=swg21568609
    #CPLEXOptimizers
    #DecisionOptimization