NS2/SUMO
by fahmida from LinuxQuestions.org on (#6K4KK)
$] netconvert --osm-files guindy.osm -o guindy.net.xml
Now, copy the osmPolyconvert.typ.xml from the $SUMO_HOME/data/typemap/ and copy it to the folder where you put all the files.*
$] polyconvert --osm-files*guindy.osm*--net-file*guindy.net.xml --type-file osmPolyconvert.typ.xml -o*guindy.poly.xml
$] python $SUMO_HOME/tools/randomTrips.
Now, create a new file (to be named as guindy.sumo.cfg) and paste the following lines*
*<configuration>
* * *<input>
* * * * *<net-file value="guindy.net.xml"/>
<route-files value="guindy.rou.xml"/>
* * * * *<additional-files value="guindy.poly.xml"/>
* * *</input>
<time>
<begin value="0"/>
<end value="100"/>
<step-length value="0.1"/>
</time>
*</configuration>
Step 3: Exporting to NS2
from sumo trace to ns2, here is the step to do
Open terminal and type the following commands,
$] sumo -c guindy.sumo.cfg --fcd-output guindy.sumo.xml
$] python3 /home/pradeepkumar/sumo-0.26.
This will generate three tcl files (guindy.tcl, activity.tcl and mobility.tcl). Among this activity.tcl might not be needed, but mobility.tcl file is mandatory)
here i replace the guindy with ect and get all these files
activity.tcl
ect.nam
ect.net.xml
ect.osm
ect.poly.xml
ect.rou.xml
ect.sumo.cfg
ect.sumo.xml
ect.tcl
ect.tr
mobility.tcl
osmPolyconvert.typ.xml
test.nam
test.tcl
test.tr
trips.trips.xml
and i get this error
maisha@maisha-ASUS:~/ect$ ns ect.tcl
num_nodes is set 41
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
couldn't read file "mobility.tcl": no such file or directory
while executing
"source.orig mobility.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source mobility.tcl"
(file "ect.tcl" line 63)
how to solve it?
Now, copy the osmPolyconvert.typ.xml from the $SUMO_HOME/data/typemap/ and copy it to the folder where you put all the files.*
$] polyconvert --osm-files*guindy.osm*--net-file*guindy.net.xml --type-file osmPolyconvert.typ.xml -o*guindy.poly.xml
$] python $SUMO_HOME/tools/randomTrips.
Now, create a new file (to be named as guindy.sumo.cfg) and paste the following lines*
*<configuration>
* * *<input>
* * * * *<net-file value="guindy.net.xml"/>
<route-files value="guindy.rou.xml"/>
* * * * *<additional-files value="guindy.poly.xml"/>
* * *</input>
<time>
<begin value="0"/>
<end value="100"/>
<step-length value="0.1"/>
</time>
*</configuration>
Step 3: Exporting to NS2
from sumo trace to ns2, here is the step to do
Open terminal and type the following commands,
$] sumo -c guindy.sumo.cfg --fcd-output guindy.sumo.xml
$] python3 /home/pradeepkumar/sumo-0.26.
This will generate three tcl files (guindy.tcl, activity.tcl and mobility.tcl). Among this activity.tcl might not be needed, but mobility.tcl file is mandatory)
here i replace the guindy with ect and get all these files
activity.tcl
ect.nam
ect.net.xml
ect.osm
ect.poly.xml
ect.rou.xml
ect.sumo.cfg
ect.sumo.xml
ect.tcl
ect.tr
mobility.tcl
osmPolyconvert.typ.xml
test.nam
test.tcl
test.tr
trips.trips.xml
and i get this error
maisha@maisha-ASUS:~/ect$ ns ect.tcl
num_nodes is set 41
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
couldn't read file "mobility.tcl": no such file or directory
while executing
"source.orig mobility.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source mobility.tcl"
(file "ect.tcl" line 63)
how to solve it?