ONEs是用来仿真机会网络的一款仿真器,本文是其中的文件,即使用说明的中文版,翻译不是特
别好,但是可以大概看出功能
The ONE v1.4.1 – Readme
The ONE is a Opportunistic Network Environment simulator which provides a powerful tool for generating mobility traces, running DTN messaging simulations with different routing protocols, and visualizing both simulations interactively in real-time and results after their completion.
是一个机会的网络环境模拟器,它提供了一个强大的工具,产生流动的痕迹,DTN的消息模拟运行不同的路由协议,交互可视化实时完成后,他们的结果都模拟。
目录
Quick start (2)
Compiling (2)
Running (2)
Configuring (3)
Run indexing (4)
Movement models (5)
Routing modules and message creation (8)
Reports (9)
Host groups (10)
The settings (10)
Scenario settings: (11)
Interface settings (used to define the possible interfaces the nodes can have) (11)
Host group settings (used in Group or GroupN namespace): (11)
Movement model settings: (14)
Report settings: (15)
Event generator settings: (15)
Other settings: (16)
GUI (16)
DTN2 Reference Implementation Connectivity (17)
Example Configuration (2-4 above) (18)
DTN2 Connectivity Configuration File (19)
Known Issues (19)
Toolkit (19)
Quick start
===========
Compiling
---------
You can compile ONE from the source code using the included compile.bat script. That should work both in Windows and Unix/Linux environment with Java 6 JDK or later.
你可以从源代码的使用compile.bat脚本的编译之一。这应该工作在Windows和Unix / Linux 与Java6 JDK或更高的环境。
If you want to use Eclipse for compiling the ONE, since version 1.1.0 you need to include some jar libraries in the project's build path. The libraries are located in the lib folder. To include them in Eclipse, assuming that you have an Eclipse Java project whose root folder is the folder where you extracted the ONE, do the following:
如果你想编制一个使用的Eclipse1.1.0版本以来,你需要在项目的构建路径中包括一些jar 库。该库位于lib文件夹中。包括在Eclipse中,假设你有一个Eclipse Java项目的根文件夹所在的文件夹中提取的一,执行下列操作:
select from menus: Project -> Properties -> Java Build Path
Go to "Libraries" tab
Click ""
Select "DTNConsoleConnection.jar" under the "lib" folder
Add the "ECLA.jar" the same way
Press "OK".
Now Eclipse should be able to compile the ONE without warnings.
现在,Eclipse应该能够编译没有警告的人。
Running
-------
ONE can be started using the included one.bat (for Windows) or one.sh (for Linux/Unix) script. Following examples assume you're using the Linux/Unix script (just replace "./one.sh" with "one.bat" for Windows).
可以开始使用包括one.bat(用于Windows)或one.sh(Linux / Unix系统)脚本。下面的例子假设你使用(与“one.bat”为Windows只需更换“。/ one.sh”)在Linux / Unix脚本。
Synopsis:
./one.sh [-b runcount] [conf-files]
values翻译Options:
-b Run simulation in batch mode. Doesn't start GUI but prints information about the progress to terminal. The option must be followed by the number of runs to perform in the batch mode or by a range of runs to perform, delimited with a colon (e.g, value 2:4 would perform runs 2, 3 and 4). See section "Run indexing" for more information.
-b在批处理模式下运行模拟。不启动图形用户界面,但打印有关信息终端的进展。该选项必须按班次,在批处理模式执行,或通过运行来执行,用冒号分隔的范围(例如,值2点04分将执行运行2,3和4)。查看更多信息“一节中的运行索引”。
Parameters:
conf-files: The configuration file names where simulation parameters are read from. Any number of configuration files can be defined and they are read in the order given in the command line. Values in the later config files override values in earlier config files.
CONF文件:仿真参数读取配置文件的名称。可以定义任意数量的配置文件,和他们在命令行中给定的顺序读取。后的配置文件中的值覆盖先前的配置文件的值。
Configuring
===========
All simulation parameters are given using configuration files. These files are normal text files that contain key-value pairs. Syntax for most of the variables is:
使用配置文件,所有的模拟参数。这些文件是正常的文本文件,其中包含键- 值对。大多数变量的语法是:
Namespace.key = value
<, the key is (usually) prefixed by a namespace, followed by a dot, and then key name. Key and valu
e are separated by equals-sign. Namespaces start with capital letter and both namespace and keys are written in CamelCase (and are case sensitive). Namespace defines (loosely) the part of the simulation environment where the setting has effect on. Many, but not all, namespaces are equal to the class name where they are read.
Especially movement models, report modules and routing modules follow this convention.
也就是说,关键是(通常)由一个命名空间,一个点,然后键名前缀。键和值都等于符号隔开。命名空间的开头大写字母和两个命名空间和密钥被写入驼峰(是大小写敏感的)。命名空间定义(松散)的设置影响的模拟环境中的一部分。命名空间是很多,但不是全部,等于他们读的类的名称。
尤其是运动模型,报表模块和路由模块遵循这个惯例。
Numeric values use '.' as the decimal separator and can be suffixed with kilo (k) mega (M) or giga (G) suffix. Boolean settings accept "true", "false", "0", and "1" as values.
数值使用'。'作为小数点分隔符,可以用公斤(K),兆(M)或千兆(G)的后缀后缀。布尔设置接受“真”,“假”,“0”,和值“1”。
Many settings define paths to external data files. The paths can be relative or absolute but the director
y separator must be '/' in both Unix and Windows environment.
许多设置定义外部数据文件的路径。路径可以是相对或绝对的,但目录分隔符必须是在Unix 和Windows环境下的'/'。
Some variables contain comma-separated values, and for them the syntax is:
有些变量包含逗号分隔的值,并为他们的语法是:
Namespace.key = value1, value2, value3, etc.
For run-indexed values the syntax is:
Namespace.key = [run1value; run2value; run3value; etc]
<, all values are given in brackets and values for different run are separated by semicolon. Each value can also be a comma-separated value.
For more information about run indexing, go to section "Run indexing".
也就是说,所有的值都在括号和价值观不同的运行是由分号分隔。每个值也可以是一个逗号分隔的值。
有关运行索引的更多信息,去节“运行索引”。
Setting files can contain comments too. A comment line must start with "#" character. Rest of the line is skipped when the settings are read. This can be also useful for disabling settings easily.
设置文件可以包含注释。注释行必须以“#”字符开始。设置读取时,该行其余部分将被跳过。这也可以用于禁用设置容易。
Some values (scenario and report names at the moment) support "value filling". With this feature, you can , scenario name dynamically from the setting values. This is especially useful when using run indexing. Just put setting key names in the value part prefixed and suffixed by two percent (%) signs. These placeholders are replaces by the current setting value from the configuration file. See the included snw_ for an example.
一些值(在目前的情况和报告名称)的支持“的值填充”。有了这个功能,您可以构建动态的设定值例如,场景名称。使用运行索引时,这是特别有用。只是把设定值的一部分关键的两个百分比(%)标志前缀和后缀名。这些占位符是从配置文件中的电流设定值取代。一个例子包含snw_。
File "", if exists, is always read and the other configuration files given as parameter can define more settings or override some (or even all) settings in the previous files. The idea is that you can define in the earlier files all the settings that are common for all the simulations and run different, specific, simulations using different configuration files.
始终是读文件“”,如果存在,并作为参数提供的其他配置文件可以定义更多的设置或重写部分(甚至全部)在以前的文件设置。我们的想法是,你可以在前面的文件定义为所有模拟的共同所有的设置和运行不同,具体的,模拟使用不同的配置文件。
Run indexing
------------
Run indexing is a feature that allows you to run large amounts of different configurations using only single configuration file. The idea is that you provide an array of settings (using the syntax
described above) for the variables that should be changed between runs. For example, if you want to run the simulation using five different random number generator seeds for movement models, you can define in the settings file the following:
运行索引是一项功能,允许你运行大量不同的配置,只使用单一的配置文件。的想法是,你提供了一个设置的数组变量之间应当改变运行(使用上述语法)。例如,如果你想运行的模拟使用运动模式的5个不同的随机数发生器种子,你可以在设置中定义文件如下:Seed = [1; 2; 3; 4; 5]
Now, if you run the simulation using command:
./one.sh -b 5
you would run first using seed 1 (run index 0), then another run using seed 2, etc. Note that you have to run it using batch mode (-b option) if you want to use different values. Without the batch mode flag the first parameter (if numeric) is the run index to use when running in GUI mode.
你会首先运行使用种子1(运行索引0),然后再运行,使用种子2,等等。注意你必须使用批次模式(-b选项)来运行它,如果你想使用不同的价值观。没有批处理模式标志的第一个参数(如数字)是运行在GUI模式下运行时使用的索引。
Run indexes wrap around: used value is the value at index (runIndex % arrayLength). Because of wrapping, you can easily run large amount of permutations easily. For example, if you define two key-value pairs:
运行指标环绕:使用的值是指数值(runIndex的%arrayLength)。由于包装,你可以很容易地轻松运行大量排列。例如,如果定义两个键- 值对:
key1 = [1; 2]
key2 = [a; b; c]
and run simulation using run-index count 6, you would get all permutations of the two values (1,a; 2,b; 1,c; 2,a; 1,b; 2,c). This naturally works with any amount of arrays. Just make sure that the smallest common nominator of all array sizes is 1 (e.g., use arrays whose sizes are primes)
-- unless you don't want all permutations but some values should be paired.
运行模拟运行指数数6,你会得到两个值(1,2,B1,C2,1,B2,C)的所有排列。这自然工程任何阵列金额。只要确保所有数组的大小,最小的共同提名为1(例如,使用数组,其大小是素数)
- 除非你不希望所有的排列组合,但一些值应配对。
Movement models
---------------
Movement models govern the way nodes move in the simulation. They provide coordinates, speeds and pause times for the nodes. The basic installation contains 5 movement models: random waypoint, map based movement, shortest path map based movement, map route movement and