OMNeT++ Ad Hoc Simulation

AODV refereed as Ad Hoc On Demand Distance Vector routing protocol.OMNeT++ Ad Hoc Network simulation projects is primarily used for MANET and other wireless networking projects.Main benefit of using Ad hoc Network using OMNeT++ Simulator it’s because of flexibility and adaptability.Ad Hoc is self configuring data network which does not require network infrastructure.

OMNeT++ Ad Hoc Network Simulation Projects

Advantages of ad hoc network:

  • No expensive infrastructure must be installed.
  • Use of licensed frequency spectrum.
  • Quick distributions of information around sender.


Challenges on ad hoc network:

  • Dynamic topology.
  • Network functions must have high degree of adaptability.
  • No central entities.


Applications of ad hoc network:

  • Floating car data and car accident in vanet network
  • In wireless sensor, detect vibrations, detect chemical substances, measure temperature etc.
  • Biological sector
  • Remote sensing in power plants
  • Environmental monitoring.

Principle of ad hoc network:

  • Multihop communication.
  • Mobility adaptive operation.
  • Self-organizing network without the need network infrastructure.
  • Mobile device communicate in peer-to-peer fashion.
  • Decentralized.


Download Sample Source Code for OMNeT++ AODV Routing Protocol

void IdealChannelModelAdhoc::recalculateMaxTransmissionRange()
    double newRange = 0.0;

    for (RadioList::iterator it = radios.begin(); it != radios.end(); ++it)
        IdealRadio *idealRadio = check_and_cast<IdealRadio *>(it->radioModule);
        if (newRange < idealRadio->getTransmissionRange())
            newRange = idealRadio->getTransmissionRange();
    maxTransmissionRange = newRange;

void IdealChannelModelAdhoc::unregisterRadio(RadioEntry *r)
    for (RadioList::iterator it = radios.begin(); it != radios.end(); ++it)
        if (it->radioModule == r->radioModule)
            // erase radio from registered radios
            maxTransmissionRange = -1.0;    // invalidate the value

    error("unregisterRadio failed: no such radio");

IdealChannelModelAdhoc::RadioEntry *IdealChannelModelAdhoc::lookupRadio(cModule *radio)
    for (RadioList::iterator it = radios.begin(); it != radios.end(); it++)
        if (it->radioModule == radio)
            return &(*it);
    return NULL;

void IdealChannelModelAdhoc::setRadioPosition(RadioEntry *r, const Coord& pos)
    r->pos = pos;
void IdealChannelModelAdhoc::initialize()
    EV << "initializing IdealChannelModelAdhoc" << endl;

    maxTransmissionRange = 0;