Skip to main content

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
# Message sizes (500kB - 1MB)
Events1.size = 500k,1M
# The source nodes -- nodes that create the messages
# Lower bound is inclusive; upper bound is exclusive
Events1.hosts = x, y+1
# The destinations of the messages created
# Lower bound is inclusive; upper bound is exclusive
Events1.tohosts = w, z+1
 # Message ID prefix
Events1.prefix = M

Note that the expressions $y + 1$ and $z+ 1$ should be replaced with their actual values. For example, if nodes $10$ to $20$ would create messages (both inclusive), and node $25$ is their destination, then the settings would like the following.

Events1.hosts = 10, 21
Events1.tohosts = 25, 26

Update: An alternative approach toward message creation is discussed in Juliano's blog.

Comments

  1. Excellent post Barun, this helped me :D! I tested yesterday, it was nice seeing the simulation nodes, through the GUI, and I saw only the two nodes I wanted "stacking up green and blue message blocks", this must mean it worked haha.

    ReplyDelete
  2. thanks Barun, it's really flawless post.
    I have a question after doing this how do we know that message successfully send from source to destination ? please

    ReplyDelete
    Replies
    1. Hi,

      Not sure what you are asking. Are you talking about delivery of a message to its destination?

      Delete
    2. Thanks dear Barun for your reply.
      yes, I want to know, does the message transfer from source to destination successfully or not
      for example :
      Events1.host = 10
      Events1.tohost = 25
      how can I be sure that the message created by node 10 deliver to node 25?
      Thanks again

      Delete
    3. It is hard to provide a guarantee that a given message would be delivered. Its delivery depends on several factors such as, routing protocol used, TTL, contacts, and others. Depending on your simulation parameters, in most scenarios, you would not get 100% delivery ratio.

      On the other hand, if your intention is that a source node should know of the delivered messages, you can use some form of acknowledgements. Alternatively, at each node maintain (and exchange) a list of messages received as destination. A source node would gather that knowledge at some later point of time.

      Delete
    4. Thank you so much Sir, as usual, you explained very well.

      Delete
    5. Hi,
      We can get this info by overiding the delivered message report.

      Delete
  3. Thanks a lot for this tutorial. In this particular scenario,message is moving from 10 to 25, How could we get information which hop/nodes it is using as a relay node.

    Many Thanks in Advance..

    ReplyDelete
    Replies
    1. Hi Rashmi,

      The routing protocol would dictate which all nodes should be used as relays. E.g., in PRoPHET, a node with better delivery predictability can become a relay node.

      However, if you want to know which nodes have helped in replicating a copy of a message till now, you can use the getHops() method of the Message class.

      Delete
    2. Sir can i get the implimentaion of routing algorithms in C language

      Delete
  4. Sir I need some help in imlimenting these dtn algorithms majorly epedimics in c language.Please can you help me in this

    ReplyDelete
  5. Hello, I would like to appreciate your work. It’s a great platform got to learn a lot. Your data is really worthy. Thank you so much. Keep it up!

     Forex Trading

     Forex Market

     Forex

     Foreign Exchange Market

    ReplyDelete
  6. It's very interesting, Thanks for sharing a valuable information to us & Knowledgeable also, keep on sharing like this.

    Stock Investor provides leatest Indian stock market news and Live BSE/NSE Sensex & Nifty updates.Find the relevant updates regarding Buy & Sell....

    Online Trading

    Currency Trading

    Equity Trading

    Stock Trading

    Trading

    Online Trading

    ReplyDelete
  7. Nice Article. Thank you for sharing the informative article with us.
    equity shareholders
    tax in india

    ReplyDelete
  8. Great Information! Its looking Nice.Useful for me to develop my knowledge. Thank you!

    You can invest in stocks yourself by buying individual Stocks & Shares or mutual funds,IPOs, or get help investing in stocks by Visit stockinvestor.in
    Online Trading

    Currency Trading

    Demat Account

    ShareTrading

    ReplyDelete
  9. Thanks for such a valuable and informative platform I find here.
    wish to learn more about stock market and stock/share market Live Updates from this site (stockinvestor.in)

    lic housing finance share price target
    tata power stock recommendation
    amarraja batteries
    jm financial share
    phillips carbon share price
    balrampur chini mills
    relaxo chappals
    bioscon ltd

    ReplyDelete
  10. Nice work this blog gives clear knowledge about investment. stockinvestor.in is a stock related website which provides all stock market information.
    forex market
    international trade
    Equity market
    trading

    ReplyDelete
  11. Thank you for sharing such valuable information! This blog is truly helpful for anyone looking to start a space rental business. Explore more innovative solutions like this at Space Rental Script

    ReplyDelete

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 to be highlighted.     \usepackage {color}    % For highlighting changes in this version with red color   \newcommand { \highlighttext }[1] { \textcolor {red}{#1}}   % Remove...

Cohere Aya Dataset: Exploring the Split-by-language Collection

A snapshot of the Aya collection (Bengali) . Image taken from HuggingFace. In February 2024, Cohere launched Aya , a multilingual Large Language Model (LLM). Alongside, a set of datasets used to train Aya has also been released. For example, the aya_dataset consists around 205K examples annotated by humans. On the other hand, the recently released aya_collection_language_split is a gigantic dataset with more than 500 million data points spread across more than 100 languages. As the name suggests, this dataset is split by language. For example, all data points in Bengali, irrespective of the underlying task, can be found in a single split. Apart from the original human-annotated examples from the aya_dataset, aya_collection_language_split also contains a lot of translated and templated data. The dataset is released using an Apache-2.0 license, allowing academic and commercial use. The Bengali Language Split Each language split in the Aya collection has three splits. The Bengali split,...