Decision Optimization

Decision Optimization

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

 View Only
  • 1.  How does CPLEX decide which item to optimize first?

    Posted Sun August 13, 2023 02:19 AM

    Hi, 

    I am using cplex to organize tasks. To give you a perspective, I am trying to organize tasks that has relationship with other tasks and also has a lag value (how many days until the next task can start). 

    If i have the following input in a dat file:

    Tasks = {

    ....

    <taskID, status, successor list, successor lag> 

    ...

    }

    I notice that if I change the order of the list (each task input in the successor list has an input in the lag list), I get different answers. 

    So my question here is, what are the restrictions that CPLEX has? Do the constraints apply in order? Is there some documentation that I can check to see how cplex work in details?

    To give you an example, we have this input:

    task = {

    ...,

    ...,

    <5, 1, <10, 7, 11, ...>, <284, 0, 0, ....>>

    ...,

    }

    would give me larger result because it tries to optimize task 10 before task 11 or task 7 which has lag 0. 

    if I change the input to this, it gives me better result:
    <5, 1, (7, 11, 10,...), (0,0,284,...)>

    it seems weird that the order matters given that I assume cplex should look at all the input and optimizes the solution based on all the data it has, not by first come first serve basis.



    ------------------------------
    Mohannad Mostafa
    ------------------------------


  • 2.  RE: How does CPLEX decide which item to optimize first?

    Posted Mon August 14, 2023 09:12 AM

    The effect you notice is common to all MIP problems: the progress of the optimizatio depends heavily on the order of the branching variables. And your changes obviously affect this.

    Without knowing the nature of the problem and the influence/importance of the variables CPLEX can only use the results of the branching decisions.

    You should consider giving hints via a branching importance order, since you know better than any software which variables are the most important in your model.

    Sincerely

    Ralf Gollmer



    ------------------------------
    RALF GOLLMER
    Assistent
    Universität Duisburg-Essen
    Essen
    ------------------------------



  • 3.  RE: How does CPLEX decide which item to optimize first?

    Posted Mon August 14, 2023 11:01 AM

    Thank you Ralf for getting back to me. 

    Follow up question, how can I give hints in which branch should be considered first? Is there a way to give priorities to branches or constraints within CPLEX? 

    Is there a way to randomize the search across the branches?

    Also, is there any settings that I can add to cplex to speed the search? 

    Thank you,

    Mohannad



    ------------------------------
    Mohannad Mostafa
    ------------------------------



  • 4.  RE: How does CPLEX decide which item to optimize first?

    Posted Mon August 14, 2023 11:38 AM

    "Which branch should be considered first" can be interpreted in a couple of different ways: on which variable should CPLEX first branch; or, after branching on some integer variable x (say x >= b vs. x <= b-1), should CPLEX first examine the "up" child or the "down" child.

    To influence the choice of variable on which to branch, CPLEX lets you set branching priorities. You can find an example in OPL here. To influence which child CPLEX checks first, CPLEX has a branch direction parameter (which is named "brdir" in OPL).

    As far as settings to speed things up, finding the right settings combination is both NP-hard and very much problem specific. CPLEX provides a tuning tool to assist with it.



    ------------------------------
    Paul Rubin
    Professor Emeritus
    Michigan State University
    ------------------------------