This reference code implements functionalities and interactions of components (i.e., message carrier, field, perturbation, specificity, and motion) and entities (i.e., medium, device, transmitter, and receiver) belonging to the communication framework devised within the P1906.1 working group. The code has been implemented within the ns-3 simulator and is written entirely in C++. Release R1.4 of this code, submitted for balloting, is composed by 27 classes, more than 11000 lines of code, and 57 files. It has been tested under various operating systems, including Linux amd64 Ubuntu 12.04 with g++-4.6, Mac OS X v10.6.8, and Windows XP.

There are two examples, one modeling molecular communication (MOL) and another modeling electromagnetic (EM) communication.
For the EM case, the propagation model provides the path loss and molecular absorption noise temperature experienced in human tissues (specifically in human skin). These phenomena can be used to evaluate (1) the signal to interference ratio as a function of the power transmission and the distance between sender and receiver and (2) the upper bound of the channel capacity computed through the Shannon formula. In that example, EM waves are transmitted using omnidirectional flow via the terahertz channel, i.e., in the frequency range of [0.45-1.55] THz.  

For the MOL example, it is assumed that molecules move into the medium following the omnidirectional Fick’s law. Knowing the number of molecules released for each pulse and the diffusion coefficient (which is assumed to be constant), the model computes the molecular concentration as a function of distance and the time, evaluates the propagation delay, and estimates the maximum channel capacity when a detection-based receiver is adopted. 

In both cases, it is possible to execute simulations aimed at investigating the channel capacity experienced by a communication link established among two devices, by changing some physical details (i.e., power transmission for EM example, diffusion coefficient and number of molecules for the MOL example). The simulator offers scripts to execute and process simulations as well as to generate graphs (i.e., channel capacity vs. distance) through MATLAB. 

Installation instructions are in the README file. 
