We have released Veins 2.0-rc2. It is based on MiXiM 2.2 and features a wealth of new models; most importantly, we added completely new and feature-rich models of IEEE 802.11p and IEEE 1609.4 DSRC/WAVE. We have updated the tutorial with a scenario demonstrating all new features.

Tutorial

Note: This tutorial assumes that you are using Windows 7, that your home directory is C:\Users\user, and that all necessary software will be installed in C:\Users\user\src (which was already created).

For building on Linux or Mac OS X, some packages may need to be installed. On Ubuntu Linux, this will likely mean running sudo aptitude install bison flex build-essential zlib1g-dev tk8.4-dev blt-dev libxml2-dev sun-java6-jre libpcap0.8-dev autoconf automake libtool libxerces-c2-dev proj libgdal1-dev libfox-1.6-dev. On Mac OS X, this will likely mean installing equivalent packages via Macports (sudo port install bison zlib tk blt libxml2 libtool xercesc proj gdal fox).

Aside from the paths given and the opening of the OMNeT++ MinGW command line window vs. a regular command line window, these steps are similar when building and running the simulations on Linux or Mac OS X.

Step 1 - Download SUMO

Download the SUMO 0.13.1 binaries and unpack them as C:\Users\user\src\sumo-0.13.1. This should give you an executable C:\Users\user\src\sumo-0.13.1\bin\sumo.exe. Note that recent versions of the SUMO binaries require the Microsoft Visual C++ 2010 Redistributable Package (x86) to be installed.

If you want to (or have to) build SUMO manually, detailed instructions for many platforms can be found on the InstallingSumo page of the SUMO wiki

Step 2 - Download and build OMNeT++ 4

Download OMNeT++ 4.2 for Windows and unpack it as C:\Users\user\src\omnetpp-4.2. This should give you a script C:\Users\user\src\omnetpp-4.2\mingwenv.cmd. Run it to open a MinGW command line window which closely mimics a Linux environment.

Build OMNeT++ 4 by running ./configure (making sure to examine the summary for potential errors) followed by make. If all went well, this will result in /c/Users/user/src/omnetpp-4.2/bin/omnetpp being built. Run omnetpp to launch the OMNeT++ 4 IDE. This tutorial will assume that you picked C:\Users\user\src\omnetpp-4.2\samples as your workspace.

Step 3 - Download and build the Veins module framework

Download the Veins 2.0-rc2 module framework for MiXiM and unpack it as C:\Users\user\src\veins-2.0-rc2. Import the project into your OMNeT++ IDE workspace by clicking File > Import > General: Existing Projects into Workspace and selecting the directory you unpacked the module framework to.

Build the newly imported project by choosing Project > Build All in the OMNeT++ 4 IDE. After the project built, you are ready to run your first IVC evaluations, but to ease debugging, this tutorial will now outline the steps necessary to make sure every component works as it should.

Step 4 - Make sure SUMO is working

In the OMNeT++ MinGW command line window, you should be able to have SUMO simulate an example scenario by changing the current directory to /c/Users/user/src/veins-2.0-rc2/examples/veins/ (cd ../veins-2.0-rc2/examples/veins) and running /c/Users/user/src/sumo-0.13.1/bin/sumo.exe -c erlangen.sumo.cfg.

Step 5 - Make sure OMNeT++ and the MiXiM Framework are working

In the OMNeT++ 4 IDE, you should be able to have OMNeT++ simulate an example scenario by right-clicking on veins-2.0-rc2/examples/baseNetwork/omnetpp.ini and choosing Run As > OMNeT++ simulation. This should create and start a launch configuration that opens an OMNeT++ simulation of a simple wireless network. Click on the Run toolbar button to see it execute.

Final step - Run the Veins demo scenario

To save you the trouble of manually running SUMO prior to every OMNeT++ simulation, the Veins module framework comes with a small python script to do that for you. In the OMNeT++ MinGW command line window, run /c/Users/user/src/veins-2.0-rc2/sumo-launchd.py -vv -c /c/Users/user/src/sumo-0.13.1/bin/sumo.exe to start it. This script will proxy TCP connections between OMNeT++ and SUMO, starting a new copy of the SUMO simulation for every OMNeT++ simulation connecting.

In the OMNeT++ 4 IDE, simulate the Veins demo scenario by right-clicking on veins-2.0-rc2/examples/veins/omnetpp.ini and choosing Run As > OMNeT++ simulation. Don't forget to allow access to SUMO through any personal firewall you might run. Similar to the last example, this should create and start a launch configuration. You can later re-launch this configuration by clicking the green Run button in the OMNeT++ 4 IDE.

If everything worked as intended this will give you a working simulation scenario using OMNeT++ and SUMO running in parallel to simulate a stream of vehicles that gets interrupted by an accident.

This concludes the mini-tutorial. In-depth information on how to use Veins is available in the documentation, with answers to the most common questions in the list of Frequently Asked Questions (FAQ). A lot of further information on building and running simulations, is available from the OMNeT++ documentation pages (including screencasts, tutorials, and an extensive user manual) and the SUMO Wiki (including tutorials, how-tos, and a comprehensive user manual).