DESERT 4.0.0
WossGroupMob3D Class Reference

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

Inheritance diagram for WossGroupMob3D:
Inheritance graph
Collaboration diagram for WossGroupMob3D:
Collaboration graph

Classes

class  UpdatePositionTimer
 

Public Types

enum  BoundType { SPHERIC = 1 , THOROIDAL , HARDWALL , REBOUNCE }
 Defines the behaviour of the node when it reaches an edge of the simulation field. More...
 

Public Member Functions

 WossGroupMob3D ()
 
virtual ~WossGroupMob3D ()
 
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 double getCharge ()
 
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 ()
 
double distance (WossPosition *pos1, WossPosition *pos2)
 
double mirror_posx (double x_coord_node, double x_coord_leader)
 
double mirror_posy (double y_coord_node, double y_coord_leader)
 
double mirror_posz (double z_coord_node, double z_coord_leader)
 

Protected Attributes

double xFieldWidth_
 
double yFieldWidth_
 
double zFieldWidth_
 
double alpha_
 
double speedMean_
 
double directionMean_
 
double pitchMean_
 
double sigmaPitch_
 
BoundType bound_
 
double updateTime_
 
double speed_
 
double direction_
 
int wossgroup_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_
 
double speedM_
 
double speedS_
 
double eta_
 
double beta_
 
double charge_
 
double leaderCharge_
 
double galpha_
 
int count
 
string gm3dGroupTraceFile
 
WossPosition * leader_
 
UpdatePositionTimer update_position_timer
 
Uwrandomlib randlib
 

Detailed Description

Base class of Group Mobility Model. This is inherited from WossPosition Class.

Member Enumeration Documentation

◆ BoundType

Defines the behaviour of the node when it reaches an edge of the simulation field.

Enumerator
SPHERIC 
THOROIDAL 
HARDWALL 
REBOUNCE 

Constructor & Destructor Documentation

◆ WossGroupMob3D()

◆ ~WossGroupMob3D()

WossGroupMob3D::~WossGroupMob3D ( )
virtual

Destructor of WossGroupMob3D class

Member Function Documentation

◆ command()

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

TCL command intepreter. 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_, gm3dGroupTraceFile, HARDWALL, leader_, maddr, mtrace_, mtrace_of_node_, REBOUNCE, speed_, speedMean_, SPHERIC, start_latitude, start_longitude, THOROIDAL, update(), and wossgroup_debug_.

Here is the call graph for this function:

◆ distance()

double WossGroupMob3D::distance ( WossPosition *  pos1,
WossPosition *  pos2 
)
protected

Calculate the distance between two nodes.

Parameters
pointerof node position 1
pointerof node position 2
Returns
double distance value

References bound_, maddr, SPHERIC, wossgroup_debug_, xFieldWidth_, yFieldWidth_, and zFieldWidth_.

Referenced by update().

◆ Gaussian()

double WossGroupMob3D::Gaussian ( )
protected

Method that returns a value from a normal random Gaussian variable (zero mean, unitary viariance)

References maddr, and wossgroup_debug_.

Referenced by update().

◆ getCharge()

virtual double WossGroupMob3D::getCharge ( )
inlinevirtual

Attraction charge to the leader.

Returns
double charge value.

References charge_.

◆ getStartX()

double WossGroupMob3D::getStartX ( )
virtual

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

References maddr, start_latitude, start_longitude, start_x, and wossgroup_debug_.

Referenced by update().

◆ getStartY()

double WossGroupMob3D::getStartY ( )
virtual

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

References maddr, start_latitude, start_longitude, start_y, and wossgroup_debug_.

Referenced by update().

◆ mirror_posx()

double WossGroupMob3D::mirror_posx ( double  x_coord_node,
double  x_coord_leader 
)
protected

Approximate position at x-axis

Parameters
x-axisvalue of follower
x-axisvalue of leader
Returns
double type value

References bound_, maddr, SPHERIC, wossgroup_debug_, and xFieldWidth_.

Referenced by update().

◆ mirror_posy()

double WossGroupMob3D::mirror_posy ( double  y_coord_node,
double  y_coord_leader 
)
protected

Approximate position at y-axis

Parameters
y-axisvalue of follower
y-axisvalue of leader
Returns
double type value

References bound_, maddr, SPHERIC, wossgroup_debug_, and yFieldWidth_.

Referenced by update().

◆ mirror_posz()

double WossGroupMob3D::mirror_posz ( double  z_coord_node,
double  z_coord_leader 
)
protected

Approximate position at z-axis

Parameters
z-axisvalue of follower
z-axisvalue of leader
Returns
double type value

References bound_, maddr, SPHERIC, wossgroup_debug_, and zFieldWidth_.

Referenced by update().

◆ setLat()

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

Method that sets the latitude of the node after update.

Parameters
changesin x-axis
changesin y-axis

References maddr, wossgroup_debug_, x_coord, and y_coord.

Referenced by update().

◆ setLong()

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

Method that sets the longitude of the node after update.

Parameters
changesin x-axis
changesin y-axis

References maddr, wossgroup_debug_, x_coord, and y_coord.

Referenced by update().

◆ update()

Member Data Documentation

◆ alpha_

double WossGroupMob3D::alpha_
protected

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

Referenced by update(), and WossGroupMob3D().

◆ beta_

double WossGroupMob3D::beta_
protected

A variable which is employed to calculate attraction force towards the leader

Referenced by update().

◆ bound_

BoundType WossGroupMob3D::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(), distance(), mirror_posx(), mirror_posy(), mirror_posz(), and update().

◆ charge_

double WossGroupMob3D::charge_
protected

Attraction charge of the follower

Referenced by getCharge(), update(), and WossGroupMob3D().

◆ count

int WossGroupMob3D::count
protected

A counting variable

Referenced by WossGroupMob3D().

◆ direction_

double WossGroupMob3D::direction_
protected

Current value of the direction

Referenced by update().

◆ directionMean_

double WossGroupMob3D::directionMean_
protected

Defines the mean value of the direction

Referenced by update(), and WossGroupMob3D().

◆ eta_

double WossGroupMob3D::eta_
protected

A tunable variable which is the coefficient of the filter in that range between 0 and 1

Referenced by update(), and WossGroupMob3D().

◆ galpha_

double WossGroupMob3D::galpha_
protected

It tells the intensity of the attraction filed

Referenced by update(), and WossGroupMob3D().

◆ gm3dGroupTraceFile

string WossGroupMob3D::gm3dGroupTraceFile
protected

Trace file information

Referenced by command(), and update().

◆ leader_

WossPosition* WossGroupMob3D::leader_
protected

Position pointer of the leader

Referenced by command(), and update().

◆ leaderCharge_

double WossGroupMob3D::leaderCharge_
protected

Attraction charge of the leader

Referenced by update(), and WossGroupMob3D().

◆ maddr

int WossGroupMob3D::maddr
protected

◆ mtrace_

int WossGroupMob3D::mtrace_
protected

Flag to enable trace

Referenced by command(), and update().

◆ mtrace_of_node_

int WossGroupMob3D::mtrace_of_node_
protected

The node whose movement pattern we want to trace

Referenced by command(), and update().

◆ newx

double WossGroupMob3D::newx

Referenced by update().

◆ newy

double WossGroupMob3D::newy

Referenced by update().

◆ newz

double WossGroupMob3D::newz

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

Referenced by update().

◆ pitch_

double WossGroupMob3D::pitch_
protected

Current value of the pitch

Referenced by update().

◆ pitchMean_

double WossGroupMob3D::pitchMean_
protected

Defines the mean value of the shifting in z-axis

Referenced by update(), and WossGroupMob3D().

◆ randlib

Uwrandomlib WossGroupMob3D::randlib
protected

Referenced by update().

◆ sigmaPitch_

double WossGroupMob3D::sigmaPitch_
protected

Standard deviation in the z-axis

Referenced by update(), and WossGroupMob3D().

◆ speed_

double WossGroupMob3D::speed_
protected

Current value of the speed

Referenced by command(), and update().

◆ speedM_

double WossGroupMob3D::speedM_
protected

Mean of the speed which is used to compute a Gaussian random variable.

Referenced by update(), and WossGroupMob3D().

◆ speedMean_

double WossGroupMob3D::speedMean_
protected

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

Referenced by command(), and update().

◆ speedS_

double WossGroupMob3D::speedS_
protected

Standard deviation of speed which is also used to compute a Gaussian random variable

Referenced by update(), and WossGroupMob3D().

◆ start_latitude

double WossGroupMob3D::start_latitude
protected

Starting latitude of the simualted area

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

◆ start_longitude

double WossGroupMob3D::start_longitude
protected

Starting longitude of the simualted area

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

◆ start_x

double WossGroupMob3D::start_x
protected

Internal variable

Referenced by getStartX().

◆ start_y

double WossGroupMob3D::start_y
protected

Internal variable

Referenced by getStartY().

◆ update_position_timer

UpdatePositionTimer WossGroupMob3D::update_position_timer
protected

An object of UpdateTimerPosition class

Referenced by update(), and WossGroupMob3D().

◆ updateTime_

double WossGroupMob3D::updateTime_
protected

Time between two update computation

Referenced by update(), and WossGroupMob3D().

◆ vx

double WossGroupMob3D::vx

Referenced by update().

◆ vy

double WossGroupMob3D::vy

Referenced by update().

◆ vz

double WossGroupMob3D::vz

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

Referenced by update().

◆ wossgroup_debug_

◆ x_coord

double WossGroupMob3D::x_coord

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

◆ xFieldWidth_

double WossGroupMob3D::xFieldWidth_
protected

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

Referenced by distance(), mirror_posx(), update(), and WossGroupMob3D().

◆ y_coord

double WossGroupMob3D::y_coord

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

◆ yFieldWidth_

double WossGroupMob3D::yFieldWidth_
protected

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

Referenced by distance(), mirror_posy(), update(), and WossGroupMob3D().

◆ z_coord

double WossGroupMob3D::z_coord

position of the node.

Referenced by update().

◆ zFieldWidth_

double WossGroupMob3D::zFieldWidth_
protected

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

Referenced by distance(), mirror_posz(), update(), and WossGroupMob3D().

◆ zmin_

double WossGroupMob3D::zmin_
protected

Minimum z-axis value

Referenced by update(), and WossGroupMob3D().


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