Name: Spyros Matsoukas =============================================== Account Number: mats@ccs.neu.edu =============================================== Project: Implementation of an iterative algorithm for the optimization of the priorities of the links in Convergence Routing. I implemented originally this program in C, while I was working as an RA for professor Yener, in Fall 94. I rewrote the program in Demeter from scratch in order to see the advantages/disadvantages of adaptive object oriented programming with Demeter. To understand the functionality of the program, an introduction to convergence routing is necessary. Convergence Routing is a dynamic routing algorithm, i.e., successive packets of the same session are not necessarily routed on the same path to the destination, but they can follow different routes depending on the current traffic load conditions. The difference between convergence routing and other dynamic routing algorithms is that the former guarantees no loss due to congestion; each packet will reach its designated destination without being routed on the same link twice and with a deterministic bound on the maximum route length. This is achieved by embedding a "virtual ring" on the network, as follows: first, a spannig tree of the network is computed, by performing a breadth-first traversal of the network, starting from the highest-degree node. Then, the tree is traversed "in order", and each time a node is traversed it is assigned a virtual node number, starting from 0. Therefore, if a node is traversed more than once, it will be assigned more than one virtual node numbers. This traversal of the tree specifies a "virtual ring", consisting of virtual nodes, and the numbers of the virtual nodes specify a "global direction". For each pair of source-destination nodes, there is one and only one pair of source-destination virtual nodes on the ring, and packets follow the default path on the ring to the destination virtual node. Besides the default route on the embedded ring, a packet can be "deflected" towards the destination on a shorter path, by using 2 operations, called jumps and shortcuts. These operations utilize the non-ring links of the network (jumping) and the fact that two virtual nodes on the ring may be assigned to the same physical node, allowing a shortcut from one virtual node to the other to take place. The default routing algorithm decides on which outgoing link to route a packet based on the *local* traffic conditions, and sometimes this locality allows greedy decisions that are not efficient. Thus, this algorithm is referred to as "local-greedy". Two other algorithms are proposed which "look ahead" before making routing decisions, and therefore consider the traffic conditions on all the paths to the destination. These algorithms are referred to as EP (Expected Proximity) and MP (Maximum Proximity). So, in summary, the program I implemented requires as input a network and a traffic matrix, along with a specification of several parameters, and performs the following steps: 1) find a spanning tree of the network starting from the highest-degree node. 2) traverse the tree "in order" to create a ring with virtual nodes assigned to each physical node during the traversal. 3) search the traffic matrix and isolate the virtual source-destination pairs, or "commodities". 4) For each commodity, create a structure called "Directed Acyclic Graph", which is a subgraph of the virtual ring, starting from the source virtual node of the commodity and ending to the destination virtual node of the commodity. Each link on a DAG has additional information which is used for routing. 5) The DAGs computed in step 4 are used to compose the Routing Table, where each link on a DAG is assigned a priority depending on the version of the routing algorithm in use (local-greedy, EP, or MP). 6) Also, each link has a utilization, which is initialized at the beginning using an initialization algorithm. 7) compute the proximities of the links. 8) sort the links in the routing table according to their proximities. 9) compute the probability of routing a packet on a link, for each link in the routing table. 10) assign a flow on each link in the routing table and solve a multicommodity flow problem, using the probabilities from step 9. 11) for each link in the ring, compute the total flow on the link, and find the "congestion" Z, which is defined as the maximum total flow on a link in the ring. 12) compute the utilization of each link in the ring. Here many different algorithms can be used for this computation, and they are called "Bias Factors". Each bias factor affects the stability of routing in a different way. 13) goto step 7, and break the loop when the Z values converge, or when a maximum number of iterations has been performed, whichever happens first. ======================================== Example of how to run the application: droute [] where is a file containing the network, the traffic, and the names of the algorithms that will be used for computing the Z values. If no argument is given to 'droute', then 'demeter-input' is considered as the input file. ======================================== Class Dictionary used: ProgramInput = "Network" InputNetwork "Traffic" InputNetwork "Initialize" "Util" InitAlg "Proximity" ProxAlg "Probability" ProbAlg "Flow" FlowAlg "Utilization" "Bias" "Factor" UtilAlg "Iterations" DemNumber. InputNetwork = ParList(InputAdjacency). InputAdjacency = InputNode ParList(InputNeighbor). InputNeighbor = InputNode ["with" DemReal]. InputNode = DemNumber. RoutingAlgorithm = Network Ring RoutingTable InitAlg ProxAlg ProbAlg FlowAlg UtilAlg DemNumber. Dummy = List(Commodity). Commodity = VNode List(VNodeTraff). VNodeTraff = VNode DemReal. RoutingTable = List(DagDest). DagDest = Dag VNode. Dag = List(DagAdjacency). DagAdjacency = DemReal DemReal VNode List(DagNeighbor). DagNeighbor = VNode DemReal DemReal DemNumber. InitAlg : InitConstant. InitConstant = "constant" "=" DemReal. ProxAlg : Greedy | EP | MP. Greedy = "greedy". EP = "ep". MP = "mp". ProbAlg : Priority. Priority = "priority". FlowAlg : Propagate | Simplex. Propagate = "propagate". Simplex = "simplex". UtilAlg : Factor0 | Factor1 | Factor2 | Factor3 | Factor4 . Factor0 = "bf0". Factor1 = "bf1". Factor2 = "bf2". Factor3 = "bf3". Factor4 = "bf4". Network = ParList(Adjacency). Adjacency = Node ParList(Neighbor) "mark" "=" DemNumber. Neighbor = Node ["with" DemReal]. Node = "ID" "=" DemNumber ParList(VNode). ParList(S) ~ "(" {S} ")". Tree = ParList(Tree_Adjacency). Tree_Adjacency = Node List(Node) "mark" "=" DemNumber. Ring = List(VirtualAdjacency) DemNumber. VirtualAdjacency = VNode DemReal DemReal DemReal List(VirtualNeighbor) List(VirtualNeighbor). VirtualNeighbor = VNode DemReal DemReal DemReal. VNode = "VID" "=" DemNumber Node. List(S) ~ {S}. ====================================================== Growth plans: Since the program tests the effect of different proximity measures and utilization bias factors on the basic convergence routing algorithm, the class dictionary was designed in a way that allows the algorithms used in steps 7, 9, 10, and 12 of the iterative test algorithm to change easily. Also, new algorithms can be added very easily, without any modification to the class dictionary. This is achieved by using the "Strategy Design Pattern" from the book "Design Patterns", page 315. Parts 'init', 'prox', 'prob', 'flow', and 'util' of class RoutingAlgorithm have been implemented as abstract classes, so that a new algorithm can be added as a new concrete subclass of the corresponding abstract class. For example, in order to add a new bias factor, say bias factor 5, we can just add a new class "Factor5" as a subclass of UtilAlg, and add a wrapper for "Factor5" in the propagation pattern `compute_utilization'. ============================================================================= Parts of the project which I would have developed further if I had more time: I would add a graphical user interface that allows the user to select the available algorithms from menus, and also the capability to specify the network topology and the traffic graphically, using the mouse to draw directed lines between nodes. ============================================================================= Test Inpute File: demeter-input ============================================================================= Test Output File: out.txt ============================================================================= Interesting input/output pair: Input: ------ Network ( 1 (2 3 4 5) 2 (1 6 5) 3 (1 7) 4 (1 8 9 10) 5 (1 2 10 11) 6 (2 7 9) 7 (3 6 10) 8 (4) 9 (4 6) 10 (4 7 5) 11 (5) ) Traffic ( 1 (2 with 1.0 3 with 1.0 4 with 1.0 5 with 1.0 6 with 1.0 7 with 1.0 8 with 1.0 9 with 1.0 10 with 1.0 11 with 1.0) 2 (1 with 1.0 3 with 1.0 4 with 1.0 5 with 1.0 6 with 1.0 7 with 1.0 8 with 1.0 9 with 1.0 10 with 1.0 11 with 1.0) 3 (1 with 1.0 2 with 1.0 4 with 1.0 5 with 1.0 6 with 1.0 7 with 1.0 8 with 1.0 9 with 1.0 10 with 1.0 11 with 1.0) 4 (1 with 1.0 2 with 1.0 3 with 1.0 5 with 1.0 6 with 1.0 7 with 1.0 8 with 1.0 9 with 1.0 10 with 1.0 11 with 1.0) 5 (1 with 1.0 2 with 1.0 3 with 1.0 4 with 1.0 6 with 1.0 7 with 1.0 8 with 1.0 9 with 1.0 10 with 1.0 11 with 1.0) 6 (1 with 1.0 2 with 1.0 3 with 1.0 4 with 1.0 5 with 1.0 7 with 1.0 8 with 1.0 9 with 1.0 10 with 1.0 11 with 1.0) 7 (1 with 1.0 2 with 1.0 3 with 1.0 4 with 1.0 5 with 1.0 6 with 1.0 8 with 1.0 9 with 1.0 10 with 1.0 11 with 1.0) 8 (1 with 1.0 2 with 1.0 3 with 1.0 4 with 1.0 5 with 1.0 6 with 1.0 7 with 1.0 9 with 1.0 10 with 1.0 11 with 1.0) 9 (1 with 1.0 2 with 1.0 3 with 1.0 4 with 1.0 5 with 1.0 6 with 1.0 7 with 1.0 8 with 1.0 10 with 1.0 11 with 1.0) 10 (1 with 1.0 2 with 1.0 3 with 1.0 4 with 1.0 5 with 1.0 6 with 1.0 7 with 1.0 8 with 1.0 9 with 1.0 11 with 1.0) 11 (1 with 1.0 2 with 1.0 3 with 1.0 4 with 1.0 5 with 1.0 6 with 1.0 7 with 1.0 8 with 1.0 9 with 1.0 10 with 1.0)) Initialize Util constant = 0.5 Proximity greedy Probability priority Flow propagate Utilization Bias Factor bf2 Iterations 100 Output: ------- Parsing in object in: demeter-input. ***The maximum Degree node is 1 Printing the ring... Number of virtual nodes: 20 Virtual Node: 0 (1 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: 5 (3 ) util = 0.500000 9 (4 ) util = 0.500000 Virtual Node: 1 (2 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: 4 (1 ) util = 0.500000 Virtual Node: 2 (6 ) util = 0.500000 Jumps to virtual nodes: 6 (7 ) util = 0.500000 12 (9 ) util = 0.500000 Shortcuts to virtual nodes: Virtual Node: 3 (2 ) util = 0.500000 Jumps to virtual nodes: 17 (5 ) util = 0.500000 Shortcuts to virtual nodes: Virtual Node: 4 (1 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: 9 (4 ) util = 0.500000 17 (5 ) util = 0.500000 Virtual Node: 5 (3 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: 8 (1 ) util = 0.500000 Virtual Node: 6 (7 ) util = 0.500000 Jumps to virtual nodes: 2 (6 ) util = 0.500000 14 (10 ) util = 0.500000 Shortcuts to virtual nodes: Virtual Node: 7 (3 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: Virtual Node: 8 (1 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: 1 (2 ) util = 0.500000 17 (5 ) util = 0.500000 Virtual Node: 9 (4 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: 12 (9 ) util = 0.500000 14 (10 ) util = 0.500000 16 (1 ) util = 0.500000 Virtual Node: 10 (8 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: Virtual Node: 11 (4 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: 14 (10 ) util = 0.500000 16 (1 ) util = 0.500000 Virtual Node: 12 (9 ) util = 0.500000 Jumps to virtual nodes: 2 (6 ) util = 0.500000 Shortcuts to virtual nodes: Virtual Node: 13 (4 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: 10 (8 ) util = 0.500000 16 (1 ) util = 0.500000 Virtual Node: 14 (10 ) util = 0.500000 Jumps to virtual nodes: 6 (7 ) util = 0.500000 17 (5 ) util = 0.500000 Shortcuts to virtual nodes: Virtual Node: 15 (4 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: 10 (8 ) util = 0.500000 12 (9 ) util = 0.500000 Virtual Node: 16 (1 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: 1 (2 ) util = 0.500000 5 (3 ) util = 0.500000 9 (4 ) util = 0.500000 Virtual Node: 17 (5 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: 1 (2 ) util = 0.500000 0 (1 ) util = 0.500000 Virtual Node: 18 (11 ) util = 0.500000 Jumps to virtual nodes: Shortcuts to virtual nodes: Virtual Node: 19 (5 ) util = 0.500000 Jumps to virtual nodes: 1 (2 ) util = 0.500000 14 (10 ) util = 0.500000 Shortcuts to virtual nodes: Printing the routing table... Destination: 1 ---------------- Virtual Node: 6 Traffic = 1.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 7 prob = 0.000000 flow = 0.000000 Virtual Node: 7 Traffic = 1.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 Virtual Node: 8 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 Virtual Node: 9 Traffic = 0.000000 Proximity = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 10 prob = 0.000000 flow = 0.000000 Virtual Node: 10 Traffic = 1.000000 Proximity = 0.000000 --> 11 prob = 0.000000 flow = 0.000000 Virtual Node: 11 Traffic = 0.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 Virtual Node: 12 Traffic = 1.000000 Proximity = 0.000000 --> 13 prob = 0.000000 flow = 0.000000 Virtual Node: 13 Traffic = 0.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 Virtual Node: 14 Traffic = 1.000000 Proximity = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 15 prob = 0.000000 flow = 0.000000 Virtual Node: 15 Traffic = 1.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 Virtual Node: 16 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 Virtual Node: 17 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 --> 18 prob = 0.000000 flow = 0.000000 Virtual Node: 18 Traffic = 1.000000 Proximity = 0.000000 --> 19 prob = 0.000000 flow = 0.000000 Virtual Node: 19 Traffic = 1.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 Virtual Node: 0 Traffic = 1.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 Virtual Node: 1 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 5 ---------------- Virtual Node: 10 Traffic = 1.000000 Proximity = 0.000000 --> 11 prob = 0.000000 flow = 0.000000 Virtual Node: 11 Traffic = 0.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 Virtual Node: 12 Traffic = 1.000000 Proximity = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 --> 13 prob = 0.000000 flow = 0.000000 Virtual Node: 13 Traffic = 0.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 Virtual Node: 14 Traffic = 1.000000 Proximity = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 15 prob = 0.000000 flow = 0.000000 Virtual Node: 15 Traffic = 1.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 Virtual Node: 16 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 Virtual Node: 17 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 --> 18 prob = 0.000000 flow = 0.000000 Virtual Node: 18 Traffic = 1.000000 Proximity = 0.000000 --> 19 prob = 0.000000 flow = 0.000000 Virtual Node: 19 Traffic = 1.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 Virtual Node: 0 Traffic = 0.000000 Proximity = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 Virtual Node: 1 Traffic = 0.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 Virtual Node: 2 Traffic = 1.000000 Proximity = 0.000000 --> 3 prob = 0.000000 flow = 0.000000 Virtual Node: 3 Traffic = 1.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 Virtual Node: 4 Traffic = 1.000000 Proximity = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 Virtual Node: 5 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 9 ---------------- Virtual Node: 18 Traffic = 1.000000 Proximity = 0.000000 --> 19 prob = 0.000000 flow = 0.000000 Virtual Node: 19 Traffic = 1.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 Virtual Node: 0 Traffic = 0.000000 Proximity = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 Virtual Node: 1 Traffic = 0.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 Virtual Node: 2 Traffic = 1.000000 Proximity = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 --> 3 prob = 0.000000 flow = 0.000000 Virtual Node: 3 Traffic = 1.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 Virtual Node: 4 Traffic = 0.000000 Proximity = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 Virtual Node: 5 Traffic = 0.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 Virtual Node: 6 Traffic = 1.000000 Proximity = 0.000000 --> 7 prob = 0.000000 flow = 0.000000 Virtual Node: 7 Traffic = 1.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 Virtual Node: 8 Traffic = 1.000000 Proximity = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 Virtual Node: 9 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 17 ---------------- Virtual Node: 2 Traffic = 1.000000 Proximity = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 --> 3 prob = 0.000000 flow = 0.000000 Virtual Node: 3 Traffic = 1.000000 Proximity = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 Virtual Node: 4 Traffic = 0.000000 Proximity = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 Virtual Node: 5 Traffic = 0.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 Virtual Node: 6 Traffic = 1.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 7 prob = 0.000000 flow = 0.000000 Virtual Node: 7 Traffic = 1.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 Virtual Node: 8 Traffic = 0.000000 Proximity = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 Virtual Node: 9 Traffic = 0.000000 Proximity = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 10 prob = 0.000000 flow = 0.000000 Virtual Node: 10 Traffic = 1.000000 Proximity = 0.000000 --> 11 prob = 0.000000 flow = 0.000000 Virtual Node: 11 Traffic = 0.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 Virtual Node: 12 Traffic = 1.000000 Proximity = 0.000000 --> 13 prob = 0.000000 flow = 0.000000 Virtual Node: 13 Traffic = 0.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 Virtual Node: 14 Traffic = 1.000000 Proximity = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 15 prob = 0.000000 flow = 0.000000 Virtual Node: 15 Traffic = 1.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 Virtual Node: 16 Traffic = 1.000000 Proximity = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 Virtual Node: 17 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 2 ---------------- Virtual Node: 6 Traffic = 1.000000 Proximity = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 7 prob = 0.000000 flow = 0.000000 Virtual Node: 7 Traffic = 1.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 Virtual Node: 8 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 Virtual Node: 9 Traffic = 0.000000 Proximity = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 10 prob = 0.000000 flow = 0.000000 Virtual Node: 10 Traffic = 1.000000 Proximity = 0.000000 --> 11 prob = 0.000000 flow = 0.000000 Virtual Node: 11 Traffic = 0.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 Virtual Node: 12 Traffic = 1.000000 Proximity = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 --> 13 prob = 0.000000 flow = 0.000000 Virtual Node: 13 Traffic = 0.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 Virtual Node: 14 Traffic = 1.000000 Proximity = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 15 prob = 0.000000 flow = 0.000000 Virtual Node: 15 Traffic = 1.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 Virtual Node: 16 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 Virtual Node: 17 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 --> 18 prob = 0.000000 flow = 0.000000 Virtual Node: 18 Traffic = 1.000000 Proximity = 0.000000 --> 19 prob = 0.000000 flow = 0.000000 Virtual Node: 19 Traffic = 1.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 Virtual Node: 0 Traffic = 1.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 Virtual Node: 1 Traffic = 1.000000 Proximity = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 Virtual Node: 2 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 6 ---------------- Virtual Node: 10 Traffic = 1.000000 Proximity = 0.000000 --> 11 prob = 0.000000 flow = 0.000000 Virtual Node: 11 Traffic = 0.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 Virtual Node: 12 Traffic = 1.000000 Proximity = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 --> 13 prob = 0.000000 flow = 0.000000 Virtual Node: 13 Traffic = 0.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 Virtual Node: 14 Traffic = 1.000000 Proximity = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 15 prob = 0.000000 flow = 0.000000 Virtual Node: 15 Traffic = 1.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 Virtual Node: 16 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 Virtual Node: 17 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 --> 18 prob = 0.000000 flow = 0.000000 Virtual Node: 18 Traffic = 1.000000 Proximity = 0.000000 --> 19 prob = 0.000000 flow = 0.000000 Virtual Node: 19 Traffic = 1.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 Virtual Node: 0 Traffic = 0.000000 Proximity = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 Virtual Node: 1 Traffic = 0.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 Virtual Node: 2 Traffic = 1.000000 Proximity = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 --> 3 prob = 0.000000 flow = 0.000000 Virtual Node: 3 Traffic = 1.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 Virtual Node: 4 Traffic = 1.000000 Proximity = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 Virtual Node: 5 Traffic = 1.000000 Proximity = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 Virtual Node: 6 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 10 ---------------- Virtual Node: 12 Traffic = 1.000000 Proximity = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 --> 13 prob = 0.000000 flow = 0.000000 Virtual Node: 13 Traffic = 0.000000 Proximity = 0.000000 --> 10 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 Virtual Node: 14 Traffic = 1.000000 Proximity = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 15 prob = 0.000000 flow = 0.000000 Virtual Node: 15 Traffic = 0.000000 Proximity = 0.000000 --> 10 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 Virtual Node: 16 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 Virtual Node: 17 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 --> 18 prob = 0.000000 flow = 0.000000 Virtual Node: 18 Traffic = 1.000000 Proximity = 0.000000 --> 19 prob = 0.000000 flow = 0.000000 Virtual Node: 19 Traffic = 1.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 Virtual Node: 0 Traffic = 0.000000 Proximity = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 Virtual Node: 1 Traffic = 0.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 Virtual Node: 2 Traffic = 1.000000 Proximity = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 --> 3 prob = 0.000000 flow = 0.000000 Virtual Node: 3 Traffic = 1.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 Virtual Node: 4 Traffic = 0.000000 Proximity = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 Virtual Node: 5 Traffic = 0.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 Virtual Node: 6 Traffic = 1.000000 Proximity = 0.000000 --> 7 prob = 0.000000 flow = 0.000000 Virtual Node: 7 Traffic = 1.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 Virtual Node: 8 Traffic = 1.000000 Proximity = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 Virtual Node: 9 Traffic = 1.000000 Proximity = 0.000000 --> 10 prob = 0.000000 flow = 0.000000 Virtual Node: 10 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 12 ---------------- Virtual Node: 14 Traffic = 1.000000 Proximity = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 15 prob = 0.000000 flow = 0.000000 Virtual Node: 15 Traffic = 0.000000 Proximity = 0.000000 --> 10 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 Virtual Node: 16 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 Virtual Node: 17 Traffic = 0.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 --> 18 prob = 0.000000 flow = 0.000000 Virtual Node: 18 Traffic = 1.000000 Proximity = 0.000000 --> 19 prob = 0.000000 flow = 0.000000 Virtual Node: 19 Traffic = 1.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 Virtual Node: 0 Traffic = 0.000000 Proximity = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 Virtual Node: 1 Traffic = 0.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 Virtual Node: 2 Traffic = 1.000000 Proximity = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 --> 3 prob = 0.000000 flow = 0.000000 Virtual Node: 3 Traffic = 1.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 Virtual Node: 4 Traffic = 0.000000 Proximity = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 Virtual Node: 5 Traffic = 0.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 Virtual Node: 6 Traffic = 1.000000 Proximity = 0.000000 --> 7 prob = 0.000000 flow = 0.000000 Virtual Node: 7 Traffic = 1.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 Virtual Node: 8 Traffic = 1.000000 Proximity = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 Virtual Node: 9 Traffic = 0.000000 Proximity = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 --> 10 prob = 0.000000 flow = 0.000000 Virtual Node: 10 Traffic = 1.000000 Proximity = 0.000000 --> 11 prob = 0.000000 flow = 0.000000 Virtual Node: 11 Traffic = 1.000000 Proximity = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 Virtual Node: 12 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 14 ---------------- Virtual Node: 18 Traffic = 1.000000 Proximity = 0.000000 --> 19 prob = 0.000000 flow = 0.000000 Virtual Node: 19 Traffic = 1.000000 Proximity = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 Virtual Node: 0 Traffic = 0.000000 Proximity = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 1 prob = 0.000000 flow = 0.000000 Virtual Node: 1 Traffic = 0.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 --> 2 prob = 0.000000 flow = 0.000000 Virtual Node: 2 Traffic = 1.000000 Proximity = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 --> 3 prob = 0.000000 flow = 0.000000 Virtual Node: 3 Traffic = 1.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 Virtual Node: 4 Traffic = 0.000000 Proximity = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 Virtual Node: 5 Traffic = 0.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 Virtual Node: 6 Traffic = 1.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 7 prob = 0.000000 flow = 0.000000 Virtual Node: 7 Traffic = 1.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 Virtual Node: 8 Traffic = 1.000000 Proximity = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 Virtual Node: 9 Traffic = 0.000000 Proximity = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 10 prob = 0.000000 flow = 0.000000 Virtual Node: 10 Traffic = 1.000000 Proximity = 0.000000 --> 11 prob = 0.000000 flow = 0.000000 Virtual Node: 11 Traffic = 0.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 Virtual Node: 12 Traffic = 1.000000 Proximity = 0.000000 --> 13 prob = 0.000000 flow = 0.000000 Virtual Node: 13 Traffic = 1.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 Virtual Node: 14 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 18 ---------------- Virtual Node: 2 Traffic = 1.000000 Proximity = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 --> 3 prob = 0.000000 flow = 0.000000 Virtual Node: 3 Traffic = 1.000000 Proximity = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 Virtual Node: 4 Traffic = 0.000000 Proximity = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 5 prob = 0.000000 flow = 0.000000 Virtual Node: 5 Traffic = 0.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 --> 6 prob = 0.000000 flow = 0.000000 Virtual Node: 6 Traffic = 1.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 7 prob = 0.000000 flow = 0.000000 Virtual Node: 7 Traffic = 1.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 Virtual Node: 8 Traffic = 0.000000 Proximity = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 9 prob = 0.000000 flow = 0.000000 Virtual Node: 9 Traffic = 0.000000 Proximity = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 10 prob = 0.000000 flow = 0.000000 Virtual Node: 10 Traffic = 1.000000 Proximity = 0.000000 --> 11 prob = 0.000000 flow = 0.000000 Virtual Node: 11 Traffic = 0.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 Virtual Node: 12 Traffic = 1.000000 Proximity = 0.000000 --> 13 prob = 0.000000 flow = 0.000000 Virtual Node: 13 Traffic = 0.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 Virtual Node: 14 Traffic = 1.000000 Proximity = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 --> 15 prob = 0.000000 flow = 0.000000 Virtual Node: 15 Traffic = 1.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 Virtual Node: 16 Traffic = 1.000000 Proximity = 0.000000 --> 17 prob = 0.000000 flow = 0.000000 Virtual Node: 17 Traffic = 1.000000 Proximity = 0.000000 --> 18 prob = 0.000000 flow = 0.000000 Virtual Node: 18 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 4 ---------------- Virtual Node: 2 Traffic = 1.000000 Proximity = 0.000000 --> 3 prob = 0.000000 flow = 0.000000 Virtual Node: 3 Traffic = 1.000000 Proximity = 0.000000 --> 4 prob = 0.000000 flow = 0.000000 Virtual Node: 4 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 8 ---------------- Virtual Node: 6 Traffic = 1.000000 Proximity = 0.000000 --> 7 prob = 0.000000 flow = 0.000000 Virtual Node: 7 Traffic = 1.000000 Proximity = 0.000000 --> 8 prob = 0.000000 flow = 0.000000 Virtual Node: 8 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 16 ---------------- Virtual Node: 10 Traffic = 1.000000 Proximity = 0.000000 --> 11 prob = 0.000000 flow = 0.000000 Virtual Node: 11 Traffic = 0.000000 Proximity = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 12 prob = 0.000000 flow = 0.000000 Virtual Node: 12 Traffic = 1.000000 Proximity = 0.000000 --> 13 prob = 0.000000 flow = 0.000000 Virtual Node: 13 Traffic = 0.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 --> 14 prob = 0.000000 flow = 0.000000 Virtual Node: 14 Traffic = 1.000000 Proximity = 0.000000 --> 15 prob = 0.000000 flow = 0.000000 Virtual Node: 15 Traffic = 1.000000 Proximity = 0.000000 --> 16 prob = 0.000000 flow = 0.000000 Virtual Node: 16 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 0 ---------------- Virtual Node: 18 Traffic = 1.000000 Proximity = 0.000000 --> 19 prob = 0.000000 flow = 0.000000 Virtual Node: 19 Traffic = 1.000000 Proximity = 0.000000 --> 0 prob = 0.000000 flow = 0.000000 Virtual Node: 0 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 3 ---------------- Virtual Node: 2 Traffic = 1.000000 Proximity = 0.000000 --> 3 prob = 0.000000 flow = 0.000000 Virtual Node: 3 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 7 ---------------- Virtual Node: 6 Traffic = 1.000000 Proximity = 0.000000 --> 7 prob = 0.000000 flow = 0.000000 Virtual Node: 7 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 11 ---------------- Virtual Node: 10 Traffic = 1.000000 Proximity = 0.000000 --> 11 prob = 0.000000 flow = 0.000000 Virtual Node: 11 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 13 ---------------- Virtual Node: 12 Traffic = 1.000000 Proximity = 0.000000 --> 13 prob = 0.000000 flow = 0.000000 Virtual Node: 13 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 15 ---------------- Virtual Node: 14 Traffic = 1.000000 Proximity = 0.000000 --> 15 prob = 0.000000 flow = 0.000000 Virtual Node: 15 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Destination: 19 ---------------- Virtual Node: 18 Traffic = 1.000000 Proximity = 0.000000 --> 19 prob = 0.000000 flow = 0.000000 Virtual Node: 19 Traffic = 0.000000 Proximity = 10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104.000000 Now iterating and computing congestion Z... Iteration 1 Z = 28.7478 Iteration 2 Z = 26.7994 Iteration 3 Z = 26.8068 Iteration 4 Z = 26.8172 Iteration 5 Z = 26.8157 Iteration 6 Z = 26.8159 Iteration 7 Z = 26.8159 Iteration 8 Z = 26.8159 Iteration 9 Z = 26.8159 Iteration 10 Z = 26.8159 Iteration 11 Z = 26.8159 Iteration 12 Z = 26.8159 Iteration 13 Z = 26.8159 Iteration 14 Z = 26.8159 ======================================================================= Comparison between the original C version and the Demeter version of the program: 1) The code size is the same, approximately 1800 lines. But the demeter version is much easier to adapt, because of the use of the strategy pattern mentioned above. 2) The C program uses arrays to represent the network topology, traffic matrix, ring and routing tables, resulting in code which is hard to understand and maintain. Also, the representation of the structures is hard-coded and very difficult to change. But execution is faster. With Demeter, the structures used by the program are all defined in the class dictionary, and minor changes/additions of parts can be performed very easily. Also, the code is much easier to understand and maintain. But the list traversals result in slower execution. 3) Both programs took about the same time to implement, i.e., 3 weeks. I think the reason for that is twofold: a) My experience with Demeter was much less than my experience with C, so I needed more time at the beginning to write code. b) There is no GUI debugging tool available for demeter yet which can help isolate bugs. With C, there is always the option to use xxgdb or dbxtool.