天天看点

VanetMobiSim安装

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

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

The VanetMobiSim extension focuses on vehicular mobility, and features new realistic automotive motionmodels at both macroscopic and microscopic levels. At macroscopic level, VanetMobiSim can import maps from theUS Census Bureau TIGER/Line? database, or randomlygenerate them using Voronoi tesselation. Also, it adds support for multi-lane roads, separate directionalflows, differntiated speed constraints and traffic signs at intersections. At microscopic level, VanetMobiSimimplements 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 actaccording to traffic signs in presence of intersections.

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.

News

February 14th 2007: VanetMobiSim 1.1 is now available !!

Dowloads

VanetMobiSim 1.1 binaries (234 kB) [download](includes portions of CanuMobiSim 2001-2003, © Universität Stuttgart, Germany)

VanetMobiSim 1.1 sources file (1483 kB) [download]

VanetMobiSim 1.1 user manual (182 kB) [download]

Changes

VanetMobiSim 1.1

  • A Speed-based Shortest Path Trip generation has been added. Accordingly, we can customize a threshold between high speed street segmentsand distance to the destination, which may generate a longer but faster path.
  • Street Segments includes a speed limitation attribute. For TIGER files, we generate default values based on the State of California current regulations, or let the user define them in an external file.
  • Decoupling the multi-lane feature from thelane changing feature. When multiple lanes are available, each car chooses one lane and keeps it (if available) for the whole trip.
  • New Randomized Dijikstra shortest path algorithm. The original Dijkstra's algorithm, given a start and an end point,always selects thesame path, even in presence of multiple available paths with same weights. For traffic balancing, cars should be able to selectdifferent shortest paths.

Planned:

  • Trace generation starting at a user defined simulation time in order to ignore thetransient phase.
  • Traffic generation according to different laws (Poisson,Erland, etc..).
  • Obstacle extraction from VanetMobiSim topologies in order to be parsed by a network simulator and computeradio obstacles.
  • New Incident Extension, which specifies an incident class, its location and its duration, in order to first simulate traffic adaptability and also vehicular network protocols.

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 aJava SDK version 1.5 or higer as well as 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 notwork if the JVM is not the Sun JVM. Check your version with this command:

    java -version

Download the latest Sun JVM and Apache Ant.

Installation

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

In order to comply with the copyright of CanuMobiSim framework, we cannot diffuse the full source code of VanetMobiSim, which includesportions 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 theuser 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.

  • 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

  • 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

  • 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.

    Type:

    "ant patch"

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

  • Finally, in order to build the simulator and create the 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)

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

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

Publications

  • J. Härri, M. Fiore, F. Fethi, and C. Bonnet, VanetMobiSim: generating realistic mobility patterns for VANETs, in Proc. of the3rd ACM International Workshop on Vehicular Ad Hoc Networks (VANET'06), September 29, 2006, Los Angeles, USA. [.pdf]
  • M. Fiore, J. Härri, F. Fethi, and C. Bonnet, Vehicular mobility simulation for VANETs, in Proc. of the40th IEEE Annual Simulation Symposium (ANSS'07), March 25 - March 29, 2007, Norfolk, USA. [.pdf]

转自:http://vanet.eurecom.fr/

----------------------------------------分割线------------------------------------------------------

亲测,可行!

过程比较麻烦,需一步步来!

--------------------------------------------------------------------------------------------------------

ubuntu  安装 JDK

1、到 Sun 的官网下载

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html      

选择 accept license ,然后选择适合自己机型的JDK下载。

2、解压文件,修改文件名

$ sudo mkdir /usr/lib/jvm
$ sudo tar zxvf jdk-7u21-linux-i586.tar.gz -C /usr/lib/jvm
$ cd /usr/lib/jvm
$ sudo mv jdk1.7.0_21 java      

3、添加环境变量

$ sudo vim ~/.bashrc      

加入如下内容

export JAVA_HOME=/usr/lib/jvm/java 
export JRE_HOME=${JAVA_HOME}/jre  
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib  
export PATH=${JAVA_HOME}/bin:$PATH  
4、测试
  
          
$ java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Server VM (build 23.21-b01, mixed mode)      
转自:http://www.cnblogs.com/plinx/archive/2013/06/01/3113106.html

----------------------------------------------------------------------------------------

Ubuntu中ANT的安装和配置

1. 到Apache官网下载最新版本的ant:http://ant.apache.org/bindownload.cgi

2. 解压下载下来的.tar.gz文件: tar -xf apache-ant-1.8.2-bin.tar.gz (可能会要求输入密码)

3.将解压出来的文件移动到/opt/下:sudo mv apache-ant-1.8.2 /opt/ (sudo 不能省,否则没有权限)

4.配置环境变量:sudo gedit /etc/profile,在原来基础上添加以下红色字:  

export ANT_HOME=/opt/apache-ant-1.8.2

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk

export PATH=$JAVA_HOME/bin:$PATH:$ANT_HOME/bin

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

5.验证是否安装成功: ant -version

Apache Ant(TM) version 1.8.2 compiled on December 20 2010

转自:http://www.linuxidc.com/Linux/2013-08/88955.htm

---------------------------------------------------------------------------------------

VanetMobiSim安装步骤

VanetMobiSim是针对车载移动应用对CanuMobiSim的一个扩展。CanuMobiSim是基于JAVA语言开发的,它能够产生不同格式的运动trace,同时能够支持不同类型的移动网络仿真或模拟工具,如NS-2,GloMoSim,QualNet和NET。以下介绍VanetMobiSim的安装过程:

一、安装所需的工具

1. JDK的安装

如果你的机器上已安装过JDK,请跳过此步;否则请到sun主页下载最新的jdk,安装结束后设置好环境变量。

以我的安装为例,jdk安装好的路径为C:\Program Files\Java\jdk1.6.0_11,则新建以下环境变量变量:

   JAVA_HOME = C:\Program Files\Java\jdk1.6.0_11

   CLASSPATH = .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar

   Path = %JAVA_HOME%\bin

设置好后,打开一个cmd控制台,输入javac命令检测是否安装成功。

2.Ant的安装

如果你的机器上已安装过Ant,请跳过此步;否则请下载最新版本的Apache Ant解压后设置一下环境变量即可:

以我的安装为例,ant解压后的路径为C:\Phenix_working\Program\apache-ant-1.7.1,则新建以下环境变量变量:

ANT_HOME = C:\Phenix_working\Program\apache-ant-1.7.1

在path路径中加入指向ant的bin的路径:

Path = %JAVA_HOME%\bin; %ANT_HOME%\bin

设置好后,打开一个cmd控制台,输入ant,如果出现:

Buildfile: build.xml does not exist!

Build failed

则说明你的ant安装成功!

注:1)对于windows系统而言,系统环境变量中已有Path这个变量,但是推荐在用户环境变量中重新建一个path变量。

    2) 必须在设置好环境变量之后再打开cmd控制台,否则设置的环境变量对当前控制台无效!

二、VanetMobiSim的安装

Step 1:下载源码VanetMobiSim-1.1.zip,解压后目录VanetMobiSim-1.1中的内容为:

jar/

manual/

          build.xml

          VanetMobiSim-src.jar

          VanetMobiSim-samples.jar

          mypackages.lst

          READ_ME

Step 2:下载CanuMobiSim的源码CanuMobiSim_1_3_4_src.zip,将其解压到VanetMobiSim-1.1目录中,此时目录内容变为:

 jar/

 manual/

          src/

          build.xml

          VanetMobiSim-src.jar

          VanetMobiSim-samples.jar

          mypackages.lst

          READ_ME

Step 3:在cmd控制台中切换到VanetMobiSim-1.1目录下,输入以下命令将VanetMobiSim对CanuMobiSim的扩展部分合并到CanuMobiSim源码中:

ant patch

控制台信息如下:

VanetMobiSim安装

此时当前目录内容为:

jar/

manual/

samples/

src/

          build.xml

          mypackages.lst

        READ_ME

Step 4:执行ant all编译源码并打包成jar文件,一切顺利的话最后有编译成功的提示:

all:

BUILD SUCCESSFUL

Total time: 13 seconds

生成的VanetMobiSim.jar就是我们最终需要的可执行文件,要以下命令运行example中的IDM_IM.xml场景:

cd  jar

java -jar VanetMobiSim.jar ../samples/IDM_IM.xml

运行过程中会出现如下的节点移动画面:

编写XML配置文件请参考VanetMobiSim的munaul。

Good Luck~

转自:http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=9488438&id=3010400

NS2