A Heuristic Algorithm for the Network Design Problem
MILAN TUBA
Megatrend University Belgrade Faculty of Computer Science Bulevar umetnosti 29, 11070 Novi Beograd
SERBIA [email protected]
Abstract: The network design problem (NDP) is a well known problem which can be applied to many different
types of networks. It was well investigated applied to computer communications networks during the time of Inter-net development. Today it is again very actual applied mostly to the dynamic wireless Inter-networks (MANET - mobile ad hoc networks). The network design problem is an NP-hard problem which involves topology selection (subset of possible links) and routing determination (paths for the offered traffic). Capacity assignment is usually treated as a 0-1 problem and as such included it in the topology problem. This does not make the network design prob-lem easier, just the opposite, it moves optimization from continuous to integer. The goal is to minimize the cost which can be a combination of the link costs and delay penalties, under possible additional constraints. Such hard combinatorial graph problems are often treated by evolutionary metaheuristics. In many cases better results and faster convergence are achieved by hybrid algorithms where some local searcher that utilizes particular knowledge about the corresponding problem is included. Here we propose and analyze a computationally feasible heuristic algorithm which excludes underutilized links by a version of flow-deviation method. A simplified queuing model is developed for cost function estimate. Some theoretical results are also established that direct initial approxima-tion. Proposed algorithm can dynamically be adjusted for faster or better results. It is implemented and computes a good solution that is robust with respect to often required dynamic changes of the cost function.
Key–Words: Network design problem (NDP), Network routing, Computer network topology, Optimization,
Mod-eling
1
Introduction
Computer networks consist of computers, called nodes, and communication lines, called links, that in-terconnect them.
The network design problem is:
• For given locations of nodes, traffic matrix (of-fered traffic for each pair of nodes) and cost ma-trix (cost to transfer a message for each pair of nodes)
• With performance constraints: reliability, de-lay (time that a message spend in the network), throughput
• Find values for variables: topology (which nodes will be connected directly with a line and which will have to communicate indirectly, using other nodes as intermediate stations), line capacities (how much traffic will each link be able to carry), flow assignment - routing (which paths messages between any pair of nodes will follow)
• Minimize the cost (of building and maintaining the whole network).
Other formulations of the problem are: minimize delay for the given cost or maximize throughput for given cost and delay. It has been shown that all these problems are similar and that the same techniques can be applied. Different aspects of the network design problem, particularly routing and link capacity were investigated, more recent results are in [1] and [2] and the latest survey [3]. The network design problem, that was for many decades investigated with empha-sis on wide area networks, is recently revitalized with application to mobile ad hoc networks [4], [5], [6].
This problem is intractable if full and exact so-lution is required. Networks can have many thou-sands of nodes (computers). Fortunately, experience has shown that network design can be done hierarchi-cally and still be near optimal. An example is a net-work for a country. First, we can decide where to put trunks between major cities, then connect small cities to nearest major cities, then make local networks in-side the cities. This approach allows us to work with networks of at most 50 nodes at a time. This is a great help, but the problem is still intractable.
queueing theory were used to solve the distributed, packet-switching network design problem. Many al-gorithms from graph theory were also used. They include Dijkstra’s algorithm for the single source shortest paths problem, Floyd’s algorithm for the all-pairs shortest paths problem, Prim’s algorithm and Kruskal’s algorithm for minimum cost spanning tree.
Depending on assumptions on some of the three subproblems, different methods were used:
• Solving for capacity assignment when topology and routing policy are given. If the costs are lin-ear, LaGrange multipliers are good enough. For nonlinear costs, dynamic programming is used. • Solving for routing when topology and channel
capacities are given. The Minimum Link and The Flow Deviation Algorithm are used; both are heuristic.
• Solving for capacity and flow assignment when topology is given is a more general problem. This problem has many local minima and only suboptimal solutions exist. There are algorithms for linear, concave and discrete costs. For topo-logical design, two algorithms, both heuristic, are used. One is The Branch X-Change Method; the other is Concave Branch Elimination. Another approach is to use graph theory to find the suboptimal topology. A cut between two nodes is a set of arcs whose removal disconnects two nodes. A minimal cut is one in which replacement of any of its members reconnects the graph. There is a theorem that states that the maximum flow between any two ar-bitrary nodes in any graph cannot exceed the capacity of the minimum cut separating those two nodes. There is the stronger result that maximum flow is equal to the capacity of the minimal cut. This Max-Flow Min-Cut Theorem helps to optimize networks but some systematic way of searching for the minimum cut is needed.
2
NDP Constrains
The algorithm we propose will be used for a NDP with some assumptions and constrains.
2.1 Capacity Assignment Elimination
In the clasical Network Design Problem it was as-sumed that line capacity is a continuous variable. Even if after the analysis only discrete values were required, it was assumed that rounding the continu-ous solution to the nearest discrete value would give a good discrete solution. This approach is sensible
when lines come in a wide range of bandwidths, but even when ARPANET was designed there was a dis-tinct cost advantage in using 56 kB lines to the ex-clusion of other bandwidths. Later the situation has moved even more in the direction of favoring a very few standard bandwidths, especially T1 (1.544 Mbps) and T3 (44.736 Mbps) lines. This makes methods that provide capacity assignments using continuous val-ues inapplicable. We have to decide for each pair of locations if there will or will not be a line present. The problem becomes 0-1 programming problem or, if there is a lot of traffic, an integer programming problem (there can be more then one line between two nodes).
The whole design process is similar to the one that was used before, only the emphasis is on differ-ent parts. There are three problems to be addressed in network design: topology, capacity assignment and routing. Optimal routing is the easiest problem and it can be solved in a reasonable time (for static rout-ing). For a fixed topology and line-capacities both, the cost function (delays) and the constraints (fea-sibility) are convex and any down-hill search tech-nique will find the utech-nique minimum. Most efficient method that is used is a variation of Frank-Wolfe method for nonlinear programming. It is known as flow-deviation method. With continuous line capaci-ties the main optimization was done by assigning ca-pacities to the lines, topology was not very impor-tant. Starting topology was selected not so much with optimization on mind, but rather some other criteria, like two-connectivity. Now, without different capac-ities, the problem is to determine network topology. This problem apears easier then the previous one, we have to worry only about topology and routing and not about capacity assignment. Unfortunately, it is still untractable.
2.2 Routing Feasibility
Among all possible topologies and associated routings we want to select one that is optimal in some sense (cost or delay or combination of both). The main con-straint for this constrained optimization problem is the feasibility of the routing. The offered load matrix, which determines how much traffic has to be trans-ferred between any two pairs of nodes, is given in ad-vance and it can not be changed. If we assume that a line of an arbitrary capacity can be placed between any two nodes the remaining constraint is that all traf-fic, according to the offered load matrix, has to be car-ried along some feasible routing. The routing can be described by a system of equations over a set of four-index variables. Variable TM S,M E,LS,LE determines
(mes-sage start) to ME (mes(mes-sage end) are carried over line LS-LE (line start to line end). For a network of n
nodes there aren(n−1)possible pairs of nodes and each message can be on any line what gives the total number of variables to ben2(n
−1)2. The next prob-lem is to determine the number of equations. For each node we have to make sure that each message type is handled properly. There are n nodes and n(n−1) message types. This givesn2(n
−1)equations. The equations are of three types. If the node for which the equation is written is neither source nor sink for par-ticular message type, the equation should state that the total flow (for that particular message type) that goes to that node is equal to the total flow that goes out of that node. If the node is source for the particular mes-sage type, the flow from that node should be greater then the flow to that node exactly for the amount of the offered load for that message type. The opposite is true for nodes that are sinks.
2.3 Queuing Delays
If we consider only interactive transactions (not trans-fers of large files) it allows us to use queueing theory in a very simple form: all we have to worry about is not to drive any line to more then some fixed percent-age of its capacity (usually we can drive a line to more then 99% of its capacity). The explanation is simple. By increasing the line capacity the queueing system behaves differently. However, the human that uses the network interactively does not change. Human always allows some fixed delayD(normally about half of a second). The delay inM/M/1system is
D = 1
µ − λ (1)
and we want to keep it constant. That means that
λ = µ − 1
D (2)
Line utilizationρis, for the constant delayD:
ρ = λ
µ = 1 −
1
Dµ (3)
From the last equation we see that by increasing the line capacity we increase the line utilization while keeping the delay constant. As the capacity increases towards infinity, utilization approaches 1.
This property of the queues is intuitively clear: as the utilization increases, the queue increases. How-ever, if the server is very fast, long queues will not introduce long delays. We do not care if there are
1000 customers in front of us if each of them can be served in one micro second. When the utiliza-tion is 0.5 the queue length is 1, for utilizautiliza-tion 0.9 the queue length raises to 9, for utilization 0.99 the average queue length is 99 etc.
The other types of messages have different re-quirements. For interactive transactions (where hu-mans are involved) we wanted only average delay not to exceed some relatively large constant (half of a sec-ond, for example) and a reasonable variance. For digitized voice and, even more, for video or remote automation, the average delay should be some very small constant. This brings us back to the situation where we can not utilize lines by more then 50% or something of that order. The transfer of large files is different. From the table above we know the av-erage queue length for any possible line utilization. Since large file consists of many packets, the infor-mation about average queue length translates to this: if average queue length is nthen a transfer of a file will last ntimes longer then on an empty line. On a T1 line one half megabyte file would take about three seconds without queueing. If we drive a line to 99% utilization, average queue length will be 999 and the transfer will take about fifty minutes. This means that large file transfer is usually the bottleneck and not the interactive transactions.
There are three regions for the total traffic. Two extremes are clear. If we have very small offered load everywhere, the best network is a minimum cost span-ning tree. It connects all nodes and no lines will be heavily utilized which results in negligible delay. If the offered load is very large we use direct connec-tions. When there is 1.5 Mbps that needs to be trans-ferred between two nodes, it pays to put a T1 line there. The only interesting case is when the offered load is in between: not too small and not bigger then the T1 capacity.
2.4 Cost Function
The first problem that has to be solved is to find an appropriate cost function. There is no unique best cost function because the network can be viewed from at least two different points: network manager’s and user’s. From the network manager’s point of view a line that is expensive to install is expensive but from the user’s point of view a line that is introducing long delays is expensive. This two criteria are usually con-tradictory. The best solution is usually some compro-mise between these two extreme positions. We will define a line cost as a weighted sum of installation cost and total delay on that line. The network cost is the sum of line costs. The weight coefficient is an input parameter. When this coefficient is set to one,
delays are ignored and when it is set to zero only de-lays are considered. The second cost component, total delay, is a dynamic component and it has to be recal-culated after each rerouting.
It is easy to see that two extremes do not give rea-sonable results. If only delays are considered, the best network will always be totally interconnected net-work. Removing any line will increase delays. But some very expensive line may carry very little traf-fic and the removal of such line would signitraf-ficantly decrease line costs and only marginally increase de-lays. Such solution would be overlooked if line costs are not considered. The other extreme is when only line costs are considered. The best network in that case is the minimum spanning tree. Interesting case is a network that forms a ring when costs are consid-ered. Each node has two neighbors to which it can be connected by inexpensive lines. Connections to any other node is considerably more expensive. The mini-mum spanning tree for such a network is an open ring. That is the solution if only line-costs are considered. It is easy to see that a closed ring is much better solu-tion. By adding that last line that will close the ring, the cost will not increase dramatically, but the average path length will be almost halved and delay will be much smaller. If delay is included, even with a small weight coefficient, in the cost function, the line that closes the ring would not be dropped.
3
Proposed Heuristic Algorithm
An algorithm is presented here that tries to solve the problems of topology and routing simultaneously. It is a heuristic that starts with totally connected network and direct routing and eliminates lines, one by one, rerouting the traffic from eliminated lines along other paths. The other alternative is to start with a minimal network. It would be more computational effective, but then the problem of initial feasible routing has to be solved. The basic structure of the algorithm is:repeat
select a line (expensive one);
eliminate selected line by rerouting its traffic;
until no line can be eliminated.
Offered load (four-dimension matrix), line costs (two-dimensional matrix) and line capacity (same for all lines) are given. The algorithm decreases the cost at each iteration by eliminating one line. It terminates when there are no lines that can be eliminated. Next version will allow for adding lines. This algorithm does not find global minimum in general case, but all local minima should not be far apart from each other (how to prove this?). The questions that we have to answer are how to select a line for elimination and
how to eliminate it. Depending on our choices the algorithm will be better or faster.
The algorithm that always finds the global mini-mum is easy to describe and write but impossible to run. It is similar to perfect chess program. First, we examine all one-level moves (single line removals). Examining here means rerouting and finding optimal routing. For n-node network there aboutn2lines. On
the next step we examine all possible two-level moves, that means for each one-level move we examine all possible one-level moves. We now have aboutn4
pos-sibilities and that number continues to grow exponen-tially . No move can be eliminated at the first stage because even the worst move from the first stage (and may be only that move) may lead to the best move on the second stage. This algorithm is complete search. The other extreme is an algorithm that does no check-ing at all. It selects a line that should be eliminated randomly (very fast) and reroutes the traffic from that line along other, randomly selected paths. It is easy to see that in certain cases this blindness may prevent even coming close to the good solution.
Our heuristic will be an effort to find an algorithm between those two extremes that will have a reason-able running time and give reasonreason-able results. We can start with some improvements of the fast but blind al-gorithm. It is not computationally very expensive to calculate for each line on each step the cost for the net-work when that line is removed and its traffic rerouted. The line whose removal gives the best cost improve-ment is then actually removed from the network. This algorithm is reasonably fast. The most we can do is to find optimal routing for each attempted removal. In that case we have something like perfect chess player that can see only one move ahead but makes no mis-takes. This algorithm has much worse running time and usually gives improvement not better then 5% of the total cost. When adding lines is included improve-ment can become even smaller.
When a line selected for elimination the traffic that was on that line has to be rerouted along different paths. We apply Dijkstra’s algorithm for the shortest path. It may seem that distance between nodes could be used as a cost but some analysis shows that it re-quires not only more computation but also gives worse results. The folks theorem that a chain is as strong as its weakest link can be applied here and the shortest path is determined by minimum number of hops and then the quality of that rerouting is determined by a line on that path with minimal residual capacity.
The next problem is that the total traffic that has to be rerouted can be greater than the minimal resid-ual capacity of the selected shortest path. Even if that is not the case, it is possible that after rerouting that shortest path becomes overutilized. It would again
be computationally too expansive to determine how much of the traffic that has to be rerouted should be rerouted along selected shortest path. That is why we introduce rerouting granularity coefficient which de-termines how much of the residual capacity can be used. It was empirically determined that 50% for that coefficient gives good results.
After a line elimination routing can be optimized or left as it is and and another line selected for elimi-nation.
The next Table 1 gives statistics about execution time for different number of nodes for versions of al-gorithm without and with optimization after each line elimination.
Nodes Without With
6 3 7 7 8 16 8 27 59 9 65 127 10 104 179 11 312 543
Table 1: Execution time (sec)
We can see that the execution time approximately doubles if routing is optimized after each line elim-ination. It is interesting that experiments show that routing optimization on each step does not improve results. Somewhat better results are obtained if rout-ing is optimized for each attempted line elimination. Experiments show that improvement is less that 5% while the execution time in incresed by the third de-gree. This may be acceptable for one time design of complex static networks but not for ad hoc networks.
There are some advantages if the algorithm is im-plemented with integers. Execution time is not signif-icantly decreased, there are even some problems with integer division, but the main advantage is possibility of direct comparison rather than using small absolute difference as has to be done with floating point num-bers.
Here is an example of the program output for ran-domly generated network with 4 nodes.
Offered Load: [1] [2] [3] [4] [1] 0 95 76 99 [2] 43 0 58 68 [3] 41 18 0 67 [4] 65 67 96 0 Line costs: [1] [2] [3] [4] [1] 0 153 308 476 [2] 278 0 314 282 [3] 473 181 0 198 [4] 110 423 314 0
Iteration step is 50% of available capacity. Each line has capacity 373.
Line-costs are 76% of the cost function. New total cost is 2896.
New total traffic is 793. New average delay is 2.7.
Line [3,1] eliminated. New cost 2561. Line [1,4] eliminated. New cost 2290. Line [2,3] eliminated. New cost 2085. Line [4,2] eliminated. New cost 1902. Line [3,2] eliminated. New cost 1845. No line was selected.
New total cost is 1756. New total traffic is 1094. New average delay is 5.6.
Routing: [1,2] [1,3] [2,1] [2,4] [3,4] [4,1] [4,3] [1,2] 95 0 0 0 0 0 0 [1,3] 0 76 0 0 0 0 0 [1,4] 51 48 0 51 48 0 0 [2,1] 0 0 43 0 0 0 0 [2,3] 0 42 42 16 0 0 16 [2,4] 0 0 0 68 0 0 0 [3,1] 0 0 0 0 41 41 0 [3,2] 18 0 0 0 18 18 0 [3,4] 0 0 0 0 67 0 0 [4,1] 0 0 0 0 0 65 0 [4,2] 67 0 0 0 0 67 0 [4,3] 0 0 0 0 0 0 96
Time for this algorithm is 0.0 seconds.
4
Conclusion
Fast and flexible heuristic algorithm is developed which by variant of flow-deviation determines subop-timal topology and routing. This algorithm can be ad-justed for different applications. Further improvement can include possibility of adding back lines to avoid trapping in local minima. The NDP is today mostly considered for dynamic ad hoc networks where it is necessary to quickly recalculate optimal topology
and routing for fast changes in mobile network con-ditions. Evolutionary metaheuritics like Ant Colony Optimization and Bee Colony Optimization are suc-cessfully used for NDP but they often give much bet-ter results when hybridized with some local searcher such as here developed algorithm.
Acknowledgment: The research was supported by
the Ministry of Science, Republic of Serbia, Project No. 144007
References:
[1] Tuba, Milan: Relation between Static and Dynamic Optimization in Computer Network Routing, Recent Advances in Artificial
Intelli-gence, Knowledge Engineering and Data Bases,
WSEAS Press 2009, pp. 484-489
[2] Tuba, Milan: Computer Network Routing Based on Imprecise Routing Tables, WSEAS
Transac-tions on CommunicaTransac-tions, Issue 4, Volume 8,
April 2009, pp. 384-393
[3] Abd-El-Barr M: Topological network design: A survey, Journal of Network and Computer
Ap-plications Vol. 32, Issue 3, 2009, pp. 501-509
[4] Karavetsios, P., Economides, A.: Performance Comparison of Distributed Routing Algorithms in Ad Hoc Mobile Networks, WSEAS
Transac-tions on CommunicaTransac-tions, Vol. 3, Issue 1, 2004,
pp. 317-321
[5] Sokullu, R., Karaca, O.: Comparative Perfor-mance Study of ADMR and ODMPR in the Context of Mobile Ad Hoc Networks and Wire-less Sensor Networks, International Journal of
Communications, Issue 1, Volume 2, 2008, pp.
45-53
[6] Kumar, D., Bhuvaneswaran, R.: ALRP: Scala-bility Study of Ant Based Local Repair Routing Protocol for Mobile Ad Hoc Networks, WSEAS
Transactions on Computer Research, Vol. 3,
Is-sue 4, Apr 2008, pp. 224-233
[7] Obreque C, Donoso M, Gutierrez G, Marianov V: A branch and cut algorithm for the hier-archical network design problem, EUROPEAN
JOURNAL OF OPERATIONAL RESEARCH,
Vol. 200 Issue 1, Jan. 2010, pp. 28-35
[8] Mendes SP, Molina G, Vega-Rodriguez MA, Miguel A, Gomez-Pulido JA, Saez Y, Miranda G, Segura C, Alba E, Isasi P, Leon C, Sanchez-Perez JM: Benchmarking a Wide Spectrum of
Metaheuristic Techniques for the Radio Network Design Problem, IEEE Transactions on
Evolu-tionary Computation Vol. 13, Issue 5, Oct. 2005,
pp. 1133-1150
[9] Awan I, Al-Begain K: An analytical study of quality of service provisioning for multi service mobile IP networks using adaptive buffer man-agement, 11th International Conference on
Ana-lytical and Stochastic Modeling Techniques and Applications, 2004, Proceedings, pp. 166-172
[10] Watcharasitthiwat K, Wardkein P: Reliability optimization of topology communication net-work design using an improved ant colony op-timization, Computers & Electrical Engineering Vol. 35, Issue 5, Sep. 2009, pp. 730-747