DESERT 3.5.1
Loading...
Searching...
No Matches
WossGroupMob3D Class Reference

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

Inheritance diagram for WossGroupMob3D:
Collaboration diagram for WossGroupMob3D:

Classes

class  UpdatePositionTimer
 

Public Types

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

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.

Definition at line 58 of file woss-groupmobility-3d.h.

Member Enumeration Documentation

◆ BoundType

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

Enumerator
SPHERIC 
THOROIDAL 
HARDWALL 
REBOUNCE 

Definition at line 76 of file woss-groupmobility-3d.h.

Constructor & Destructor Documentation

◆ WossGroupMob3D()

WossGroupMob3D::WossGroupMob3D ( )

Constructor of WossGroupMob3D class.

Definition at line 69 of file woss-groupmobility-3d.cpp.

◆ ~WossGroupMob3D()

WossGroupMob3D::~WossGroupMob3D ( )
virtual

Destructor of WossGroupMob3D class.

Definition at line 132 of file woss-groupmobility-3d.cpp.

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

Definition at line 136 of file woss-groupmobility-3d.cpp.

◆ 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

Definition at line 222 of file woss-groupmobility-3d.cpp.

◆ Gaussian()

double WossGroupMob3D::Gaussian ( )
protected

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

Definition at line 292 of file woss-groupmobility-3d.cpp.

◆ getCharge()

virtual double WossGroupMob3D::getCharge ( )
inlinevirtual

Attraction charge to the leader.

Returns
double charge value.

Definition at line 110 of file woss-groupmobility-3d.h.

◆ 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.

Definition at line 324 of file woss-groupmobility-3d.cpp.

◆ 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.

Definition at line 332 of file woss-groupmobility-3d.cpp.

◆ 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

Definition at line 247 of file woss-groupmobility-3d.cpp.

◆ 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

Definition at line 262 of file woss-groupmobility-3d.cpp.

◆ 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

Definition at line 277 of file woss-groupmobility-3d.cpp.

◆ 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

Definition at line 340 of file woss-groupmobility-3d.cpp.

◆ 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

Definition at line 349 of file woss-groupmobility-3d.cpp.

◆ update()

void WossGroupMob3D::update ( )
protectedvirtual

Method that updates both the position coordinates as function of the number of states to be evaluated.

Definition at line 357 of file woss-groupmobility-3d.cpp.

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

Definition at line 206 of file woss-groupmobility-3d.h.

◆ beta_

double WossGroupMob3D::beta_
protected

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

Definition at line 256 of file woss-groupmobility-3d.h.

◆ 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)

Definition at line 216 of file woss-groupmobility-3d.h.

◆ charge_

double WossGroupMob3D::charge_
protected

Attraction charge of the follower.

Definition at line 258 of file woss-groupmobility-3d.h.

◆ count

int WossGroupMob3D::count
protected

A counting variable.

Definition at line 264 of file woss-groupmobility-3d.h.

◆ direction_

double WossGroupMob3D::direction_
protected

Current value of the direction.

Definition at line 228 of file woss-groupmobility-3d.h.

◆ directionMean_

double WossGroupMob3D::directionMean_
protected

Defines the mean value of the direction.

Definition at line 210 of file woss-groupmobility-3d.h.

◆ eta_

double WossGroupMob3D::eta_
protected

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

Definition at line 254 of file woss-groupmobility-3d.h.

◆ galpha_

double WossGroupMob3D::galpha_
protected

It tells the intensity of the attraction filed.

Definition at line 262 of file woss-groupmobility-3d.h.

◆ gm3dGroupTraceFile

string WossGroupMob3D::gm3dGroupTraceFile
protected

Trace file information.

Definition at line 266 of file woss-groupmobility-3d.h.

◆ leader_

WossPosition* WossGroupMob3D::leader_
protected

Position pointer of the leader.

Definition at line 268 of file woss-groupmobility-3d.h.

◆ leaderCharge_

double WossGroupMob3D::leaderCharge_
protected

Attraction charge of the leader.

Definition at line 260 of file woss-groupmobility-3d.h.

◆ maddr

int WossGroupMob3D::maddr
protected

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

Definition at line 232 of file woss-groupmobility-3d.h.

◆ mtrace_

int WossGroupMob3D::mtrace_
protected

Flag to enable trace.

Definition at line 242 of file woss-groupmobility-3d.h.

◆ mtrace_of_node_

int WossGroupMob3D::mtrace_of_node_
protected

The node whose movement pattern we want to trace.

Definition at line 244 of file woss-groupmobility-3d.h.

◆ newx

double WossGroupMob3D::newx

Definition at line 112 of file woss-groupmobility-3d.h.

◆ newy

double WossGroupMob3D::newy

Definition at line 112 of file woss-groupmobility-3d.h.

◆ newz

double WossGroupMob3D::newz

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

Definition at line 112 of file woss-groupmobility-3d.h.

◆ pitch_

double WossGroupMob3D::pitch_
protected

Current value of the pitch.

Definition at line 246 of file woss-groupmobility-3d.h.

◆ pitchMean_

double WossGroupMob3D::pitchMean_
protected

Defines the mean value of the shifting in z-axis.

Definition at line 212 of file woss-groupmobility-3d.h.

◆ randlib

Uwrandomlib WossGroupMob3D::randlib
protected

Definition at line 272 of file woss-groupmobility-3d.h.

◆ sigmaPitch_

double WossGroupMob3D::sigmaPitch_
protected

Standard deviation in the z-axis.

Definition at line 214 of file woss-groupmobility-3d.h.

◆ speed_

double WossGroupMob3D::speed_
protected

Current value of the speed.

Definition at line 226 of file woss-groupmobility-3d.h.

◆ speedM_

double WossGroupMob3D::speedM_
protected

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

Definition at line 250 of file woss-groupmobility-3d.h.

◆ speedMean_

double WossGroupMob3D::speedMean_
protected

Defines the mean value of the speed.

When it is setted to zero the node moves anyway

Definition at line 208 of file woss-groupmobility-3d.h.

◆ speedS_

double WossGroupMob3D::speedS_
protected

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

Definition at line 252 of file woss-groupmobility-3d.h.

◆ start_latitude

double WossGroupMob3D::start_latitude
protected

Starting latitude of the simualted area.

Definition at line 234 of file woss-groupmobility-3d.h.

◆ start_longitude

double WossGroupMob3D::start_longitude
protected

Starting longitude of the simualted area.

Definition at line 236 of file woss-groupmobility-3d.h.

◆ start_x

double WossGroupMob3D::start_x
protected

Internal variable.

Definition at line 238 of file woss-groupmobility-3d.h.

◆ start_y

double WossGroupMob3D::start_y
protected

Internal variable.

Definition at line 240 of file woss-groupmobility-3d.h.

◆ update_position_timer

UpdatePositionTimer WossGroupMob3D::update_position_timer
protected

An object of UpdateTimerPosition class.

Definition at line 270 of file woss-groupmobility-3d.h.

◆ updateTime_

double WossGroupMob3D::updateTime_
protected

Time between two update computation.

Definition at line 224 of file woss-groupmobility-3d.h.

◆ vx

double WossGroupMob3D::vx

Definition at line 113 of file woss-groupmobility-3d.h.

◆ vy

double WossGroupMob3D::vy

Definition at line 113 of file woss-groupmobility-3d.h.

◆ vz

double WossGroupMob3D::vz

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

Definition at line 113 of file woss-groupmobility-3d.h.

◆ wossgroup_debug_

int WossGroupMob3D::wossgroup_debug_
protected

Debug flag.

Definition at line 230 of file woss-groupmobility-3d.h.

◆ x_coord

double WossGroupMob3D::x_coord

Definition at line 114 of file woss-groupmobility-3d.h.

◆ xFieldWidth_

double WossGroupMob3D::xFieldWidth_
protected

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

Definition at line 200 of file woss-groupmobility-3d.h.

◆ y_coord

double WossGroupMob3D::y_coord

Definition at line 114 of file woss-groupmobility-3d.h.

◆ yFieldWidth_

double WossGroupMob3D::yFieldWidth_
protected

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

Definition at line 202 of file woss-groupmobility-3d.h.

◆ z_coord

double WossGroupMob3D::z_coord

position of the node.

Definition at line 114 of file woss-groupmobility-3d.h.

◆ zFieldWidth_

double WossGroupMob3D::zFieldWidth_
protected

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

Definition at line 204 of file woss-groupmobility-3d.h.

◆ zmin_

double WossGroupMob3D::zmin_
protected

Minimum z-axis value.

Definition at line 248 of file woss-groupmobility-3d.h.


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