1
votes

Running ns-2.35 on ubuntu 16.04 doing an analysis of different routing protocols. No problems with AODV & DSDV as i know they are in the base version. Have got an automation script that runs and takes in my simulation results and creates neat folders and .csv files.

After a struggle getting ZRP patched in and successfully testing the demos from a tutorial: https://www.linuxquestions.org/questions/linux-newbie-8/zrp-integration-4175526171/ Post #7

I tried to change my existing .tcl file to run the ZRP simulation using my .sh automation by using:

set val(rp) ZRP ; #Routing protocol

...

Agent/ZRP set radius_ 2; # Setting ZRP radius =2

But the result i get at this point is

$ ns235-zrp ./automate.sh
invalid command name "mkdir"
while executing 
"mkdir mobility_files"
(file "./automate.sh" line 4)

And if i try run it without using the ns235-zrp command (just to test out different options) i get:

invalid command name "Agent/ZRP"
while executing
"Agent/ZRIP set radius_2 "

Not entirely sure what to do at this point as the older forum answers seem to have run dry.

Let me know if you need anything more information about the steps i took upto this point. .

1
Looks like you're trying to execute shell code where Tcl code is expected. - glenn jackman
If you want to run a sh script, please do $ ./automate.sh .... Latest ZRP examples → zrp-examples-01.2019.tar.gz → drive.google.com/file/d/1EzQM2-gbDL5QKKa27-Wjat9nLOjqf5xN/… ... »» invalid command name "Agent/ZRP" «« : A failed build. Or you are using a wrong copy of 'ns'. Latest build example, see dropbox.com/s/z0knvkof197hh2p/zrp-LINKs.txt?dl=0 - Knud Larsen
Writing a file that is valid and useful in several programming languages at once is a highly advanced topic. You should start by only using one language at a time; that's much easier! Since the simulator execution environment expects Tcl, you should write Tcl code to control it. (e.g., mkdir becomes file mkdir in a portable Tcl script). - Donal Fellows

1 Answers

0
votes

"Agent/ZRIP set radius_2 "

... The line has two typo´s. Must be

Agent/ZRP set radius_ 2

I.e. ZRIP must be ZRP, and a space should be added between "radius_" and "2".