当前位置:   article > 正文

机会网络:ONE学习笔记三:defualt_settings.txt配置文件解读_deforum_settings.txt

deforum_settings.txt

本文参考了 https://www.cnblogs.com/SunSmileCS/archive/2012/12/28/2836927.html

以及https://blog.csdn.net/wb7931021/article/details/41077047

本文属于学习并做笔记,感谢来自博主的分享,如有侵权请联系,定及时删除。

One中的配置文件是设置了整个仿真环境的条件,包括以下内容:
1. 想定参数:
  1) 想定名称
  2) 是否模拟连接
  3) 时间步进
  4) 仿真结束时间
2. Interface参数
  1) 传输速度
  2) 传输范围
3. 节点信息(可以以组为单位对节点进行配置)
  1) 移动模型(如随机走动模型、基于地图的运动模型);
  2) 数量
  3) 缓存大小
  4) 等待时间范围
  5) 移动速度
  6) 消息存活最大时间
4. 路由算法

下面对default_settings.txt进行分析:

 

  1. One中的配置文件是设置了整个仿真环境的条件,包括以下内容:
  2. 1. 想定参数:
  3.   1) 想定名称
  4.   2) 是否模拟连接
  5.   3) 时间步进
  6.   4) 仿真结束时间
  7. 2. Interface参数
  8.   1) 传输速度
  9.   2) 传输范围
  10. 3. 节点信息(可以以组为单位对节点进行配置)
  11.   1) 移动模型(如随机走动模型、基于地图的运动模型);
  12.   2) 数量
  13.   3) 缓存大小
  14.   4) 等待时间范围
  15.   5) 移动速度
  16.   6) 消息存活最大时间
  17. 4. 路由算法
  18. 下面对default_settings.txt进行分析:
  19. #
  20. # Default settings for the simulation
  21. #
  22. ## Scenario settings
  23. #想定名称的作用,主要是生成report文件名称的一部分,
  24. #最好每次运行的时候加一个编号,以免仿真结束生成的报告覆盖上一次结果。
  25. Scenario.name = default_scenario
  26. #是否模拟节点连接的动作,
  27. #true则GUI界面中节点一直在动,而且会显示节点间的连接状况
  28. Scenario.simulateConnections = true
  29. #时间步进,单位为s,
  30. #ONE是时间驱动模型,通过累加时间片来模拟时间的推进
  31. #另一个比较有名的商业网络仿真器OPNET,则是事件驱动,
  32. #事件驱动就是以事件为单位来模拟时间推进的过程。
  33. Scenario.updateInterval = 0.1
  34. # 43200s == 12h
  35. #仿真整个过程持续时间
  36. Scenario.endTime = 43200
  37. #interface可以理解为DTN节点上的无线网卡,
  38. #在仿真器中的功能主要是判断两个节点是否连通
  39. #以及连通的传输速率,常量和变量都可以。
  40. ## Interface-specific settings:
  41. # type : 属于interface包中的哪个类,直接写类名称
  42. # For different types, the sub-parameters are interface-specific
  43. # 对于SimpleBroadcastInterface, 参数如下:
  44. # transmitSpeed : interface传输速率 (比特每秒) 
  45. # transmitRange : interface传输范围 (米)
  46. # "Bluetooth" interface for all nodes
  47. btInterface.type = SimpleBroadcastInterface
  48. # Transmit speed of 2 Mbps = 250kBps
  49. btInterface.transmitSpeed = 250k
  50. btInterface.transmitRange = 10
  51. # High speed, long range, interface for group 4
  52. highspeedInterface.type = SimpleBroadcastInterface
  53. highspeedInterface.transmitSpeed = 10M
  54. highspeedInterface.transmitRange = 1000
  55. # Define 6 different node groups
  56. Scenario.nrofHostGroups = 6
  57. ## Group-specific settings:
  58. # One中节点的组织是通过组实现的,属于同一组的所有节点的参数配置一样
  59. # groupID : Group's identifier. Used as the prefix of host names
  60. # nrofHosts: number of hosts in the group
  61. # movementModel: movement model of the hosts (valid class name from movement package)
  62. # waitTime: minimum and maximum wait times (seconds) after reaching destination
  63. # speed: minimum and maximum speeds (m/s) when moving on a path
  64. # bufferSize: size of the message buffer (bytes)
  65. # router: router used to route messages (valid class name from routing package)
  66. # activeTimes: Time intervals when the nodes in the group are active (start1, end1, start2, end2, ...)
  67. # msgTtl : TTL (minutes) of the messages created by this host group, default=infinite
  68. ## Group and movement model specific settings
  69. # pois: Points Of Interest indexes and probabilities (poiIndex1, poiProb1, poiIndex2, poiProb2, ... )
  70. #       for ShortestPathMapBasedMovement
  71. # okMaps : which map nodes are OK for the group (map file indexes), default=all 
  72. #          for all MapBasedMovent models
  73. # routeFile: route's file path - for MapRouteMovement
  74. # routeType: route's type - for MapRouteMovement
  75. #当仿真场景中涉及到多个组,那么可以设置所有组都默认的设置
  76. #然后在具体每个组再根据自己的特点进行设置,这样的设计可以简化节点配置
  77. # Common settings for all groups
  78. Group.movementModel = ShortestPathMapBasedMovement
  79. Group.router = EpidemicOracleRouter
  80. Group.bufferSize = 2000M
  81. Group.waitTime = 0, 120
  82. # All nodes have the bluetooth interface
  83. Group.nrofInterfaces = 1
  84. Group.interface1 = btInterface
  85. # Walking speeds
  86. Group.speed = 0.5, 1.5
  87. # Message TTL of 300 minutes (5 hours)
  88. Group.msgTtl = 300
  89. Group.nrofHosts = 40
  90. # group1 (pedestrians) specific settings
  91. Group1.groupID = p
  92. # group2 specific settings
  93. Group2.groupID = c
  94. # cars can drive only on roads
  95. Group2.okMaps = 1
  96. # 10-50 km/h
  97. Group2.speed = 2.7, 13.9
  98. # another group of pedestrians
  99. Group3.groupID = w
  100. # The Tram groups
  101. Group4.groupID = t
  102. #Group4.bufferSize = 1000M
  103. Group4.movementModel = ShortestPathMapBasedMovement
  104. Group4.routeFile = data/tram3.wkt
  105. Group4.routeType = 1
  106. Group4.waitTime = 10, 30
  107. Group4.speed = 7, 10
  108. Group4.nrofHosts = 2
  109. Group4.nrofInterfaces = 2
  110. Group4.interface1 = btInterface
  111. Group4.interface2 = highspeedInterface
  112. Group5.groupID = t
  113. #Group5.bufferSize = 1000M
  114. Group5.movementModel = ShortestPathMapBasedMovement
  115. Group5.routeFile = data/tram4.wkt
  116. Group5.routeType = 2
  117. Group5.waitTime = 10, 30
  118. Group5.speed = 7, 10
  119. Group5.nrofHosts = 2
  120. Group6.groupID = t
  121. #Group6.bufferSize = 1000M
  122. Group6.movementModel = ShortestPathMapBasedMovement
  123. Group6.routeFile = data/tram10.wkt
  124. Group6.routeType = 2
  125. Group6.waitTime = 10, 30
  126. Group6.speed = 7, 10
  127. Group6.nrofHosts = 2
  128. ## 消息生成参数
  129. # 事件发生器数量
  130. Events.nrof = 1
  131. # 事件发生器一的类名
  132. Events1.class = MessageEventGenerator
  133. # (following settings are specific for the MessageEventGenerator class)
  134. #消息生成的时间间隔,(在25~35秒之间生成一个消息)
  135. Events1.interval = 25,35
  136. # 消息大小 (500kB - 1MB)
  137. Events1.size = 500k,1M
  138. # 消息源节点和目的节点的地址范围
  139. #(one中节点的地址就是一个整形数字)
  140. Events1.hosts = 0,125
  141. # 消息ID前缀
  142. Events1.prefix = M
  143. ## 移动模型的设置
  144. # seed for movement models' pseudo random number generator (default = 0)
  145. MovementModel.rngSeed = 1
  146. # World's size for Movement Models without implicit size (width, height; meters)
  147. MovementModel.worldSize = 4500, 3400
  148. # How long time to move hosts in the world before real simulation
  149. MovementModel.warmup = 1000
  150. ## Map based movement -movement model specific settings
  151. MapBasedMovement.nrofMapFiles = 4
  152. MapBasedMovement.mapFile1 = data/roads.wkt
  153. MapBasedMovement.mapFile2 = data/main_roads.wkt
  154. MapBasedMovement.mapFile3 = data/pedestrian_paths.wkt
  155. MapBasedMovement.mapFile4 = data/shops.wkt
  156. ## Reports - all report names have to be valid report classes
  157. #所有报告都是在report包中的类名指定
  158. #报告的数量,或者最后需要输出多少种报告
  159. Report.nrofReports = 5
  160. #启动时间,或者说从什么时候开始收集数据 (模拟器的相对时间,单位是秒)
  161. Report.warmup = 0
  162. #报告生成的文件默认存放目录,相对于ONE源码顶级目录开始
  163. #如果是多次仿真对比结果,需要每一次都修改为不同的目录,以免被覆盖
  164. #或者修改最开始的Scenario的名称
  165. Report.reportDir = reports/
  166. #需要生成哪些报告,每个报告在上面的目录下生成一个txt文件。
  167. Report.report1 = MessageStatsReport
  168. Report.report2 = MessageDelayReport
  169. Report.report3 = MessageDeliveryReport
  170. Report.report4 = MessageGraphvizReport
  171. Report.report5 = MessageReport
  172. ## Default settings for some routers settings
  173. ProphetRouter.secondsInTimeUnit = 30
  174. SprayAndWaitRouter.nrofCopies = 6
  175. SprayAndWaitRouter.binaryMode = true
  176. ## 优化设置,会影响到仿真的速度
  177. ## 详细见core.world类 
  178. Optimization.cellSizeMult = 5
  179. Optimization.randomizeUpdateOrder = true
  180. #界面设置
  181. ## GUI settings
  182. # GUI underlay image settings
  183. GUI.UnderlayImage.fileName = data/helsinki_underlay.png
  184. # Image offset in pixels (x, y)
  185. GUI.UnderlayImage.offset = 64, 20
  186. # Scaling factor for the image
  187. GUI.UnderlayImage.scale = 4.75
  188. # Image rotation (radians)
  189. GUI.UnderlayImage.rotate = -0.015
  190. # how many events to show in the log panel (default = 30)
  191. GUI.EventLogPanel.nrofEvents = 100
  192. # Regular Expression log filter (see Pattern-class from the Java API for RE-matching details)
  193. #GUI.EventLogPanel.REfilter = .*p[1-9]<->p[1-9]$

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/397525
推荐阅读
相关标签
  

闽ICP备14008679号