Documente Academic
Documente Profesional
Documente Cultură
1. Installation Procedure
The following packages are required for the installation of MOVE
Linux Java SDK 1.4.2 or later - http://java.sun.com SUMO version: 0.9.8 - http://sumo.sourceforge.net Xerces (XML-parser) version: 2.7 - http://xerces.apache.org/xerces-c/index.html FOX-Toolkit (GUI Toolkit) version: 1.4.35 - http://www.fox-toolkit.org/ PROJ (Cartographic Projections Library): 4.5 http://www.remotesensing.org/proj/ GDAL (Geospatial Data Abstraction Library): 1.3.2 http://www.remotesensing.org/gdal/ NS2 version: 2.31 (all- in-one) - http://www.isi.edu/nsnam/ns/
o
o
cd src/xercesc ./runConfigure -plinu x -cgcc -xg ++ -min mem -nsocket -tnative -rpthread gmake make install
Build xercesc
o
Please refer http://sumo.sourceforge.net/wiki/index.php/LinuxBuild for further information. Note: Create a directory called temp under /home.
root@localhost root]# tar -zxvf ns-allinone-2.31.tar.gz [root@localhost root]# cd ns-allinone-2.31 [root@localhost ns-allinone-2.31]# ./install
Now run the following commands to set the environment
export NS_ HOM E=p wd/ns -allinone-2.31 export PATH= $NS_HOM E /tcl8.4.14/unix: $NS_HOM E /bin: $NS_ HOM E /tk8.4.14/unix:$PATH
export LD_ LIBRA RY_ PATH=$NS_HOM E /otcl-1.13: $NS_HOM E /lib:$LD_ LIBRA RY_PATH export TCL_ LIBRARY=$NS_HOM E /tcl8.4.14/library
You may edit the ~/.bash_profile file, so you would not need to make these changes every time you log back in.
Please refer http://www.isi.edu/nsnam/ns/ns-build.html#allinone for further information .
Enter java vanetsim to run the class file of the vanetsim.java file. It is as shown below:
Click on the Mobility Model to simulate the mobility of the vehicles in MOVE.
To come up with a vehicular simulator program we need to define the following mandatory fields: Node (point from which a road originates) Edge (Road between two nodes) Configuration of the above two. Create map (check if the configuration defined is without any ambiguity) Create Vehicle (Generation of vehicle to be simulated in the above map defined). Configuration (It is to co-relate the map defined and the routes file defined in Create vehicle option). Visualization (It is used to simulate the map and the vehicle defined)
Save
this
file
as
<filename>.nod.xml.
Roads Editor:
Each node defined must be connected throught a edge called as a Road. Hence a From node and To node has to be defined. The type of the road eg. Fast lane or Express can be defined as per user need. No lanes are the number of lanes that exist in each edge. The maximum speed of all the vehicles in the edge can be defined. The priority and the length of the edge can also be defined. Save this file as <filename>.edg.xml
Configuration:
This is used map the node file and the edge file. The output file name should be <filename>.net.xml.
Create Map:
The system that is just configured must be cross checked for inconsistancies. The Create map does this facility. The configuration file file: <file>.netc.cfg must be ocated for the same. Click on the OK button to check for inconsistencies.
Flow (optional):
Flow provides the option to define the number of vehicles for each of the edges defined in the <filename>.edg.xml file.
Save the file as <name>.flow.xml (ex_FLOW.flow.xml). You can also open and edit an existing .flow.xml file.
Create Vehicle
Select Create Vehicle from MOVE main menu. This will simply create a number of vehicles at the start of simulation. For our example, we use junction turning ratios function. Select your previously created map file (e.g. <filename>.net.xml). Specify your output file location and name it as <name>.rou.xml (<filename>.rou.xml). Set the beginning and end time of simulation. Finally click OK. The rou.xml file will be automatically generated.
Simulation setup
After the map and movement is complete, you will need to specify the configurations of the simulation. Select Configuration at the bottom on MOVE main menu. Specify the <filename>.net.xml and <filename>.rou.xml location and specify the beginning and end time of simulation. If you want to create the trace file, do not forget to check the checkbox and specify your trace output name e.g. <filename>.move.trace.
Visualization:
Select Visualization to see the actual movements on vehicle. Select the <filename>.sumo.cfg saved in the above Configuration option.
For the example chosen the following is the simulated result. One can notice there is a Signal that is designed in the center of the map. This takes care of any congestion that might occur due to heavy traffic load simulated. Delay(ms) can be increased to make sure the vehicles being simulated are working as per design.
From the resulting window, select the TIGER map file. You also need to specify the <name> of the files that will be created in this step. Here, we have specified <name>=sample. Please note, the whole path needs to be specified. After clicking the OK button, <name>.netc.cfg, <name>.edg.xml, <name>.net.xml and <name>.nod.xml files are generated in the destination folder.
Next, select the Create Vehicle button under the Vehicle Movement Editor.
Now, select the <name>.net.xml file under Map File field. Under Set Output Fil e option, create a <name>.rou.xml file in the same destination folder. Click on OK.
Now, you will get the success notification that the <name>.rou.xml file has been created.
Under the Map files field, choose <name>.net.xml file, and under the Routes File field choose the <nanme>.rou.xml file. Tick the Set Output(Trace File) check box. Create a <name>.trace file under the same destination folder. Click on File -> Save As : <name>.sumo.cfg
In the end, click on the Visualization button. This will open up the SUMO window, will will show the simulation in progress.
In the SUMO window, click on File -> Open Simulation. Select the <name>.sumo.cfg file created earlier. This will load the map. Then, click on the green Play button to start the simulation. The map and the zoomed version of the map are shown here.