correct flow value
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu May 21 17:22:30 2009 +0100 (8 months ago)
changeset 399496eda17b4423
parent 3993 a9c9a1d9eb80
child 3995 b6a5161b3149
correct flow value
utils/flowmon/flowmon-bench.py
     1.1 --- a/utils/flowmon/flowmon-bench.py	Thu May 21 15:04:25 2009 +0100
     1.2 +++ b/utils/flowmon/flowmon-bench.py	Thu May 21 17:22:30 2009 +0100
     1.3 @@ -71,9 +71,9 @@
     1.4      port = 9   # Discard port(RFC 863)
     1.5      onOffHelper = ns3.OnOffHelper("ns3::UdpSocketFactory",
     1.6                                    ns3.Address(ns3.InetSocketAddress(ns3.Ipv4Address("10.0.0.1"), port)))
     1.7 -    onOffHelper.SetAttribute("DataRate", ns3.DataRateValue(ns3.DataRate("95.5145551456kbps")))
     1.8 -    onOffHelper.SetAttribute("OnTime", ns3.RandomVariableValue(ns3.ConstantVariable(0.9)))
     1.9 -    onOffHelper.SetAttribute("OffTime", ns3.RandomVariableValue(ns3.UniformVariable(0, 0.02)))
    1.10 +    onOffHelper.SetAttribute("DataRate", ns3.DataRateValue(ns3.DataRate("94.4649446494kbps")))
    1.11 +    onOffHelper.SetAttribute("OnTime", ns3.RandomVariableValue(ns3.ConstantVariable(1)))
    1.12 +    onOffHelper.SetAttribute("OffTime", ns3.RandomVariableValue(ns3.ConstantVariable(0)))
    1.13  
    1.14      nodes = []
    1.15      for yi in range(num_nodes_side):
    1.16 @@ -107,6 +107,8 @@
    1.17      # -- compute the static routes --
    1.18      ns3.GlobalRouteManager.PopulateRoutingTables()
    1.19  
    1.20 +    start_time_rng = ns3.UniformVariable(0.1, 0.2)
    1.21 +
    1.22      # -- create the flows --
    1.23      for yi in xrange(num_nodes_side):
    1.24          for xi in xrange(num_nodes_side-flow_hops):
    1.25 @@ -116,13 +118,13 @@
    1.26              destaddr = get_node_address(nodes[yi][xi+flow_hops])
    1.27              onOffHelper.SetAttribute("Remote", ns3.AddressValue(ns3.InetSocketAddress(destaddr, port)))
    1.28              app = onOffHelper.Install(ns3.NodeContainer(nodes[yi][xi]))
    1.29 -            app.Start(ns3.Seconds(0))
    1.30 +            app.Start(ns3.Seconds(start_time_rng.GetValue()))
    1.31              
    1.32              # flow from node (yi, xi+flow_hops) to (yi, xi)
    1.33              destaddr = get_node_address(nodes[yi][xi])
    1.34              onOffHelper.SetAttribute("Remote", ns3.AddressValue(ns3.InetSocketAddress(destaddr, port)))
    1.35              app = onOffHelper.Install(ns3.NodeContainer(nodes[yi][xi+flow_hops]))
    1.36 -            app.Start(ns3.Seconds(0))
    1.37 +            app.Start(ns3.Seconds(start_time_rng.GetValue()))
    1.38  
    1.39  
    1.40      # -- create the flow monitor, if requested --