Questions & Answers

Here's some questions about different aspects of the ONE and answers to those questions. These all are gathered from the mailing list archives. Thanks to Star from NCU's Mobile broadband networklab for setting this up!




Q1: "Is there any document about the code of the ONE? "

A1: You can read README as a brief introduction. There are JAVADOCs If you run "" in the "doc" folder. If your OS is windows, you can change the file name into .bat then double click it.

Q2: "When I am trying to compile the one simulator, I am getting 100 errors. All the errors are related to TEST folder Java files. How to solve this problem? "

A2: The test folder contains just tests for the simulator and you don't need to compile those if you just want to run simulations. If you want to run the tests too (e.g., to check that some modification you made to the code didn't break something) you need JUnit. The version of JUnit I've been using is 3.8.2 and you can get it from

Q3: "I have a problem about installing in Windows. My error is the following: Exception in thread "main" java.lang.NoClassDefFoundError: core/DTNSim "

A3: The distribution package includes only the source code and that needs to be compiled (e.g., using the provided compile.bat script) before running the simulator. If you have compiled it using some other way than the compile.bat script, the class files may be in some other directory and then the one.bat script does not work as such. If that is the case, you can change the classpath (cp) parameter in the script to point to the correct directory.

Q4: "I know there are lot of random numbers that get used at different points in the ONE code. But all other things being exactly same, is there any way to ensure that by using the same seed for random number generation, we will be able to get completely identical performance? "

A4: Actually, you should always, by default, get the exact same simulation results if you don't change any settings. There are many random numbers generated during the simulation, but all of them are from pseudo random number generators and use deterministic seeds. For example, the mobility RNG seed can be configured using the config file, the MessageEventGenerator uses the message prefix as the seed, and some other RNGs use the simulation time as the seed. So, unless you change the settings, you will always get the same "random" values, and therefore also the same behavior.

Q5: "How can I get the results of each run to be in a separate reports folder or files after some batched runs done. "

A5: You should use the name of the index in the name scenario to get different reports. The name of the report file is the name of the scenario. So, if you want to generate randomized scenarios with multiples seeds:
MovementModel.rngSeed = [1;135;573] = PRoPHET-seed-%%MovementModel.rngSeed%%
Then, per each seed the One will generate a different reports file.

Q6: "Does the ONE suitable for satellite DTN network simulation?"

A6: Currently there is no support in the ONE for satellite DTN networks.


Q1: "I started taking a look at the ONE simulator and wanted to know if it was capable of store and forward type data transfers. If so, how would one start configuring such a simulation? "

A1: Actually, ONE is made for store and forward type data transfers. It can be also used for other type of communication paradigms but store and forward is the way all the currently provided routing modules work. So, if you just run the example scenarios, you'll have store and forward behavior.

Q2: "How can I change the number of hosts of simulation? I tried to decrease the number of hosts changing Group.nrofHosts, but I get the follow error during the simulation: No host for address 99 Address range of 0-19 is valid at simtime 3722."

A2: When you change the number of hosts, you also need to change the input file if you use "ExternalEvent" or change the setting of hosts if you use MessageEventGenerator.

Q3: "Does ONE allows dtn simulation with external traces that contains only connection events (eg. connection up for node 1-2) and message creation events? "

A3: Check out StandardEventsReader class' javadocs for syntax. Basically, you use an external events trace similar to message events but use "CONN" as the action ID and "up" or "down" as value. You can have these in the same file as the message events or use two (or more) event engines simultaneously.

Q4: "How do I set the initial place of each node?"

A4: This depends on the movement model: normally movement models select the initial position randomly, with external trace you set this explicitly, with route based models the location is set to a place on the route.

Q5: "I was checking the original default_settings file, and I saw there the following configuration:
# transmit speed of 2 Mbps = 250kBps
Group.transmitSpeed = 250k

Well I don't understand the reason for "2 Mbps = 250kBps". If I pretend to simulate a 6 Mbps data rate, the correct setting would be: Group.transmitSpeed = 6M Is this correct? Am I missing something? "

A5: One byte is 8 bits, therefore 250k bytes is 2M bits. It's common practice to use B=byte and b=bit. Transmit speed is in bytes so you want 750k, not 6M.

Q6: "I wonder when two node move in each transmission range they send message in full duplex or half duplex channel? "

A6: All current routing modules send only when they're not receiving, so that'd be half duplex. You can change this quite easily by just modifying the check in the update method(s)


Q1: "What is ExternalMovement and what is it's trace. "

A1: The external movement module is still relatively experimental so there isn't much documentation about it available either. You check out the javadoc documentation of ExternalMovementReader class for the syntax of the input file

Q2: "Can I use ExternalMovement model and other movement models like MapRouteMovement at the same time? "

A2: The ONE does not support using both external and "internal" movement at the same time.

Q3: "I would be using this software to simulate a DTN with bus service in some local towns. How could I start in this respect? "

A3: You should have a look on how the tram routes are implemented in the example scenario that is distributed with ONE. I suppose that defining a route that a bus should follow and how long it should wait in every stop is identical to trams and that should get you started. Basically, you need to define the location of the stops in the map using a GIS program and import that route to ONE using the MapRoute movement model.


Q1: "Can I implement new routing protocol on the ONE Simulator "

A1: Yes you can. And it should even be quite easy. Basically you need to create a new class that extends the ActiveRouter class, override at least the replicate method and most likely the update method too, and provide your own implementation there. Read the javadocs in the routing package for more details. Also, I suppose having a look at some of the simple routing modules (e.g., Epidemic) should give you a hint how to proceed. Then, just put your new module in use by configuring it in the configuration file. For example: Group.router = YourRoutingModuleClassName

Q2: "I would like to implement a new routing protocol in The ONE. How can I do it? I am creating a new class, but it isn't working. Is there any documentation? "

A2: There is some documentation in the Javadocs of the routing package for creating your own routing module but I would suggest that you look into the code of the existing routing modules for examples. Probably the easiest way to start is to create a copy (to the report directory) of one of the existing routing modules (e.g., EpidemicRouter), rename the file and class name, do some simple modifications into it, and define the new class' name in the "Group.router" setting of default_settings.txt config file.

Q3: "Why theONE do not have any message tranfering between nodes? "

A3: The default routing protocol is dummy. Just select some other routing protocol in the settings files.

Q4: "In Epicemid Router, when the buffer is full and there is an incoming message. The algoritm would drop the oldest messages until there is enough buffer size for incoming message. How do set the ONE to not drop message, just reject the incoming message? "

A4: Probably the best way is to override the checkReceiving method in your own Epidemic variant (you can make a copy of the EpidemicRouter class for this), and instead of the makeRoomForMessage method call, just check if there is space and if not, reject the message with return value DENIED_NO_SPACE.


Q1: "The class message only has the size of the message. I´m trying to use some cryptosystem, like MD5 or Skipjack in "The one", but i don´t know what to encrypt. "

A1: By default ONE messages have no payload, but you can introduce one as a property (using add/getProperty methods)

Q2: "Is it possible to send a message that is intended for every member of the network, like broadcast? "

A2: At the moment, no. Although, you could do your own routing module that support this feature. Or if you want all the routing modules to support this, you should modify the ActiveRouter class.

Q3: "How the simulator avoids collision when a node wants to send a message to nother node. "

A3: By default, if a node (node A) wants to send a message to another node (node B) who is already transferring a message to a third node (node C), the node B rejects node A's "start of transfer request" (the method call) with BUSY return value.

Q4: "Is it possible to simulate anycast addresses? For example. node A is in the range of B and B in the range of C, but C isn't in the range of A. IF B is sending a message to A and C wants to send a message to B, how C know that B is sending a message? "

A4: No; at the moment at least. Though implementing something like that should not be particularly hard. Just write a new router module that performs the receiving checks a bit differently (e.g., checks if the "to" host's prefix matches to its own prefix, and if so, accepts it as "delivered").


Q1: "What does "ContactTimesReport" mean? "

A1: The ContactTimesReport actually reports the distribution of the contact times instead of individual contacts.

Q2: "I have written several algorithms in the ONE. How can I compare the result? "

A2: You can get different statistics out of ONE using the reporting framework. For delivery rate and delay there already exists a suitable module: MessageStatsReport.

Q3: "Can we get results that show the SNR and BER in the reports file as output. If not, can we modify the simulator to show the physical layer parameters in the results. "

A3: Unfortunately, the ONE does not (yet) have implementation of the physical layer so there are no values for SNR or BER

Q4: "I run a simulation about 43k seconds. How can I get the MessageStateRoport each hour. i.e I hope the ONE can output 12 MessageStateRoports. "

A4: I think if you set the 'interval' setting of Report, it should do what you want. Haven't done it myself, but might give you some insight.

Q5: "When I use batch mode "one -b [filename] [nrof run]" If my setting is
Group.bufferSize = [100k;200k]
Group.transmitRange = [50;100]
My command is "one -b [filename] 4" There are only 2 output reports. Why? "

A5: You need to choose the values so that they have no common divisors. Another choice is to simply write out the different combinations in full, e.g.
Group.bufferSize = [100k;200k;100k;200k]
Group.transmitRange = [50;50;100;100]

Q6: "What does "Scenario.updateInterval" mean? If I input different value in Scenario.updateInterval and all other values are the same. Should the output be the same?"

A6: Scenario.updateInterval is the time period by which the simulation time is advanced for each simulation step. It defines, among other things, how far the nodes travel on each step. In other words, the nodes will move to their new location and then connectivity is checked. This in turn will have an effect on the output even if all other scenario values are the same.


Q1: "How to create my own maps? "

A1: First, you need a tool, such as OpenJUMP, which can export map information in the wkt format. Draw a map, and insert the wkt files to the directory, then define them in the configuration file, in the same way as the current ones have been made. You can have a background bitmap also, and configure it also in the configuration file. The exact way of setting the parameters is currently a bit clumsy, but you can use trial and error at least, to get the position and size correct. A couple of warnings, though:
* Make sure your map data makes a connected graph. The ONE does not like if there are separate fragments.
* Sometimes OpenJUMP wants to combine different line segments into one statement, and the ONE parser will choke. If that is the case, you need to break them into separate statements.

Q2: "I use OPENJUMP to create my own map which is connected. But theONE says it is not connected. "

A2: When you draw map by OPENJUMP, you can not simply draw two line like a cross without "an intersection point".

Q3: "How To Change Map "

A3: Use settings in the name space "MapBasedMovement".

Q4: "I'm using OpenJump to draw by hand all the roads of a map. But I don't know how represent a map scale, like the one that appears on the default scenario. Can anybody please give me some hints about how to do this? "

A4: The unit of the coordinates in the ONE is one meter and there is no setting for changing that. However, you can adjust the size of the simulation area with the setting "MovementModel.worldSize".