DESERT 4.0.0
WossGMMob3D Class Reference

#include <woss-gmmobility-3d.h>

Inheritance diagram for WossGMMob3D:
Inheritance graph
Collaboration diagram for WossGMMob3D:
Collaboration graph

Classes

class  UpdateTimerPosition
 

Public Types

enum  BoundType { SPHERIC = 1 , THOROIDAL , HARDWALL , REBOUNCE }
 

Public Member Functions

 WossGMMob3D ()
 
virtual ~WossGMMob3D ()
 
virtual double getStartX ()
 
virtual double getStartY ()
 
virtual void setLat (double x_coord, double y_coord)
 
virtual void setLong (double x_coord, double y_coord)
 
virtual int command (int argc, const char *const *argv)
 

Public Attributes

double newx
 
double newy
 
double newz
 
double vx
 
double vy
 
double vz
 
double x_coord
 
double y_coord
 
double z_coord
 

Protected Member Functions

virtual void update ()
 
double Gaussian ()
 

Protected Attributes

double xFieldWidth_
 
double yFieldWidth_
 
double zFieldWidth_
 
double alpha_
 
double alphaPitch_
 
double speedMean_
 
double directionMean_
 
double pitchMean_
 
double sigmaPitch_
 
BoundType bound_
 
double updateTime_
 
double nextUpdateTime_
 
double speed_
 
double direction_
 
int wossgm_debug_
 
int maddr
 
double start_latitude
 
double start_longitude
 
double start_x
 
double start_y
 
int mtrace_
 
int mtrace_of_node_
 
double pitch_
 
double zmin_
 
string gm3dTraceFile
 
UpdateTimerPosition update_timer_position
 
Uwrandomlib randlib
 

Detailed Description

This class implements the Gauss Markov mobility model. Movement occurs by updating the speed and the direction only when an information regarding node position is required, in this case, if is necessary, all the uncalculated previous states are computed according to a finite state Markov process. The model is designed to adapt to different level of randomness via one tuning parameter (alpha). Initially each node is assigned a current speed and direction, which will be updated during the simulation.

Member Enumeration Documentation

◆ BoundType

Enumeration BoundType. Defines the behaviour of the node when it reaches an edge of the simulated field.

Enumerator
SPHERIC 
THOROIDAL 
HARDWALL 
REBOUNCE 

Constructor & Destructor Documentation

◆ WossGMMob3D()

WossGMMob3D::WossGMMob3D ( )

◆ ~WossGMMob3D()

WossGMMob3D::~WossGMMob3D ( )
virtual

Destructor of WossGMMob3D class

Member Function Documentation

◆ command()

int WossGMMob3D::command ( int  argc,
const char *const *  argv 
)
virtual

TCL command intepreter Moreover it inherits all the OTcl method of Position

Parameters
argcnumber of arguments in argv
argvarray of strings which are the comand parameters (Note that argv[0] is the name of the object)
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched succesfully or no

References bound_, gm3dTraceFile, HARDWALL, maddr, mtrace_, mtrace_of_node_, REBOUNCE, speed_, speedMean_, SPHERIC, start_latitude, start_longitude, THOROIDAL, and update().

Here is the call graph for this function:

◆ Gaussian()

double WossGMMob3D::Gaussian ( )
protected

Method that returns a value from a normal random Gaussian variable.

Referenced by update().

◆ getStartX()

double WossGMMob3D::getStartX ( )
virtual

Method that return the current projection of the node on the x-axis. If it's necessary (updating time ia expired), update the position values before returns it.

References start_latitude, start_longitude, start_x, and wossgm_debug_.

Referenced by update().

◆ getStartY()

double WossGMMob3D::getStartY ( )
virtual

Method that return the current projection of the node on the y-axis. If it's necessary (updating time ia expired), update the position values before returns it.

References start_latitude, start_longitude, start_y, and wossgm_debug_.

Referenced by update().

◆ setLat()

void WossGMMob3D::setLat ( double  x_coord,
double  y_coord 
)
virtual

Method that return the starting curtesian coordinates of the node on the x-axis and y-axis. It converts the starting latitude and longitude given in the tcl script into cartesian coordinates.

References maddr, wossgm_debug_, x_coord, and y_coord.

Referenced by update().

◆ setLong()

void WossGMMob3D::setLong ( double  x_coord,
double  y_coord 
)
virtual

References maddr, wossgm_debug_, x_coord, and y_coord.

Referenced by update().

◆ update()

void WossGMMob3D::update ( )
protectedvirtual

Member Data Documentation

◆ alpha_

double WossGMMob3D::alpha_
protected

Parameter to be used to vary the randomness. 0: totally random values (Brownian motion). 1: linear motion

Referenced by update(), and WossGMMob3D().

◆ alphaPitch_

double WossGMMob3D::alphaPitch_
protected

Parameter to be used to vary the randomness in z-axis.

Referenced by WossGMMob3D().

◆ bound_

BoundType WossGMMob3D::bound_
protected

Defines the behaviour of the node when it reaches the edge. SPHERIC: return in the simulation field on the opposite side THOROIDAL: return in the centre of simulation field HARDWALL: the movement is stopped in the edge REBOUNCE: the node rebounce (i.e., the movement that should be outside the simulation field is mirrored inside)

Referenced by command(), and update().

◆ direction_

double WossGMMob3D::direction_
protected

Current value of the direction

Referenced by update().

◆ directionMean_

double WossGMMob3D::directionMean_
protected

Defines the mean value of the direction

Referenced by update(), and WossGMMob3D().

◆ gm3dTraceFile

string WossGMMob3D::gm3dTraceFile
protected

Trace file information

Referenced by command(), and update().

◆ maddr

int WossGMMob3D::maddr
protected

Mac address of the node whose movement we would like to trace

Referenced by command(), setLat(), setLong(), and update().

◆ mtrace_

int WossGMMob3D::mtrace_
protected

Flag to enable trace

Referenced by command(), and update().

◆ mtrace_of_node_

int WossGMMob3D::mtrace_of_node_
protected

The node whose movement pattern we want to trace

Referenced by command(), and update().

◆ newx

double WossGMMob3D::newx

Referenced by update().

◆ newy

double WossGMMob3D::newy

Referenced by update().

◆ newz

double WossGMMob3D::newz

new position of a node respectively in x-axis, y-axis and z-axis.

Referenced by update().

◆ nextUpdateTime_

double WossGMMob3D::nextUpdateTime_
protected

Intenal variable used to evaluate the steps to be computed

◆ pitch_

double WossGMMob3D::pitch_
protected

Current value of the pitch

Referenced by update().

◆ pitchMean_

double WossGMMob3D::pitchMean_
protected

Defines the mean value of the shifting in z-axis

Referenced by update(), and WossGMMob3D().

◆ randlib

Uwrandomlib WossGMMob3D::randlib
protected

Referenced by update().

◆ sigmaPitch_

double WossGMMob3D::sigmaPitch_
protected

Standard deviation in the z-axis

Referenced by update(), and WossGMMob3D().

◆ speed_

double WossGMMob3D::speed_
protected

Current value of the speed

Referenced by command(), and update().

◆ speedMean_

double WossGMMob3D::speedMean_
protected

Defines the mean value of the speed. When it is setted to zero the node moves anyway

Referenced by command(), and update().

◆ start_latitude

double WossGMMob3D::start_latitude
protected

Starting latitude of the simualted area

Referenced by command(), getStartX(), and getStartY().

◆ start_longitude

double WossGMMob3D::start_longitude
protected

Starting longitude of the simualted area

Referenced by command(), getStartX(), and getStartY().

◆ start_x

double WossGMMob3D::start_x
protected

Internal variable

Referenced by getStartX().

◆ start_y

double WossGMMob3D::start_y
protected

Internal variable

Referenced by getStartY().

◆ update_timer_position

UpdateTimerPosition WossGMMob3D::update_timer_position
protected

An object of UpdateTimerPosition class

Referenced by update(), and WossGMMob3D().

◆ updateTime_

double WossGMMob3D::updateTime_
protected

Time between two update computation

Referenced by update(), and WossGMMob3D().

◆ vx

double WossGMMob3D::vx

Referenced by update().

◆ vy

double WossGMMob3D::vy

Referenced by update().

◆ vz

double WossGMMob3D::vz

new velocity of a node respectively in x-axis, y-axis and z-axis.

Referenced by update().

◆ wossgm_debug_

int WossGMMob3D::wossgm_debug_
protected

Debug flag

Referenced by getStartX(), getStartY(), setLat(), setLong(), update(), and WossGMMob3D().

◆ x_coord

double WossGMMob3D::x_coord

Referenced by setLat(), setLong(), and update().

◆ xFieldWidth_

double WossGMMob3D::xFieldWidth_
protected

Range of the x-axis of the field to be simulated

Referenced by update(), and WossGMMob3D().

◆ y_coord

double WossGMMob3D::y_coord

Referenced by setLat(), setLong(), and update().

◆ yFieldWidth_

double WossGMMob3D::yFieldWidth_
protected

Range of the y-axis of the field to be simulated

Referenced by update(), and WossGMMob3D().

◆ z_coord

double WossGMMob3D::z_coord

Previous position of the node.

Referenced by update().

◆ zFieldWidth_

double WossGMMob3D::zFieldWidth_
protected

Range of the z-axis of the field to be simulated

Referenced by update(), and WossGMMob3D().

◆ zmin_

double WossGMMob3D::zmin_
protected

Minimum z-axis value

Referenced by update(), and WossGMMob3D().


The documentation for this class was generated from the following files: