17.07.2015 Views

Implement a simulator, in Java, for evaluating AntNet routing protocol

Implement a simulator, in Java, for evaluating AntNet routing protocol

Implement a simulator, in Java, for evaluating AntNet routing protocol

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

[bytes/second], Distribution of <strong>in</strong>terfailure times, Distribution of repair times; The outputparameters are L<strong>in</strong>k status(up/down), Instantaneous workload utilization <strong>for</strong> each direction,Instantaneous rout<strong>in</strong>g utilization <strong>for</strong> each direction.L<strong>in</strong>k cost functionThe l<strong>in</strong>k cost function is used to ma<strong>in</strong>ta<strong>in</strong> and periodically update a cost <strong>for</strong> each l<strong>in</strong>k <strong>in</strong> thenetwork. When the cost is updated, the l<strong>in</strong>k cost value is calculated by apply<strong>in</strong>g atrans<strong>for</strong>mation to a statistic cost "raw cost" which is obta<strong>in</strong>ed on the l<strong>in</strong>k dur<strong>in</strong>g theprevious update period. Hop-count, utilization, delay, and hop-normalized delay are therow cost supported by CuRS.There should be only one LCostFcn object. So I use S<strong>in</strong>gleton pattern to ensure only one<strong>in</strong>stance of L<strong>in</strong>k cost function exist <strong>in</strong> the target system. There is a static variable costFcnand a static method named "getCostFcn()" <strong>in</strong> the LcostFcn.java. L<strong>in</strong>k cost function is not apart of the network so do not connect it to a component <strong>in</strong> the network. If an <strong>in</strong>teraction isneeded between l<strong>in</strong>k cost function and components, l<strong>in</strong>k cost function object obta<strong>in</strong>ed fromLcostFcn.getCostFcn ()".Rout<strong>in</strong>gI def<strong>in</strong>e Routet as abstract class to represent the common th<strong>in</strong>gs of each rout<strong>in</strong>g algorithm;Routet is also a k<strong>in</strong>d of component. Every specific rout<strong>in</strong>g object is the concrete class ofRoutet and executes a rout<strong>in</strong>g algorithm. At each node, the attached rout<strong>in</strong>g object buildsand ma<strong>in</strong>ta<strong>in</strong>s a rout<strong>in</strong>g table, which specifies a next-hop <strong>for</strong> each dest<strong>in</strong>ation.The rout<strong>in</strong>g object exchanges <strong>in</strong><strong>for</strong>mation by rout<strong>in</strong>g packets, more precisely, a rout<strong>in</strong>gobject passes a rout<strong>in</strong>g packet to its local node, which then sends it to a neighbor<strong>in</strong>g node,which then passes it to its local rout<strong>in</strong>g object. In the current version, I just implementedtwo types of rout<strong>in</strong>g components correspond<strong>in</strong>g to two rout<strong>in</strong>g algorithms: SPF and<strong>AntNet</strong>.The <strong>in</strong>put parameters of SPF are Mean and standard deviation of topology broadcast period[milliseconds]; The output parameters are Global topology table (adjacency matrix), localtopology table, and Rout<strong>in</strong>g table.WorkloadThe workload component model the user traffic <strong>in</strong> the target system. In each workloadsource-s<strong>in</strong>k pair, the source component produces workload packets and passes them to itsnode component. These packets are then <strong>for</strong>warded by the node components until theyreach their dest<strong>in</strong>ation node, where they are consumed by the s<strong>in</strong>k component.Input parameters of FTP_Source and FTP_S<strong>in</strong>k are Initial source-s<strong>in</strong>k status (on/off),Number of connections between the specified FTP_Source and FTP_S<strong>in</strong>k, Averagenumber of packets per connection, Packet length [bytes], Average delay betweenconnections [milliseconds], Delay between packets [milliseconds], Produce w<strong>in</strong>dow size[packets], Send w<strong>in</strong>dow size [packets]; The output parameters are Source-s<strong>in</strong>kstatus(on/off), Number of the current connection, Number of packets <strong>in</strong> the currentconnection, Number of the current packet <strong>in</strong> the current connection, Number of packetsproduced, Number of packets sent, Number of packets acknowledged, Number of packetsreceived, Number of packets retransmitted, Roundtrip time estimate [microseconds],Instantaneous sent rate, Instantaneous acked rate, Instantaneous retransmission rate,Instantaneous delay per packet [milliseconds].NodeA node has a separate L<strong>in</strong>kedList to store packets <strong>for</strong> each outgo<strong>in</strong>g l<strong>in</strong>k, and a s<strong>in</strong>gle

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!