Originally posted by: SystemAdmin
[ttclw said:]
Hi Chris,
Thanks for your advise. I've figured out how the makeBranch method can add a set of constraints (from reading the API java-docs) and I'm on the track you've pointed to me right now. My questions are more about technical issues of implementing branch-and-price by using CPLEX and Java.
Since the branch-and-price scheme needs to solve a pair of master-sub problems at each node of the branch-and-bound tree, I suppose that I need to insert the while loop in the makeBranch method that generates new columns to the master. Questions are:
1) where & when the master is first solved? It seems to me that the .solve() of CPLEX for the master problem is implicit in the makeBranch call, so I wonder where & when this .solve() thing is done, because I need to grab the dual prices to kick off the sub-problem loop and generate columns. Or, the master is solved immediately when the procedure enters the makeBranch method. If so, can I grab the duals at the beginning of the makeBranch method?
2) how do I pass constraints to the corresponding sub-problem at each node? Yes, we can pass a set of new constraints to the new master problems at child nodes according to our branching scheme (and thanks for your suggestion of nested branching). Since the branching is based on "original" variables (not the modelled variables, i.e. x(r)), it's hard to pass the corresponding constraints of x(s in S) >= 1 (for instance) to its sub problem, because the sub-problem is modelled as a network problem (to search for the shortest routes). The arguments we can pass via makeBranch is a set of constraints for new master problems. How can we achieve the new constraint passing for the sub via makeBranch? Or, we need a 'translation' method here?
By the way, thanks for the paper. A good one, indeed. Well written. ^_*
thanks,
TTCLW@Sydney
[quote author=ChrisHane link=topic=130.msg324#msg324 date=1198185784]
Hello,
When you call one of the makeBranch methods of the branch callback object you may specify the set of constraints that define the new node(s). The cuts are not just x(i) <= k or x(i) >= k+1, but two sets of constraints.
If your model has a variable, x(r), for each route, then the branch to force the choice of customer B follows customer A is a constraint of the form sum x(s in S) >= 1, where S includes all routes that visit A then B, the other branch is sum (x in S) <= 0 (do not choose any route that goes from A to B).<br />
There are various choices to make for the set S. Does S include all routes, only routes of a certain vehicle type, or 1 specific vehicle? You may consider nesting these choices, i.e after branching on A must precede B, then branch on the vehicle type before the specific vehicle.
In addition to writing the branch callback you will need to consider implementing node selection and perhaps other control callbacks. These are documented at ILOG CPLEX 11.0 User's Manual > Advanced Programming Techniques > Advanced MIP Control Interface.
You may want to also refer to "USING BRANCH-AND-PRICE-AND-CUT TO SOLVE ORIGIN DESTINATION INTEGER MULTICOMMODITY FLOW PROBLEMS" by Barnhart et al, Operations Research Vol. 48, No. 2, Marchââ¬âApril 2000, pp. 318ââ¬â326. This paper gives a detailed explanation of branching on edges in a path based model while preserving the ability to use shortest path column generation in branch and price.
Good Luck!
Chris
#CPLEXOptimizers#DecisionOptimization