Skip to main content

The ONE Tutorial (Moved)

Contents
  1. Introduction
  2. Why?
  3. Target Audience
  4. Pre-conditions
  5. The Scenario
  6. General Steps
  7. Configuration File(s)
  8. Specify Scenario Settings
  9. Specify Network Interfaces for Nodes
  10. Create a Group of Nodes
  11. Specify Motion Patterns
  12. Specify Traffic Pattern
  13. Specify Reports to be Generated
  14. Running the Simulation


The ONE tutorial has moved to a new page. Please click here to follow.

Introduction

Opportunistic Network Environment is a Java-based simulator targeted for research in Delay Tolerant Networks (DTNs)/Opportunistic Mobile Networks (OMNs). Apart from letting a user to simulate different scenarios quickly and in a flexible manner, it also provides an easy way to generate statistics from the simulation performed.
ONE can be run on Linux, Windows, or any other platform supporting Java. Details about ONE, including how to download and run, can be found from the official site. A list of common questions and their answers are listed here.

Read more »

Comments

  1. Hi,
    thanks for the useful ONE tutorial.
    If possible, I am interested in more details about creating messages by loading an external file containing a list of messages. Like: file structure, parameters, how the file is called from the config file, etc.
    Regards,
    Merza

    ReplyDelete
  2. Thanks for your comments, Mirza! I plan to write a post on the external events. Right now, I would briefly outline it. The external file containing messages should be in the format: time C msg_id node_from node_to size

    Your settings file should include the following:
    Events1.class = ExternalEventsQueue
    Events1.filePath = path/to/message/trace.txt

    ReplyDelete
  3. sounds good, thanks for the answer ..
    one key problem concerning ONE is lacking a good documentation. a single "read me" file can't perform the job !!
    a further question plz: can the sender's and receiver's IDs be randomly generated ?! even if in the "default_settings" file !
    Regards,
    Merza

    ReplyDelete
  4. Very useful Tutorial, I'm new with ONE simulation and your blog it's finally given me a direction to where to Look.

    ReplyDelete
  5. Hi.. I have recently started using ONE for my term project. Your tutorial has been of great help indeed. I had some queries regarding movement models and manually assigning position of nodes.. can u please help me understand that?

    ReplyDelete
    Replies
    1. Alok,

      Please join the ONE mailing list at https://www.netlab.tkk.fi/mailman/listinfo/theone and post your question there. The community would be able to help you.

      Delete
  6. 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
    Replies
    1. The value of TTL would depend on your application/context. It can be different for different messages. Larger TTL generally translates to better chances of message delivery.

      Delete
  7. Hello sir..
    I have started my project paper on opportunistic network.I have a query.Can you please help me???

    Apart from the prescribed routing algorithm in the one folder ,how will I implement my own routing algorithm so that it will be followed by one simulator???
    What are the steps required?? Where will I start???

    please help me sir...

    ReplyDelete
    Replies
    1. Our forthcoming book, Opportunistic Mobile Networks: Advances and Applications (http://barunsaha.me/the_omn_book.html), has a chapter on this. In general, you should start by studying the existing routing protocols.

      Delete
  8. Hi, mate.
    I am not so familiar with the ONE Simulator. I want to ask you, I look at each node packet carries green, blue, and red. What's the difference? thanks.

    ReplyDelete
    Replies
    1. From the README file, "If a node is carrying messages, each
      message is represented by a green or blue filled rectangle. If node
      carries more than 10 messages, another column of rectangles is drawn for
      each 10 messages but every other rectangle is now red."

      Delete
  9. hello sir,
    I want to ask you, how can I implement selfish behavior in the ONE Simulator, there isn't much more documents and tutorials on that!
    Best regards.

    ReplyDelete
    Replies
    1. Short answer: override the message replication logic so that one or more messages are not sent to a set of node(s).

      Delete

Post a Comment

Popular posts from this blog

Text Highlighting in Latex

While preparing a manuscript with Latex, it is often useful to highlight the changes made in the current revision with a different color. This can be achieved using the\textcolor command provided by Latex. For example,\textcolor{red}{Hello World}would display the string "Hello World" in red color.

However, the final/published copy of the manuscript does not contain any highlighted text. Therefore, if a large volume of changes were made, it becomes tiresome at the end to find and remove all the individual portions of highlighted text.

This can be circumvented by defining a utility command to switch highlighting on and off as desired. In the following, we define a new Latex command, highlighttext, for this purpose. The command takes only a single argument -- the text that it should highlight.

    \usepackage{color}

% For highlighting changes in this version with red color
    \newcommand{\highlighttext}[1] {\textcolor{red}{#1}}
    % Remove all text highlighting
    % Useful to gener…

Specifying Source and Destination of Messages

One of the frequently asked questions in the community is how to specify which particular nodes would act as source(s) and destination(s) of the messages created in the ONE simulator. The simulator, in fact, provides a pair of settings (shown below in bold face) aimed for this particular purpose.

Let us consider that there are $n + 1$ nodes in an OMN.  Further, let the nodes with addresses from $x$ to $y$, both inclusive, would create messages. The nodes in the range $w$ to $z$, both inclusive, would be the destinations of those messages, where $0 \le x \le y \le n$, and $0 \le w \le z \le n$. Then, the corresponding simulation scenario can be configured as follows.

## Message creation parameters # How many event generators Events.nrof = 1 # Class of the first event generator Events1.class = MessageEventGenerator # (Following settings are specific for the MessageEventGenerator class) # Creation interval in seconds (one new message every 25 to 35 seconds) Events1.interval = 25,35 # Me…

IllegalArgumentException in Simulations

At times, users have reported of runtime exceptions while running a simulation that uses PRoPHET. The error signature looks like the following.

Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.TimSort.mergeHi(Unknown Source) at java.util.TimSort.mergeAt(Unknown Source) at java.util.TimSort.mergeCollapse(Unknown Source) at java.util.TimSort.sort(Unknown Source) at java.util.Arrays.sort(Unknown Source) at java.util.ArrayList.sort(Unknown Source) at java.util.Collections.sort(Unknown Source)
It may be noted that the default sorting algorithm has changed since Java 7 — rather than Merge sort, Tim sort is now used by default. However, it seems like it is possible to override the default sorting algorithm in Java using the following argument to the JVM.
-Djava.util.Arrays.useLegacyMergeSort=true
The execution command in the one.sh (or one.bat) file should be updated with the above argument to something like this:

j…