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,在原來基礎上添加以下紅色字:  

//  $ sudo vim ~/.bashrc  (ubuntu 12.04 )

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,QualNetNET。以下介紹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路徑中加入指向antbin的路徑:

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 3cmd控制檯中切換到VanetMobiSim-1.1目錄下,輸入以下命令將VanetMobiSimCanuMobiSim的擴展部分合併到CanuMobiSim源碼中:

ant patch

控制檯信息如下:

 

 

此時當前目錄內容爲:

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配置文件請參考VanetMobiSimmunaul

Good Luck~

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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章