天天看點

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