Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

warmstarting with fixed discrete variables

  • 1.  warmstarting with fixed discrete variables

    Posted Fri November 22, 2019 08:40 AM

    Originally posted by: ops1234


    Hi,

    I have several questions on something I want to do and how to do it in Cplex C API.

    What I want to do is kind of doing a multiobjective optimization. Let's say I have the two objective functions f(x) and g(x) and want to maximize (here f(x) is linear and g(x) is quadratic). I want to prioritize the objective f(x). Instead of the approach to put both objective as weighted sum in a single objective, I do a 2-step approach, where I first solve the model with f(x) as my objective (say f* is the optimal value), and after that put the constraint f(x) >= f* - epsilon into the model, fix the discrete variables (I know that the computed discrete variables from the first solve are optimal), and solve again with g(x) as my new objective (which is then a QP since all discrete variables are fixed).

    So the process would be:

    1. I have a MILP which I solve first with CPXXmipopt(...).

    2. After that I change the objective with CPXXchgqpcoef(...) to a quadratic function and add the constraint above with CPXXaddrows(...).

    3. I fix the integer variables by setting CPXXchgprobtype to CPXPROB_FIXEDMIQP.

    4. I solve the QP with CPXXmipopt(...) or CPXXqpopt(...)?

     

    Is the process above correct and would work in Cplex? Would all this warmstart without problems or does changing the objective and adding a constraint somehow prevents from warmstarting?

    Would this also work if I don't solve the MILP in step 1 but read a MIPstart with CPXXreadcopymipstarts(...)?

     

    Another problem I have is, that I use some lazy cuts with the callback CPXXsetlazyconstraintcallbackfunc(...) in my MILP solving process. If I now fix my problem in step 3 and solve it, the solution might violate some of those lazy cuts right? How would I handle that?

     

    Those are a lot of questions, but I hope some of them can be answered.

     

    Best regards

     

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: warmstarting with fixed discrete variables

    Posted Wed November 27, 2019 03:37 AM

    This won't work since changing the objective function will destroy the resident solution and thus changing the problem type to CPXPROB_FIXED will not work as expected.

    You will have to use CPXXchgbds() to explicitly fix the integer variables to their values in the first solution. With that the problem stays a MIP until presolve, so lazy constraint callbacks should work as expected.


    #CPLEXOptimizers
    #DecisionOptimization