Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Get the fixed variables during cutcallback

    Posted 07/10/12 01:38 PM

    Originally posted by: YongjiaSong


    Hi all,

    I have a question about getting the variables that are fixed during B&B tree in the cutcallback. More specifically, I only focus on the variables that are fixed NOT because of branching, in this sense, those variables are fixed forever and can be seen as constants essentially. Is there any way to get them? Thanks.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Get the fixed variables during cutcallback

    Posted 07/10/12 06:15 PM

    Originally posted by: SystemAdmin


    I'm not sure I follow your comment about "fixed forever". Any time you branch on a variable, that variable is fixed everywhere in the subtree below; but I'm pretty sure that's also true for variables that CPLEX fixes not by branching but due to bounds, reduced costs etc.

    In any event, I think the following approach would work. It's contingent on the notion that the fixed variables are those which have lower bound equal to upper bound. I'm pretty sure that's how CPLEX handles fixing a variable, but I can't swear to it.

    Use a branch callback to take track of branching. In the branch callback, ask CPLEX how it would branch and then branch exactly that way, but with one additional step. You attach a node data object to each node, containing a set of variables fixed by branching. Each child inherits the set its parent had, plus the variable on which you branched to create that child. Thus at every node you have a set of all "fixed forever" variables. (Alternatively, you can have the branch callback just attach an empty set to children of the root node and the parent's set to children of other nodes, and then have a node callback get the branch variable used to create the current node and the node data, and add the branch variable to the node data.)

    Now you attach any type of control callback (branch, cut, heuristic, ...) and have it access the lower and upper bounds of the variables and the node data. Compare the bounds and find those variables where the bounds are equal. Remove the variables from the set in the node data, and what is left are the variables fixed by means other than branching.

    I think.

    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)
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Get the fixed variables during cutcallback

    Posted 07/11/12 02:04 PM

    Originally posted by: YongjiaSong


    Thanks Paul.

    Yes, what I mean by "fixed forever" is that, variables that CPLEX fixes not by branching but due to bounds, reduced costs.

    One thing that is uncertain is how CPLEX deals with those variables, we cannot tell if a variable is fixed locally even if its upper bound equals its lower bound, but not because of branching.

    Best,
    #CPLEXOptimizers
    #DecisionOptimization