Assignment

  • 下载并安装VanetMobiSim,http://vanet.eurecom.fr/
  • 使用道路地图(VanetMobiSim can import maps from the US Census Bureau TIGER/Line)
  • 地图范围截取1km*1km,车辆密度300,车速30-80km/h
  • 模拟时间60s

Guide

VanetMobiSim is an extension for the CANU Mobility Simulation Environment (CanuMobiSim), a flexible framework for user mobility modeling.

VanetMobiSim是CANU移动模拟环境(CanuMobiSim)的扩展,CanuMobiSim是一个灵活的用户移动建模框架。

CanuMobiSim is JAVA-based and can generate movement traces in different formats, supporting different simulation/emulation tools for mobile networks (NS2, GloMoSim, QualNet, NET). CanuMobiSim originally includes parsers for maps in the Geographical Data Files (GDF) standard and provides implementations of several random mobility models as well as models from physics and vehicular dynamics.

CanuMobiSim基于JAVA,可以生成不同格式的运动轨迹,支持针对移动网络(NS2、GloMoSim、QualNet、NET)的不同模拟/仿真工具。CanuMobiSim最初包括地理数据文件(GDF)标准中的地图解析器,并提供了几种随机移动模型以及物理和车辆动力学模型的实现。

The VanetMobiSim extension focuses on vehicular mobility, and features new realistic automotive motion models at both macroscopic and microscopic levels. At macroscopic level, VanetMobiSim can import maps from the US Census Bureau TIGER/Line? database, or randomly generate them using Voronoi tesselation. Also, it adds support for multi-lane roads, separate directional flows, differntiated speed constraints and traffic signs at intersections. At microscopic level, VanetMobiSim implements new mobility models, providing realistic car-to-car and car-to-infrastructure interaction. According to these models, vehicles regulate their speed depending on nearby cars, overtake each other and act according to traffic signs in presence of intersections.

VanetMobiSim扩展侧重于车辆的机动性,并在宏观和微观层面上提供新的真实汽车运动模型。在宏观层面上,VanetMobiSim可以从美国人口普查局TIGER/Line导入地图?数据库,或使用Voronoi细分随机生成它们。此外,它还增加了对多车道道路、独立方向流、不同速度限制和交叉口交通标志的支持。在微观层面上,VanetMobiSim实现了新的移动模型,提供了逼真的车对车和车对基础设施的交互。根据这些模型,车辆根据附近的车辆调节速度,相互超车,并在交叉口处根据交通标志采取行动。

VanetMobiSim mobility patterns have been validated against TSIS-CORSIM - a well known and validated traffic generator - proving the high level of realism reached by VanetMobiSim.

VanetMobiSim移动模式已根据TSIS-CORSIM(一种知名且经验证的流量生成器)进行验证,证明了VanetMobiSim所达到的高度真实性。

Requirements

VanetMobiSim binaries require the presence of a Java Run Time Environment version 1.5 and higher. If the user downloaded the source files, VanetMobiSim requires the presence of a Java SDK version 1.5 or higer as well as Apache Ant.

VanetMobiSim二进制文件需要Java运行时环境版本1.5及更高版本。如果用户下载了源文件,VanetMobiSim需要Java SDK版本1.5或更高版本以及Apache Ant。

We make the user aware that most of the linux and windows systems come with a pre-installed JVM. However, VanetMobiSim will likely not work if the JVM is not the Sun JVM. Check your version with this command:

java -version

我们让用户知道,大多数linux和windows系统都带有预安装的JVM。但是,如果JVM不是Sun JVM,那么VanetMobiSim可能无法工作。使用以下命令检查您的版本:

java -version

virtual-machine:~$ java -version

Command 'java' not found, but can be installed with:

sudo apt install openjdk-11-jre-headless  # version 11.0.11+9-0ubuntu2~20.04, or
sudo apt install default-jre              # version 2:1.11-72
sudo apt install openjdk-16-jre-headless  # version 16.0.1+9-1~20.04
sudo apt install openjdk-8-jre-headless   # version 8u292-b10-0ubuntu1~20.04
sudo apt install openjdk-13-jre-headless  # version 13.0.7+5-0ubuntu1~20.04
sudo apt install openjdk-17-jre-headless  # version 17+35-1~20.04

virtual-machine:~$ sudo apt install openjdk-11-jre-headless

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:
  ca-certificates-java java-common
建议安装:
  default-jre fonts-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho
  fonts-wqy-microhei | fonts-wqy-zenhei
下列【新】软件包将被安装:
  ca-certificates-java java-common openjdk-17-jre-headless
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 99 个软件包未被升级。
需要下载 43.5 MB/43.5 MB 的归档。
解压缩后会消耗 193 MB 的额外空间。
您希望继续执行吗? [Y/n] y

virtual-machine:~$ java -version
openjdk version "17" 2021-09-14
OpenJDK Runtime Environment (build 17+35-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 17+35-Ubuntu-120.04, mixed mode, sharing)


Download the latest Sun JVM and Apache Ant.

下载最新的Sun JVMApache Ant

alt

sudo apt install ant

Installation

VanetMobiSim is ready to run and plateform independant. The user can simply download the VanetMobiSim java binaries. No further processing is required.

VanetMobiSim已准备就绪,可以独立运行并形成平台。用户只需下载VanetMobiSim java二进制文件即可。无需进一步处理。

In order to comply with the copyright of CanuMobiSim framework, we cannot diffuse the full source code of VanetMobiSim, which includes portions of CanuMobiSim. However, the copyright allows us to diffuse the source code and extensions brought to CanuMobiSim by VanetMobiSim. Therefore, in order to obtain the full source code of the VanetMobiSim simulator, we let the user patch CanuMobiSim source code with VanetMobiSim source code and finally compile the project. The procedure is totally automatic and uses the power of Apache Ant.

为了遵守CanuMobiSim框架的版权,我们不能传播VanetMobiSim的完整源代码,其中包括部分CanuMobiSim。

然而,版权允许我们传播VanetMobiSim带给CanuMobiSim的源代码和扩展。因此,为了获得VanetMobiSim模拟器的完整源代码,我们让用户用VanetMobiSim源代码修补CanuMobiSim源代码,并最终编译项目。

这个过程是完全自动的,并且使用了ApacheAnt的强大功能。

  • Download the source code of VanetMobiSim and expand it in a base directory of your choice. You should get the following subdirectories and files:
    • jar/
    • build.xml
    • VanetMobiSim-src.jar
    • VanetMobiSim-samples.jar
    • mypackages.lst
    • READ_ME

下载VanetMobiSim的源代码,并在您选择的基本目录中进行扩展。您应该获得以下子目录和文件:

jar/

build.xml

VanetMobiSim-src.jar

VanetMobiSim-samples.jar

mypackages.lst

READ_ME

  • Download the source code of CanuMobiSim Expand it in the same directory. You should get a subdirectoy named "src/". At this time, your current directory should contains:
    • jar/
    • src/
    • build.xml
    • VanetMobiSim-src.jar
    • VanetMobiSim-samples.jar
    • mypackages.lst
    • READ_ME

下载CanuMobiSim的源代码,并在同一目录中进行扩展。你应该得到一个名为“SRC/”的子目录。此时,您当前的目录应包含:

jar/

src/

build.xml

VanetMobiSim-src.jar

VanetMobiSim-samples.jar

mypackages.lst

READ_ME

  • Open a terminal and go to your directory. Be sure that you have a working and well configured version of Apache Ant and that the build.xml file is in the base directory you will launch ant.

打开终端并转到您的目录。确保您有一个运行良好且配置良好的Apache Ant版本,并且build.xml文件位于要启动Ant的基本目录中。

Type:

"ant patch"

The program will patch the src/ directory with VanetMobiSim source files.

该程序将用VanetMobiSim源文件修补src/目录。

  • Finally, in order to build the simulator and create the javadocs

最后,为了构建模拟器并创建javadocs

Type:

"ant all"

Warnings generated by javadoc are not important. They are created because we do not distribute the source code of the geotransform java library (It may be found here: GeoTransform)

javadoc生成的警告并不重要。创建它们是因为我们不分发geotransform java库的源代码(可以在这里找到:GeoTransform)

The binary .jar file of VanetMobiSim will be place in the jar/ subdirectory.

VanetMobiSim的binary.jar文件将放在jar/子目录中。

  • You can now use VanetMobiSim according to the user manual.

您现在可以根据用户手册使用VanetMobiSim。