Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How do I fix all integer variables?

    Posted 11/24/19 11:40 AM

    Originally posted by: ops1234


    Hi,

    what I want to do is first solve an MILP with CPXXmipopt(...),

    then fix all integer variables to the values of the computed solution,

    change the objective function and solve the problem again with CPXXmipopt(...) with the fixed integer variables and new objective.

     

    I tried it with setting the problem type with CPXXchgprobtype to CPXPROB_FIXEDMILP, but then I get problems with changing the objective. And my MILP solving process uses lazy constraint callbacks, which won't work anymore when I solve the fixed MILP with CPXXlpopt(...), right?

     

    Is there an elegant way to do this, or do I have to manually add constraints that sets each integer variable to the computed value?

    I think it would already help, if I could somehow find out which index from the solution vector was an integer variable. Is there a way to do it?

     

    Best regards,

    ops


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How do I fix all integer variables?

    Posted 11/27/19 03:28 AM

    Correct, CPXPROB_FIXEDMILP is not designed for this use case.

    You can use CPXXchgbds() to fix the variables to the solutions values (use an lu value of 'B' to indicate that for a variable both bounds should be changed).


    #CPLEXOptimizers
    #DecisionOptimization