Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Error with addMIPStart

    Posted Sat March 31, 2012 06:01 PM

    Originally posted by: SystemAdmin


    code
    IloNumVarArray _vars(env);
    IloNumArray _vals(env);
    for(unsigned int id=0;id<C.size();id++)
    {

    z.add(IloIntVar(env,0,1,var_name));

    if ((id >= _first) && (id < _last))
    {
    _vars.add(zid);
    _vals.add(1);
    }

    .....
    }
    cplex.addMIPStart(_vars,_vals);
    _vals.end();
    _vars.end();
    [/code]

    It displays "CPLEX Error 3003: Not a mixed-integer problem" when I add cplex.addMIPStart(_vars,_vals); (CPLEX12.1)
    otherwise, code works. z is an IloIntVarArray.

    Thanks for your comments
    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: Error with addMIPStart

    Posted Mon April 02, 2012 11:50 AM

    Originally posted by: SystemAdmin


    Does it help to do
    
    cplex.add(IloIntVar(env, 0, 0, 
    "dummy"));
    

    before trying to add a MIP start?
    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: Error with addMIPStart

    Posted Mon April 02, 2012 05:56 PM

    Originally posted by: SystemAdmin


    When I added this line, then it displayed "segmentation fault".
    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: Error with addMIPStart

    Posted Tue April 03, 2012 07:35 AM

    Originally posted by: SystemAdmin


    Sorry, that should of course have been
    
    model.add(IloIntVar(env, 0, 0, 
    "dummy"));
    

    Does this help?

    Another question is: It seems like you don't have any integral variables in your model. So why do you want to add a MIP start?
    Or will you add constraints with integer variables after the MIP start? If so then adding the constraints before adding the MIP starts should also solve the problem.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 5.  Re: Error with addMIPStart

    Posted Tue April 03, 2012 06:28 PM

    Originally posted by: SystemAdmin


    I put addMIPStart in the final line of the procedure. Before i already used this function.

    z contains integral variables : z is an IloIntVarArray
    #DecisionOptimization
    #MathematicalProgramming-General


  • 6.  Re: Error with addMIPStart

    Posted Mon April 16, 2012 04:10 PM

    Originally posted by: SystemAdmin


    I have no idea what might be going wrong.
    Could you export your model to a SAV file (cplex.exportModel("model.sav")) right before you invoke cplex.addMIPStart() and attach the model here? If you cannot do that, what do cplex.getNbinVars() and cplex.getNintVars() return right before cplex.addMIPstart()?
    #DecisionOptimization
    #MathematicalProgramming-General


  • 7.  Re: Error with addMIPStart

    Posted Tue April 03, 2012 10:34 AM

    Originally posted by: SystemAdmin


    Perhaps a silly question, but does z appear in the constraints or objective of your model?

    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)
    #DecisionOptimization
    #MathematicalProgramming-General


  • 8.  Re: Error with addMIPStart

    Posted Tue April 03, 2012 06:25 PM

    Originally posted by: SystemAdmin


    z appears in the objective function and constraints.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 9.  Re: Error with addMIPStart

    Posted Wed June 07, 2017 02:24 AM

    Originally posted by: HamidMelb


     

    Hi,

    I have a problem with warm start of an LP using CPLEX 12.7 (C++). I think it is related to this forum topic. I have a linear programming network model. I want to start with a solution. CPLEX throws an error: "CPLEX 3003: not a mixed integer problem." Cplex recognise my model correctly, but why an LP cannot have a start solution?

    To somehow fix it, I added a dummy integer variable and a dummy  constraint. Then I receive this error: "CPLEX 1017: not available for mixed integer problems." Can you give me hint please?


     

       IloNumVar dummy(env_subp,0,0,ILOINT)
       model.add( dummy ==0 );
    
    ...
    
        for(int k=0; k<N; k++) {
            startVar.add(R[k]);
            startVal.add(Rsoln[k]);
            }
        cpx_subp.addMIPStart(startVar, startVal);
    

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 10.  Re: Error with addMIPStart

    Posted Wed June 07, 2017 02:32 AM

    As the name of the function suggests, a MIP start is only for MIP.

    If you want to provide a starting point for a continuous problem use any of IloCplex::setBasisStatuses() or IloCplex::setStart().


    #DecisionOptimization
    #MathematicalProgramming-General