Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Possibilities with Callbacks in B&C (Java API)

    Posted 05/02/16 10:48 AM

    Originally posted by: LilTiti


    Hello,

    I'm working on the possibilities I have using CPLEX callbacks on a Java application which solves a graph clustering problem. I read the doc about Callback classes and I'm not sure of the possibilities I have. Specifically, I solve the problem (as a linear program with binary variables problem) and then let the user change some details (e.g. : fix the value of one or more variables). To reduce the process time, I want to use the first process. What could I do ?  Save some data during the first B&C process and use this data for the next process, choose at which node I start the next B&C process, if I am at a node which branchs on a user-fixed variable -> cut the branch which is not interested for us...

    I'm certainly too vague, because I don't already know which way I'm going, which Callback I'll use... Sorry for that !


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Possibilities with Callbacks in B&C (Java API)

    Posted 05/02/16 04:14 PM

    Originally posted by: AndreaTramontani


    Hello,

    I'm sorry but I don't think that what you have in mind would be correct.
    If you change the problem (e.g., you fix one variable or more generally you add a constraint), then the tree search associated with the first run becomes invalid.
    This is because by adding a constraint you are changing the set of feasible solutions, and potentially the set of optimal solutions.
    Thus, any dual reduction that CPLEX might have decided to apply in the first run might become invalid.
    And, even if you explicitly disabled dual reductions (this could be done with a parameter), the tree search would be invalid anyway.

     

    Indeed, suppose that the set of feasible solutions in the first problem is S1, while the set of feasible solutions for the second problem is S2, that is a subset of S1.
    Then, in the first run, CPLEX is allowed to prune nodes as it prefers, provided that at least one optimal solution in S1 is kept along the process.
    This means that all optimal solutions of S2 could be pruned along the run, and thus, after modifying the problem, you need to restart the run from scratch.

     

    What you could try to do is to retrieve the best feasible solution or, better, all the feasible solutions stored in the solution pool, and the end of the first run.
    For this, you don't need to use any callback, but just the "regular" APIs to query the solution pool at the end of optimization.
    Then, if any of these solutions remain feasible even after changing the problem, it can be used as mipstart for the second run, and hopefully it will speed up the solution process.
    If the solutions you get from CPLEX, after the first run, become all infeasible because of the additional constraints, you can think of trying some heuristic, exploiting the knowledge you have about your problem, to "repair" them and find a solution feasible for the new problem.
    Or you can just give those infeasible solutions to CPLEX as mipstarts. In that case, CPLEX will do some quick try to repair them, in order to find a feasible solution for the new run. Of course, CPLEX might fail to repair an infeasible solution provided from the user, and in this case it will just start without an incumbent (as in the first run).

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Possibilities with Callbacks in B&C (Java API)

    Posted 05/03/16 05:09 AM

    Originally posted by: LilTiti


    Thanks for the clear answer. I did not study far enough the problem to see this problem with the tree..


    #CPLEXOptimizers
    #DecisionOptimization