Simple Module CommunityMov

Package: ECMM.CommunityModel
File: src/CommunityModel/CommunityMov.ned

C++ definition

The Community Based Mobility Model Tracefile Reader

This module extendes the BasicMobility interface provided by inetmanet in order to implement a mobility model that is able to read from the mobility traces from an XML file of a specific format. It basically reads these traces, locates the future targets and makes the mmodules to move towards them at straight line trajectories. The XML format is based on the ns-2 simulator, used by Mirco Musolesi for his Comminity-based mobility model implementation. This file containing the traces should be pre-generated and available before the simulation takes place, usually by the SocMovGen module, also inlcuded in this package.

See also: socMovGen

Author: Nikolaos Vastardis

CommunityMov

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters:

Name Type Default value Description
debug bool false

debug switch

MobilityTrace xml xmldoc("socMov.xml")

the ANSim trace file in XML

nodeId int

<position_change> elements to match;

stationary bool false

host does not move at all -1 gets substituted to parent module's index

updateInterval double 100ms

time interval to update the hosts position

Properties:

Name Value Description
display i=block/cogwheel_s

Source code:

//
// <b> The Community Based Mobility Model Tracefile Reader </b>
//
// This module extendes the BasicMobility interface provided by inetmanet 
// in order to implement a mobility model that is able to read from the
// mobility traces from an XML file of a specific format. It basically
// reads these traces, locates the future targets and makes the mmodules
// to move towards them at straight line trajectories. The XML format
// is based on the ns-2 simulator, used by Mirco Musolesi for his
// Comminity-based mobility model implementation. This file containing 
// the traces should be pre-generated and available before the simulation
// takes place, usually by the SocMovGen module, also inlcuded in this
// package. 
//
// @see socMovGen
//
// @author Nikolaos Vastardis
//
simple CommunityMov like BasicMobility
{
    parameters:
        bool debug = default(false); 								// debug switch
        volatile xml MobilityTrace = default(xmldoc("socMov.xml")); // the ANSim trace file in XML
        int nodeId; 												// <position_change> elements to match;
        bool stationary = default(false); 							// host does not move at all
                               										// -1 gets substituted to parent module's index
        double updateInterval @unit("s") = default(100ms); 			// time interval to update the hosts position
        @display("i=block/cogwheel_s");
}