Generating a load message file

We may want to run simulations where we have specific number of messages of different sizes generated in a particular time interval. This is needed when we run traces of Reality, Infocom etc. ONE provides a Perl script in the toolkit folder which can generate this for you. The only pre-requisite is that you have a Perl installed in your system.

For example,

In Windows run a command like this from the toolkit folder:

perl createCreates.pl -time 0:19000 -nrof 100 -hosts 0:35 -sizes 1000:100000 > load.txt


In Linux, do the following:

./createCreates.pl -time 0:19000 -nrof 100 -hosts 0:35 -sizes 1000:100000 > load.txt

Here,

time: You should specify the start time and end time. Please make sure that the end time if greater than the last encounter time that is used in the trace files.

nrof: Number of messages to be generated within the time frame.

size: The minimum and maximum sizes of the messages that you want to generate.


The above example will load the messages into the load.txt file and will be present in the toolkit folder. If you need to generate it in some specific folder mention that in the command. For example:

perl createCreates.pl -time 0:19000 -nrof 100 -hosts 0:35 -sizes 1000:100000 > C:\Users\Nikhitha\Desktop\load.txt

After your load file is generated place this in the same folder where the one.bat file resides. Now edit the setting like this:

# How many event generators
Events.nrof = 1
## Message creation parameters
Events1.class = ExternalEventsQueue
Events1.filePath = load.txt

In my first post I had shown the example where the Events1.class=MessageEventGenerator. Here we use another class called ExternalEventsQueue which will read the load.txt and genarate the messages. As I said, this stuff is generally used when we want to run traces like Cambridge. Infocom etc. For beginners I would suggest running with the same MessageEventGenerator class. All message creation classes can be seen in the input folder of ONE (ONE/input).

Hope it helps!!

Comments

  1. thanks its really informative, please post more tutorial

    ReplyDelete
  2. plz can you give brief details on the routing protocols like spray and wait & prophet...

    ReplyDelete
  3. Hello,
    I want to visualize the results generated after simulation.Can any one tell how to do this?

    ReplyDelete
  4. Hello I need some help in implementing BubbleRap in ONE simulator. if anyone worked on it then kindly contact me on this id "qirtas333@gmail.com"

    ReplyDelete
  5. Hello..
    I have recently started my masters final year project on opportunistic networks using one simulator.Your tutorials are extremely helpful. I had some queries regarding the TTL and message creation..Can you please help me??

    I want to know

    What is the Relationship between TTL expiry and New Message Creation???
    How the messages are being created??
    For different messages the TTL are diffferent??? What is the logic behind the TTL??
    Also Epidemic Routing replicates the actual message.But when i saw the event log it displayed messages with different size. Then how it becomes Epidemic Routing??

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. hello every body, how can i use external data sets in one simulator?

    ReplyDelete
  9. Once i create my own scenario that i want, after that where to put the new logic for route optimization? Can i run the whole scenario with the logic in a single file? Where to give the input?

    ReplyDelete
    Replies
    1. route optimization? Do you mean, external mobility trace?

      Delete
    2. Not much idea about it..but want to run some routing algorithm along with the scenario created. but i have no idea where to put the code of the algorithm.

      Delete

Post a Comment

Popular Posts