NED File src/CommunityModel/CommunityMov.ned

Name Type Description
CommunityMov simple module

The Community Based Mobility Model Tracefile Reader

Source code:

//
// Copyright (C) 2012 Nikolaos Vastardis
// Copyright (C) 2012 University of Essex
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, see <http://www.gnu.org/licenses/>.
//

package ECMM.CommunityModel;

import inet.mobility.BasicMobility;

//
// <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");
}