Showing posts with label SUMO. Show all posts
Showing posts with label SUMO. Show all posts

Tuesday, 31 March 2015

SUMO 0.12.3 and MOVE installation in Ubuntu 12.04 LTS

This post will tell you how to install SUMO 0.12.3 and MOVE in Ubuntu 12.04 LTS. 

SUMO (Simulation of Urban MObility) is a free and open traffic simulation suite which is available since 2001. SUMO allows modelling of intermodal traffic systems including road vehicles, public transport and pedestrians. Included with SUMO is a wealth of supporting tools which handle tasks such as route finding, visualization, network import and emission calculation. SUMO can be enhanced with custom models and provides various APIs to remotely control the simulation.

MOVE allows users to rapidly generate realistic mobility models for VANETs simulations. MOVE is built on top of an open source micro-traffic simulator SUMO. The output of MOVE is a realistic mobility model and can be immediately used by popular network simulators such as NS-2.

Execute the following commands one by one 

sudo apt-get update

sudo apt-get install build-essential autoconf automake libxmu-dev default-jre g++-4.4 libproj-dev libgdal-dev libxerces-c2-dev libfox-1.6-dev

export CC=gcc-4.4 CXX=g++-4.4 

SUMO 0.12.3 Installation 

Download Sumo 0.12.3 from here

Extract the downloaded file using the following command

tar xzvf sumo-src-0.12.3.tar.gz 

Now go inside the extracted file using the command cd sumo-0.12.3/ and run the following command

./configure

make

sudo make install

The screenshots of sumo and sumo-gui after successful installation of sumo 0.12.3




MOVE Installation 

Download the MOVE Software from here.

The file that you have downloaded is a java executable file, so you need to run the following command to run the file

java -jar filename.jar (Java required, if you have not installed java click here)

This is the screenshot of MOVE




Sunday, 1 March 2015

Creating Real Time Vehicular Traffic Simulation Using SUMO and Openstreetmap

This article is published in the "Open Source For you" magazine in India in this month August 2015 edition. This post will tell you how to create a real time traffic using SUMO and Openstreetmap.

I have used SUMO 0.22.0 for this simulation.

Prerequisite: SUMO required

Use openstreetmap to download your map

You need to select the map that you want to simulate and export it. After you export the map, it will ask for you to download it. Save the file.

Copy the downloaded file to your working directory.


Now run the following commands by seeing the video below

netconvert imports the road network stored in "map.osm" and stores the SUMO-network generated from this data into "map.net.xml":

netconvert --osm-files map.osm -o map.net.xml

OSM-data not only contains the road network but also a wide range of additional polygons such as buildings and rivers. These polygons can be imported using polyconvert and then added to a sumo-gui-configuration.

click here and copy the typemap file and save it to your working directory with the name typemap.xml

Using the file typemap.xml, polyconvert imports polygons from OSM-data and produces a Sumo-polygon file.

polyconvert --net-file map.net.xml --osm-files map.osm --type-file typemap.xml -o map.poly.xml

randomTrips.py generates a set of random trips for a given network (option -n). It does so by choosing source and destination edge either uniformly at random or weighted by length (option -l), by number of lanes (option -L) or both. The resulting trips are stored in an xml file (option -o, default trips.trips.xml) suitable for the DUAROUTER which is called automatically if the -r option (with a filename for the resulting route file) is given. The trips are distributed evenly in an interval defined by begin (option -b, default 0) and end time (option -e, default 3600) in seconds. The number of trips is defined by the repetition rate (option -p, default 1) in seconds. Every trip has an id consisting of a prefix (option --prefix, default "") and a running number.

python /home/kunal/sumo-0.22.0/tools/trip/randomTrips.py -n map.net.xml -e 100 -l

python /home/kunal/sumo-0.22.0/tools/trip/randomTrips.py -n map.net.xml -r map.rou.xml -e 100 -l

Now you need to make a sumo.cfg file for the configuration of sumo-gui. You can see that in the video below.

Now save the above file with a file name. I saved it with map.sumo.cfg

Now run the following command from terminal

sumo-gui map.sumo.cfg

After you enter the command, sumo GUI window will pop out.

You can have a look at this video for complete simulation


Share your experience with us, Any queries please comment below

Monday, 16 February 2015

Installing SUMO 0.22.0 in Linux Mint 64-bit Operating System

SUMO (Simulation of Urban MObility) is a free and open traffic simulation suite which is available since 2001. SUMO allows modelling of intermodal traffic systems including road vehicles, public transport and pedestrians. Included with SUMO is a wealth of supporting tools which handle tasks such as route finding, visualization, network import and emission calculation. SUMO can be enhanced with custom models and provides various APIs to remotely control the simulation.

The simulation platform SUMO offers many features:

  • Microscopic simulation - vehicles, pedestrians and public transport are modeled explicitly
  • Online interaction – control the simulation with TraCI
  • Simulation of multimodal traffic, e.g., vehicles, public transport and pedestrians
  • Time schedules of traffic lights can be imported or generated automatically by SUMO
  • No artificial limitations in network size and number of simulated vehicles
  • Supported import formats: OpenStreetMap, VISUM, VISSIM, NavTeq
  • SUMO is implemented in C++ and uses only portable libraries

Installation Steps

Step 1 : Download the latest version of SUMO from here.

Step 2 : Install the necessary packages by entering the following commands

sudo apt-get install libgdal1-dev libxerces-c2-dev libfox-1.6-dev libgl1-mesa-dev libglu1-mesa-dev

Step 3 : Copy the downloaded file from your Downloads folder to your home folder, Unzip the tar file using the command

tar zxvf sumo-src-0.22.0.tar.gz

Step 4 : Get inside sumo-0.22.0 using the command cd sumo-0.22.0 and enter these commands one after the other
  1. ./configure
  2. make
  3. sudo make install
Step 5 : After the installation is over, Enter the following command in your terminal to view the GUI

sumo-gui