AlgoSenSim is programmed in Java (version 1.5) and its main purpose is to help developpers to implement their own algorithm.
The framework was previously named SensoSim and was originally mainly developed for wireless sensor algorithms. After some tests, we have seen that the framework was compliant for distributed algorithms. It was started on february and is now in alpha release. The framework is based on n-genes , mainly the parser that is exactly the same.
In this part, we will explain the core of the framework as well as the usage of the parser.
AlgoSenSim is constructed around the node. A node is an entity that contains a lot of information and is split into three main parts:
- The Node itself: it is a container that knows its position and its neighbors.
- The hardware that describes how messages are sent (for example range-based or range-free)
- The algorithm that determines the node’s behavior.
A state is used to optimize the speed of the algorithm. There are several states for a node:
BROKEN: The node is no more operable, that is it cannot neither receive or send message nor execute its algorithm.
SLEEP: This state is about the same as
BROKEN. The only difference is that the node choose to be in this state. The
BROKENstate is more like a an exception occuring on a node.
PASSIVE_LISTEN: This state happens when a node does not have to run any algorithm but is waiting for a message. When the message has come, the node is awaken and the algorithm is executed.
IDLE: The node is not waiting for any message but has to execute the algorithm. If the node receives a message, then the message is lost.
ACTIVE_LISTEN: his state occurs when the node needs to execute the algorithm and it is waiting for a message.
The goal of these states is to
- simulate the default behavior of the wireless sensors. If the node is not listening communications, it will consumes less energy.
- slightly enhance the speed of the framework’s speed. For example: there is no need to handle a message if it is sent to a node that will not analyze it.
In AlgoSenSim, the time is divided in generations:
- At each generation each node is executed
- If a node sends a message to an other node, the message will be kept and given to the recipient at the next generation. It allows us to execute nodes without considering the order.
- The network statistics are evaluated every generation.
AlgoSenSim uses a parser that reads configuration files. This parser provides a lot of functionalities.