Skip to content
Hemang Kumar edited this page Nov 18, 2017 · 3 revisions

The ONE simulator has many features that are not documented anywhere else except in the code. The purpose of this page is to list at least some of those features and give pointers to right places in the source code. Some topics may even get a bit more detailed discussion.

Energy simulation

The ONE has simple energy/power simulation functionality that allows to define how much each node consumes energy in different situations, like scanning of neighbours or transmitting data. The settings and most of the implementation are defined in routing.util.EnergyModel class.

The key settings are:

  • initialEnergy how much energy nodes have in the beginning of the simulation. Can also be range (min, max) of two values and then the initial energy is chosen randomly between the min and max values.
  • scanEnergy the amount of energy used each time the node scans for neighbor nodes
  • transmitEnergy how much energy is used per second when transferring data
  • scanResponseEnergy how much energy is used per device discovery response

If energy simulation is enabled and node runs out of energy, it shuts down the radio interface and does not connect to other nodes anymore. report.EnergyLevelReport can be used for generating report of energy levels of different nodes throughout the simulation.

The ID Energy.value can be used to retrieve (and change) the current energy level from the ModuleCommunicationBus.

Clone this wiki locally