#include <group-mobility.h>
Inheritance diagram for GroupMobPosition:
Public Member Functions | |
GroupMobPosition () | |
virtual | ~GroupMobPosition () |
virtual double | getX () |
virtual double | getY () |
virtual double | getCharge () |
virtual int | command (int argc, const char *const *argv) |
Private Member Functions | |
void | update (double now) |
double | Gaussian () |
double | distance (Position *pos1, Position *pos2) |
double | mirror_posx (double xnode, double xleader) |
double | mirror_posy (double ynode, double yleader) |
double | MobGaussian (double avrg, double sigma) |
Private Attributes | |
double | xFieldWidth_ |
double | yFieldWidth_ |
range of the x-axis of the field to be simulated | |
double | xprec_ |
range of the y-axis of the field to be simulated | |
double | yprec_ |
double | speedMean_ |
double | sigmaSpeed_ |
when it is setted to zero the node moves anyway | |
double | speedM_ |
double | speedS_ |
double | eta_ |
double | alpha_ |
double | charge_ |
unsigned long int | steps_ |
BoundType | bound_ |
double | updateTime_ |
UpdatePosTimer | updateTmr_ |
Time between two update computation. | |
double | speed_ |
double | gammaOld_ |
current value of the speed | |
double | memoryM_ |
current value of the direction | |
double | memoryS_ |
double | thetaMax_ |
int | debug_ |
Position * | leader_ |
define the level of verbosity (for debugging purposes) | |
Friends | |
class | UpdatePosTimer |
Definition at line 81 of file group-mobility.h.
GroupMobPosition::GroupMobPosition | ( | ) |
Constructor
Definition at line 53 of file group-mobility.cc.
References alpha_, charge_, debug_, eta_, memoryM_, memoryS_, sigmaSpeed_, speedM_, speedMean_, speedS_, thetaMax_, updateTime_, xFieldWidth_, and yFieldWidth_.
GroupMobPosition::~GroupMobPosition | ( | ) | [virtual] |
Destructor
Definition at line 89 of file group-mobility.cc.
double GroupMobPosition::getX | ( | ) | [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.
Reimplemented from Position.
Definition at line 157 of file group-mobility.cc.
References Position::x_.
Referenced by update().
double GroupMobPosition::getY | ( | ) | [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.
Reimplemented from Position.
Definition at line 162 of file group-mobility.cc.
References Position::y_.
Referenced by update().
int GroupMobPosition::command | ( | int | argc, | |
const char *const * | argv | |||
) | [virtual] |
TCL command intepreter
Moreover it inherits all the OTcl method of Position
argc | number of arguments in argv | |
argv | array of strings which are the comand parameters (Note that argv[0] is the name of the object) |
Reimplemented from Position.
Definition at line 94 of file group-mobility.cc.
References bound_, Position::command(), gammaOld_, leader_, memoryM_, speed_, speedMean_, steps_, updateTime_, and updateTmr_.
Here is the call graph for this function:
void GroupMobPosition::update | ( | double | now | ) | [private] |
Method that updates both the position coordinates as function of the number of states to be evaluated.
Definition at line 281 of file group-mobility.cc.
References alpha_, bound_, charge_, debug_, distance(), eta_, gammaOld_, Position::getX(), getX(), Position::getY(), getY(), leader_, memoryM_, memoryS_, mirror_posx(), mirror_posy(), MobGaussian(), sigmaSpeed_, speed_, speedM_, speedMean_, speedS_, steps_, thetaMax_, updateTime_, updateTmr_, Position::x_, xFieldWidth_, xprec_, Position::y_, yFieldWidth_, and yprec_.
Referenced by UpdatePosTimer::expire().
Here is the call graph for this function:
double GroupMobPosition::Gaussian | ( | ) | [private] |
Method that returns a value from a normal random Gaussian variable (zero mean, unitary viariance)
double GroupMobPosition::sigmaSpeed_ [private] |
when it is setted to zero the node moves anyway
Defines the mean value of the speed
Definition at line 148 of file group-mobility.h.
Referenced by GroupMobPosition(), and update().
double GroupMobPosition::updateTime_ [private] |
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 161 of file group-mobility.h.
Referenced by command(), GroupMobPosition(), and update().