Chapter 7 A Layered Branch-and-Bound algorithm to portfolio selection problems
7.3 The Layered Branch-and-Bound algorithm
7.3.1 The Branch-and-Bound algorithm
As we introduced in section 2.3, The B&B algorithm is a general technique for finding optimal solutions of various optimisation problems, especially in integer and combinatorial optimisation. It systematically enumerates all candidate solutions through a tree search. The main idea of B&B is to prune large subsets of unpromising candidates (branches) by using estimated upper and lower bounds of the objective function to be optimised [8].
The B&B algorithm generally consists of two main procedures [144]. The first one, calledbranching, is a splitting procedure that creates child nodes from the parent node in the tree. The other procedure, calledbounding, computes the upper and lower bounds of the objective function during the search.
We calculate the lower bound in our convex MIQP by replacing the integer variables with continuous ones. This relaxation of the MIQP is Quadratic Programming with linear constraints and its quadratic matrix is positive semi-definite. Therefore, it is easy to solve with various solution methods (such as extensions of the Simplex method and interior point method, etc). We denote the optimal solution values of this continuous relaxation as x.
If xare integer values, then x represents the optimal solution and the problem is solved. Otherwise, those integer variables xi with non-integer values are chosen for branching.
One of the most common ways of branching is to create two subproblems (or nodes) on the floor value xi (the largest integer smaller than xi) and the ceiling value xi (the
smallest integer larger thanxi), respectively. These two subproblems are stored in a list
of open nodes. Then, at each subsequent iteration of the algorithm, a subproblem is chosen, and the continuous relaxation of the current node is solved, providing a lower
bound. The enumeration at the current node stops if any of the three following conditions are met:
•The continuous relaxation is infeasible (pruning by infeasibility);
•The optimal solution of the continuous relaxation (lower bound) is not better than the value of the best integer feasible solution found so far (upper bound) (pruning by bounds);
•The optimal solution of the continuous relaxation is integer (pruning by optimality).
If the optimal solution of the continuous relaxation cannot be pruned, one of the integer variables with infeasible values is then chosen for branching, and two new subproblems are then added to the list of open nodes. This iterative process in the search tree continues until the list of open subproblems is empty. Fig. 7.1 presents the B&B algorithm.
Fig. 7.1 The Branch-and-Bound algorithm [8]
The pseudo code in Fig.7.1 describes how B&B algorithm exploits the nodes in the tree by the branching and bounding procedures. There are various branching and bounding procedures investigated in research. These branching heuristics [145] and bounding methods [146] are plugged in the B&B algorithm in Fig. 7.1, i.e. line 9 and line 4 correspondingly.
1:Incumbent:=;Open:={ (P0, )}; // set the upper bound as ,Open: the list of open nodes 2: Repeat untilOpen= ;
3: Select the nodePfromOpento be processed;Open:=Open\ {P}; 4: BoundP:LBP:=g(P) // function g(P) calculates the lower bound ofP 5: IfLBP=f(X) for a feasible solutionXandf(X)< Incumbentthen 6: Incumbent:=f(X);Solution:=X;
7: go to EndBound;
8: IfLBP Incumbentthen pruneP 9: Else Branch onP, generatingP1…,Pk;
10: Open:=Open {(Pi;LBP)},i= 1, …,k; 11: EndBound;
7.3.2 The Layered Branch-and-Bound algorithm
One of the key factors in the B&B procedure is the branching rule, i.e. which variable to branch first. The MIQP model we build contains additional constraints defined by three different groups of variables: continuous variables wi, binary variables zi and general
integer variablesloti. To each assetai,zi indicates if the asset is held;loti indicates how
much to hold. We can thus solve the problem by firstly deciding which assets will be held, and then deciding how much of each asset should be held. This motivates the devise of our proposed layered B&B algorithm.
…... …... …... …... V1 V2
Fig. 7.2 Illustration of layered B&B algorithm. Spots without descendant nodes represent the leaf nodes and circles represent the open nodes as shown in Fig. 7.1
The idea of the layered B&B is that we split the B&B tree into certain layers which correspond to subsets of variables V1, V2 …. The variables with the same feature are
solved within the same layer of the tree, and different ones are processed in different layers. Fig. 7.2 illustrates this idea, where the first layer consists of the binary variables
zi, and continuous variables wi. The general integer variables lotiis added to the second
layer. The B&B search will perform on the top layer firstly to instantiated the binary variables zi, and continuous variables wi. Based on the instantiations of zi, and wi, the
search goes down to the second layer where the general integer variableslotiare present.
By layering the tree, we actually perform an implicit decomposition on the process of solving the original problem. The idea is that we focus on the core variables of the problem first, and perform intensive search on them before we deal with the rest of the variables.
The pseudo-code of the layered B&B is outlined in Fig. 7.3. The first three lines define the branch and node selection heuristics which are applied to different layers of the search tree. Firstly, model V1 (corresponds to layer one) is built that only consists of
binary variables zi and continuous variables wi. The problem is solved with the help of
branch and node selection heuristics (line 5). When the stopping condition is met, (i.e. a feasible or the optimal solution of problemV1is obtained), the search on the top layer is
terminated and the incumbent solution is saved. Next, problemV1is modified by adding
variables on the second layer, the general integer variablesloti, to build problemV2. The
search is continued on the second layer for problem V2 with its own heuristics (line 9).
Note that the search performed on the second layer does not start from scratch, but is based on the solution obtained from the previous layer (line 8).
There is certain restriction in creating this layered B&B for the problem at hand. The variable in the objective function (i.e.wi) must be all instantiated in the top layer. This is
ensured by building the modelV1on the top layer on binary variables ziand continuous
variables wi. After the search on the top layer, the incumbent solution (i.e. value
assignments toziandwi) is saved and fed to the second layer to continue the search.
Fig. 7.3 The pseudo-code of the layered B&B algorithm 1: void L-BranchRule();
2: void L-NodeSelection(); 3: void L-RoundHeuristic(); 4: model(V1);
5: if (B&B(V1, L-BranchRule(),L-NodeSection()) == feasible or optimal 6: solutionVector := getIncumbentSolution();
7: V2= modify model(V1); 8: setSolution(solutionVector); 9: B&B (V2, L-RoundHeuristic())