INET Framework for OMNeT++/OMNEST
inet::MoBanCoordinator Class Reference

This is the coordinator module of the MoBAN mobility model. More...

#include <MoBanCoordinator.h>

Inheritance diagram for inet::MoBanCoordinator:
inet::LineSegmentsMobilityBase inet::MovingMobilityBase inet::MobilityBase inet::IMobility

Classes

struct  pattern
 Data type for one instance of mobility pattern. More...
 

Public Member Functions

 MoBanCoordinator ()
 
 ~MoBanCoordinator ()
 
virtual double getMaxSpeed () const override
 Returns the maximum possible speed at any future time. More...
 
- Public Member Functions inherited from inet::LineSegmentsMobilityBase
 LineSegmentsMobilityBase ()
 
- Public Member Functions inherited from inet::MovingMobilityBase
virtual const CoordgetCurrentPosition () override
 Returns the position at the current simulation time. More...
 
virtual const CoordgetCurrentVelocity () override
 Returns the velocity at the current simulation time. More...
 
virtual const CoordgetCurrentAcceleration () override
 Returns the acceleration at the current simulation time. More...
 
virtual const QuaterniongetCurrentAngularPosition () override
 Returns the angular position at the current simulation time. More...
 
virtual const QuaterniongetCurrentAngularVelocity () override
 Returns the angular velocity at the current simulation time. More...
 
virtual const QuaterniongetCurrentAngularAcceleration () override
 Returns the angular acceleration at the current simulation time. More...
 
- Public Member Functions inherited from inet::MobilityBase
virtual const CoordgetConstraintAreaMax () const override
 Returns the maximum position along each axes for. More...
 
virtual const CoordgetConstraintAreaMin () const override
 Returns the minimum position along each axes for. More...
 
- Public Member Functions inherited from inet::IMobility
virtual ~IMobility ()
 

Protected Types

enum  posture_sel_type { UNIFORM_RANDOM = 0, MARKOV_BASE }
 Possible (supported) strategies for posture selection. More...
 
typedef struct inet::MoBanCoordinator::pattern Pattern
 Data type for one instance of mobility pattern. More...
 

Protected Member Functions

virtual int numInitStages () const override
 Returns the required number of initialize stages. More...
 
virtual void initialize (int) override
 Initializes mobility model parameters. More...
 
virtual void setInitialPosition () override
 Initializes the position from the display string or from module parameters. More...
 
virtual void setTargetPosition () override
 Set a new target position from the next posture. More...
 
virtual cModule * findSubjectModule () override
 Returns the module that represents the object moved by this mobility module. More...
 
virtual void finish () override
 To be called at the end of simulation run. More...
 
virtual void refreshDisplay () const override
 Moves the visual representation module's icon to the new position on the screen. More...
 
void selectPosture ()
 Function to select the next posture considering the current posture and the Markov model. More...
 
Coord selectDestination ()
 Function to select the destination in the case of a mobile posture. More...
 
double selectSpeed ()
 Select a velocity value within the given velocity range. More...
 
simtime_t selectDuration ()
 Select a stay time duration in the specified range for the new posture. More...
 
bool isInsideWorld (Coord)
 Checks if all nodes of the WBAN are inside the simulation environment with the given position of the logical center. More...
 
bool readPostureSpecificationFile ()
 Reading the input postures specification file and making the posture data base. More...
 
bool readConfigurationFile ()
 Reads the input configuration file. More...
 
bool readMobilityPatternFile ()
 Reads the previously logged mobility pattern and make mobility pattern data base. More...
 
void publishToNodes ()
 Publishes the reference point and other information of the posture to the blackboard of the belonging nodes. More...
 
void collectLocalModules (cModule *module)
 Collect MoBAN local modules. More...
 
void computeMaxSpeed ()
 
- Protected Member Functions inherited from inet::LineSegmentsMobilityBase
virtual void initializePosition () override
 Initializes mobility position. More...
 
virtual void move () override
 Moves according to the mobility model to the current simulation time. More...
 
- Protected Member Functions inherited from inet::MovingMobilityBase
 MovingMobilityBase ()
 
virtual ~MovingMobilityBase ()
 
virtual void handleSelfMessage (cMessage *message) override
 Called upon arrival of a self messages, subclasses must override. More...
 
void scheduleUpdate ()
 Schedules the move timer that will update the mobility state. More...
 
void moveAndUpdate ()
 Moves and notifies listeners. More...
 
virtual void orient ()
 
- Protected Member Functions inherited from inet::MobilityBase
 MobilityBase ()
 
virtual int getId () const override
 
virtual void checkPosition ()
 Checks whether the position is valid or not. More...
 
virtual void initializeOrientation ()
 Initializes the orientation from module parameters. More...
 
virtual void updateDisplayStringFromMobilityState () const
 
virtual void handleParameterChange (const char *name) override
 Allows changing parameters from the GUI. More...
 
virtual void handleMessage (cMessage *msg) override
 This modules should only receive self-messages. More...
 
virtual void emitMobilityStateChangedSignal ()
 Emits a signal with the updated mobility state. More...
 
virtual Coord getRandomPosition ()
 Returns a new random position satisfying the constraint area. More...
 
virtual bool isOutside ()
 Returns true if the mobility is outside of the constraint area. More...
 
virtual void reflectIfOutside (Coord &targetPosition, Coord &velocity, rad &angle, rad &elevation, Quaternion &quaternion)
 Utility function to reflect the node if it goes outside the constraint area. More...
 
virtual void wrapIfOutside (Coord &targetPosition)
 Utility function to wrap the node to the opposite edge (torus) if it goes outside the constraint area. More...
 
virtual void placeRandomlyIfOutside (Coord &targetPosition)
 Utility function to place the node randomly if it goes outside the constraint area. More...
 
virtual void raiseErrorIfOutside ()
 Utility function to raise an error if the node gets outside the constraint area. More...
 
virtual void handleIfOutside (BorderPolicy policy, Coord &targetPosition, Coord &velocity)
 Invokes one of reflectIfOutside(), wrapIfOutside() and placeRandomlyIfOutside(), depending on the given border policy. More...
 
virtual void handleIfOutside (BorderPolicy policy, Coord &targetPosition, Coord &velocity, rad &heading)
 
virtual void handleIfOutside (BorderPolicy policy, Coord &targetPosition, Coord &velocity, rad &heading, rad &elevation)
 
virtual void handleIfOutside (BorderPolicy policy, Coord &targetPosition, Coord &velocity, rad &heading, rad &elevation, Quaternion &quaternion)
 

Protected Attributes

std::vector< MoBanLocal * > localModules
 The mobility modules of the nodes in this WBAN. More...
 
double speed
 Currently selected speed for the mobile posture. More...
 
double maxSpeed
 The possible maximum speed at any future time. More...
 
FILE * logfile
 Pointer to the file for logging MoBAN mobility pattern for future use. More...
 
unsigned int numPostures
 Number of predefined postures. More...
 
std::vector< Posture * > postureList
 The list of all predefined postures (posture data base) More...
 
PosturecurrentPosture
 The current selected posture. More...
 
simtime_t minDuration
 The minimum value of the duration for stable postures. More...
 
simtime_t maxDuration
 The maximum value of the duration for stable postures. More...
 
bool useMobilityPattern
 Variable that shows if reusing previously logged mobility pattern is requested. More...
 
PatternmobilityPattern
 The mobility pattern data base. More...
 
int patternLength
 The number of mobility pattern instances which has been read from the input file (length of mobility pattern data base). More...
 
int currentPattern
 The index of the currently applied mobility pattern from. More...
 
double ** markovMatrix
 A matrix which maintains the transition probabilities of the Markov Model of posture pattern. More...
 
posture_sel_type postureSelStrategy
 The requested strategy for posture selection. More...
 
PostureTransitiontransitions
 Class for performing operation for spatial and temporal correlations in posture selection. More...
 
- Protected Attributes inherited from inet::LineSegmentsMobilityBase
Coord targetPosition
 End position of current linear movement. More...
 
- Protected Attributes inherited from inet::MovingMobilityBase
cMessage * moveTimer
 The message used for mobility state changes. More...
 
simtime_t updateInterval
 The simulation time interval used to regularly signal mobility state changes. More...
 
bool stationary
 A mobility model may decide to become stationary at any time. More...
 
Coord lastVelocity
 The last velocity that was reported at lastUpdate. More...
 
Quaternion lastAngularVelocity
 The last angular velocity that was reported at lastUpdate. More...
 
simtime_t lastUpdate
 The simulation time when the mobility state was last updated. More...
 
simtime_t nextChange
 The next simulation time when the mobility module needs to update its internal state. More...
 
bool faceForward
 
- Protected Attributes inherited from inet::MobilityBase
cModule * subjectModule
 Pointer to visual representation module, to speed up repeated access. More...
 
const CanvasProjectioncanvasProjection
 The 2D projection used on the canvas. More...
 
Coord constraintAreaMin
 3 dimensional position and size of the constraint area (in meters). More...
 
Coord constraintAreaMax
 
Coord lastPosition
 The last position that was reported. More...
 
Quaternion lastOrientation
 The last orientation that was reported. More...
 
StringFormat format
 

Additional Inherited Members

- Public Types inherited from inet::MobilityBase
enum  BorderPolicy { REFLECT, WRAP, PLACERANDOMLY, RAISEERROR }
 Selects how a mobility module should behave if it reaches the edge of the constraint area. More...
 
- Static Public Attributes inherited from inet::IMobility
static simsignal_t mobilityStateChangedSignal = cComponent::registerSignal("mobilityStateChanged")
 A signal used to publish mobility state changes. More...
 

Detailed Description

This is the coordinator module of the MoBAN mobility model.

It should be instantiated in the top level simulation network, once per WBAN. The coordinator module is the main module that provides the group mobility and correlation between nodes in a WBAN. In the initialization phase, it reads three user defined input files which are the postures specification file, a configuration file which includes all required parameter for specific distributions, and the previously logged mobility pattern, if it is requested to use a logged pattern. Note that all WBAN instances may use the same input files if they are exactly in the same situation.

After the initialization phase, the MoBAN coordinator decides about the posture and the position of the Logical center of the group (WBAN). The absolute position of the reference point of each belonging node is calculated by adding the current position of the logical center by the reference point of that node in the selected posture. The coordinator sets the position of the reference point as well as the speed and the radius of the local movement of nodes.

Author
Majid Nabi

Member Typedef Documentation

◆ Pattern

Data type for one instance of mobility pattern.

Member Enumeration Documentation

◆ posture_sel_type

Possible (supported) strategies for posture selection.

Enumerator
UNIFORM_RANDOM 
MARKOV_BASE 
148  {
149  UNIFORM_RANDOM = 0, // uniform random posture selection. No correlation is applied.
150  MARKOV_BASE // Either a Markov model matrix or a steady state vector is given for space-time domains
151  };

Constructor & Destructor Documentation

◆ MoBanCoordinator()

inet::MoBanCoordinator::MoBanCoordinator ( )
54  :
55  speed(0),
56  maxSpeed(0),
57  logfile(nullptr),
58  numPostures(0),
59  currentPosture(nullptr),
60  useMobilityPattern(false),
61  mobilityPattern(nullptr),
62  patternLength(0),
63  currentPattern(-1),
64  markovMatrix(nullptr),
66  transitions(nullptr)
67 {
68 }

◆ ~MoBanCoordinator()

inet::MoBanCoordinator::~MoBanCoordinator ( )
71 {
72  delete transitions;
73  delete[] mobilityPattern;
74  for (auto& elem : postureList)
75  delete elem;
76 }

Member Function Documentation

◆ collectLocalModules()

void inet::MoBanCoordinator::collectLocalModules ( cModule *  module)
protected

Collect MoBAN local modules.

719 {
720  for (cModule::SubmoduleIterator it(module); !it.end(); it++) {
721  cModule *submodule = *it;
722  collectLocalModules(submodule);
723  MoBanLocal *localModule = dynamic_cast<MoBanLocal *>(submodule);
724  if (localModule && localModule->par("coordinatorIndex").intValue() == getIndex()) {
725  localModule->setCoordinator(this);
726  localModules.push_back(localModule);
727  }
728  }
729 }

Referenced by initialize().

◆ computeMaxSpeed()

void inet::MoBanCoordinator::computeMaxSpeed ( )
protected
732 {
733  if (useMobilityPattern) {
734  for (int i = 0; i < patternLength; i++) {
735  double patSpeed = mobilityPattern[i].speed;
736  if (maxSpeed < patSpeed)
737  maxSpeed = patSpeed;
738  }
739  }
740  else {
741  for (auto& elem : postureList) {
742  double postureMaxSpeed = elem->getMaxSpeed();
743  if (maxSpeed < postureMaxSpeed)
744  maxSpeed = postureMaxSpeed;
745  }
746  }
747 }

Referenced by initialize().

◆ findSubjectModule()

virtual cModule* inet::MoBanCoordinator::findSubjectModule ( )
inlineoverrideprotectedvirtual

Returns the module that represents the object moved by this mobility module.

Reimplemented from inet::MobilityBase.

170 { return this; }

◆ finish()

void inet::MoBanCoordinator::finish ( )
overrideprotectedvirtual

To be called at the end of simulation run.

287 {
288  fclose(logfile);
289 }

◆ getMaxSpeed()

virtual double inet::MoBanCoordinator::getMaxSpeed ( ) const
inlineoverridevirtual

Returns the maximum possible speed at any future time.

Reimplemented from inet::MobilityBase.

212 { return maxSpeed; }

Referenced by inet::MoBanLocal::computeMaxSpeed().

◆ initialize()

void inet::MoBanCoordinator::initialize ( int  stage)
overrideprotectedvirtual

Initializes mobility model parameters.

Reimplemented from inet::MovingMobilityBase.

79 {
81 
82  EV_TRACE << "initializing MoBanCoordinator stage " << stage << endl;
83  if (stage == INITSTAGE_GROUP_MOBILITY) {
84  useMobilityPattern = par("useMobilityPattern");
85  collectLocalModules(getParentModule());
86 
87  // preparing output mobility pattern log file
88  char log_file_name[70];
89  sprintf(log_file_name, "MoBAN_Pattern_out%d.txt", getIndex());
90  inet::utils::makePathForFile(log_file_name);
91  logfile = fopen(log_file_name, "w");
92 
94  throw cRuntimeError("MoBAN Coordinator: error in reading the posture specification file");
95 
96  if (!readConfigurationFile())
97  throw cRuntimeError("MoBAN Coordinator: error in reading the input configuration file");
98 
101  throw cRuntimeError("MoBAN Coordinator: error in reading the input mobility pattern file");
102 
104  publishToNodes();
105  computeMaxSpeed();
106  }
107 }

◆ isInsideWorld()

bool inet::MoBanCoordinator::isInsideWorld ( Coord  tPos)
protected

Checks if all nodes of the WBAN are inside the simulation environment with the given position of the logical center.

Checks if all nodes of the WBAN are inside the simulation environment with the current position.

262 {
263  Coord absolutePosition;
264 
265  for (unsigned int i = 0; i < localModules.size(); ++i) {
266  absolutePosition = tPos + currentPosture->getPs(i);
267  if (!absolutePosition.isInBoundary(this->constraintAreaMin, this->constraintAreaMax))
268  return false;
269  }
270 
271  return true;
272 }

Referenced by selectDestination().

◆ numInitStages()

virtual int inet::MoBanCoordinator::numInitStages ( ) const
inlineoverrideprotectedvirtual

Returns the required number of initialize stages.

Reimplemented from inet::MobilityBase.

160 { return NUM_INIT_STAGES; }

◆ publishToNodes()

void inet::MoBanCoordinator::publishToNodes ( )
protected

Publishes the reference point and other information of the posture to the blackboard of the belonging nodes.

278 {
279  for (unsigned int i = 0; i < localModules.size(); ++i) {
280  MoBanLocal *localModule = localModules[i];
281  EV_DEBUG << "Publish data for: " << localModule->getParentModule()->getFullName() << endl;
282  localModule->setMoBANParameters(currentPosture->getPs(i), currentPosture->getRadius(i), currentPosture->getSpeed(i));
283  }
284 }

Referenced by initialize(), and setTargetPosition().

◆ readConfigurationFile()

bool inet::MoBanCoordinator::readConfigurationFile ( )
protected

Reads the input configuration file.

Function to read the configuration file which includes the information for configuring and tuning the model for a specific application scenario.

The configuration file can provide the Markov model transition matrices, different area types and time domains, and the proper matrix for each time-space combination. However, these are all optional and will be given just in the case that the space-time correlation are required to be simulated. The function will be called in the initialization phase.

443 {
444  cXMLElement *xmlConfig = par("configFile");
445  if (xmlConfig == nullptr)
446  return false;
447 
448  cXMLElementList tagList;
449  cXMLElement *tempTag;
450  const char *str;
451  std::string sstr; // for easier comparison
452 
453  /* Reading the initial posture if it is given*/
454  int postureID;
455  tagList = xmlConfig->getElementsByTagName("initialPosture");
456 
457  if (tagList.empty())
458  postureID = 0; // no initial posture has been specified. The first one is selected!
459  else {
460  tempTag = tagList.front();
461  str = tempTag->getAttribute("postureID");
462  postureID = strtol(str, nullptr, 0);
463  }
464  currentPosture = postureList[postureID];
465  EV_DEBUG << "Initial Posture: " << currentPosture->getPostureName() << endl;
466 
467  /* Reading the initial position if it is given */
468  tagList = xmlConfig->getElementsByTagName("initialLocation");
469  if (tagList.empty())
470  lastPosition = Coord(10, 10, 5); // no initial location has been specified .
471  else {
472  double x, y, z;
473  tempTag = tagList.front();
474 
475  str = tempTag->getAttribute("x");
476  x = strtod(str, nullptr);
477  str = tempTag->getAttribute("y");
478  y = strtod(str, nullptr);
479  str = tempTag->getAttribute("z");
480  z = strtod(str, nullptr);
481  lastPosition = Coord(x, y, z);
482  }
483  EV_DEBUG << "Initial position of the LC: " << lastPosition << endl;
484 
485  /* Reading the given range for duration of stable postures */
486  tagList = xmlConfig->getElementsByTagName("durationRange");
487  if (tagList.empty()) {
488  // no duration is specified. We assign a value!
489  minDuration = 0;
490  maxDuration = 100;
491  }
492  else {
493  tempTag = tagList.front();
494 
495  str = tempTag->getAttribute("min");
496  minDuration = strtod(str, nullptr);
497  str = tempTag->getAttribute("max");
498  maxDuration = strtod(str, nullptr);
499  }
500  EV_DEBUG << "Posture duration range: (" << minDuration << " , " << maxDuration << ")" << endl;
501 
502  transitions = new PostureTransition(numPostures);
503 
504  /* Reading the Markov transition matrices, if there are any. */
505  tagList = xmlConfig->getElementsByTagName("markovMatrices");
506 
507  if (tagList.empty()) {
508  postureSelStrategy = UNIFORM_RANDOM; // no posture selection strategy is required. uniform random is applied
509  EV_DEBUG << "Posture Selection strategy: UNIFORM_RANDOM " << endl;
510  return true;
511  }
512 
513  tempTag = tagList.front();
514 
515  cXMLElementList matrixList;
516  matrixList = tempTag->getElementsByTagName("MarkovMatrix");
517 
518  if (tagList.empty()) {
519  postureSelStrategy = UNIFORM_RANDOM; // no posture selection strategy is required. uniform random is applied
520  EV_DEBUG << "Posture Selection strategy: UNIFORM_RANDOM " << endl;
521  return true;
522  }
523 
525 
526  // make an empty matrix for the Markov Chain
527  double **matrix = new double *[numPostures];
528  for (unsigned int i = 0; i < numPostures; ++i)
529  matrix[i] = new double[numPostures];
530 
531  bool setDefault = false; // variable to remember if the default matrix is defined.
532  cXMLElementList::const_iterator matrixTag;
533  for (matrixTag = matrixList.begin(); matrixTag != matrixList.end(); matrixTag++) {
534  cXMLElementList rowList;
535  cXMLElementList cellList;
536  int i = 0, j = 0;
537  bool thisDefault = false;
538 
539  if ((*matrixTag)->getAttribute("type") != nullptr) {
540  sstr = (*matrixTag)->getAttribute("type");
541  if (sstr == "Default" || sstr == "default") {
542  if (setDefault)
543  throw cRuntimeError("There are more than one default matrix defined in the configuration file!");
544  else {
545  setDefault = true;
546  thisDefault = true;
547  }
548  }
549  }
550 
551  sstr = (*matrixTag)->getAttribute("name");
552 
553  rowList = (*matrixTag)->getElementsByTagName("row");
554  if (rowList.size() != numPostures && rowList.size() != 1)
555  throw cRuntimeError("Number of rows in the Markov transition matrix should be equal to either the number"
556  " of postures (full Markov matrix) or one (steady state vector)");
557 
558  if (rowList.size() != numPostures && thisDefault)
559  throw cRuntimeError("Dimension of the default Markov matrix should be equal to the number of postures in the configuration file");
560 
561  if ((rowList.size() == 1) && (!setDefault))
562  throw cRuntimeError("A default matrix is supposed to be defined before a steady state can be defined in the configuration file");
563 
564  for (cXMLElementList::const_iterator row = rowList.begin(); row != rowList.end(); row++) {
565  cellList = (*row)->getElementsByTagName("cell");
566  if (cellList.size() != numPostures)
567  throw cRuntimeError("Number of columns in the Markov transition matrix should be equal to the number of postures");
568 
569  j = 0;
570  for (cXMLElementList::const_iterator cell = cellList.begin(); cell != cellList.end(); cell++) {
571  str = (*cell)->getAttribute("value");
572  matrix[i][j] = strtod(str, nullptr);
573  j++;
574  }
575 
576  ++i;
577  }
578 
579  if (rowList.size() == 1)
580  transitions->addSteadyState(sstr, matrix[0]); // steady state
581  else
582  transitions->addMatrix(sstr, matrix, thisDefault); // A full Markovian matrix
583 
584  EV_DEBUG << "Markov transition matrix " << sstr << " : " << endl;
585  for (int k = 0; k < i; ++k) {
586  for (unsigned int f = 0; f < numPostures; ++f)
587  EV_DEBUG << matrix[k][f] << " ";
588  EV_DEBUG << endl;
589  }
590  }
591  for (unsigned int i = 0; i < numPostures; ++i)
592  delete[] matrix[i];
593  delete[] matrix;
594 
595  /* Reading the Area types, if there are any. */
596  tagList = xmlConfig->getElementsByTagName("areaTypes");
597 
598  if (tagList.empty())
599  EV_DEBUG << "No area type is given. So there is no spatial correlation in posture selection." << endl;
600  else {
601  tempTag = tagList.front();
602  cXMLElementList typeList = tempTag->getElementsByTagName("areaType");
603 
604  if (typeList.empty())
605  throw cRuntimeError("No areaType has been defined in areaTypes!");
606 
607  for (cXMLElementList::const_iterator aType = typeList.begin(); aType != typeList.end(); aType++) {
608  sstr = (*aType)->getAttribute("name");
609 
610  EV_DEBUG << "Area type " << sstr << " : " << endl;
611 
612  int typeID = transitions->addAreaType(sstr);
613 
614  cXMLElementList boundList = (*aType)->getElementsByTagName("boundary");
615  if (boundList.empty())
616  throw cRuntimeError("No boundary is given for a area type!");
617 
618  Coord minBound, maxBound;
619  for (cXMLElementList::const_iterator aBound = boundList.begin(); aBound != boundList.end(); aBound++) {
620  str = (*aBound)->getAttribute("xMin");
621  minBound.x = strtod(str, nullptr);
622  str = (*aBound)->getAttribute("yMin");
623  minBound.y = strtod(str, nullptr);
624  str = (*aBound)->getAttribute("zMin");
625  minBound.z = strtod(str, nullptr);
626 
627  str = (*aBound)->getAttribute("xMax");
628  maxBound.x = strtod(str, nullptr);
629  str = (*aBound)->getAttribute("yMax");
630  maxBound.y = strtod(str, nullptr);
631  str = (*aBound)->getAttribute("zMax");
632  maxBound.z = strtod(str, nullptr);
633 
634  transitions->setAreaBoundry(typeID, minBound, maxBound);
635  EV_DEBUG << "Low bound: " << minBound << endl;
636  EV_DEBUG << "High bound: " << maxBound << endl;
637  }
638  }
639  }
640 
641  /* Reading the time domains, if there are any. */
642  tagList = xmlConfig->getElementsByTagName("timeDomains");
643 
644  if (tagList.empty())
645  EV_DEBUG << "No time domain is given. So there is no temporal correlation in posture selection." << endl;
646  else {
647  tempTag = tagList.front();
648  cXMLElementList typeList = tempTag->getElementsByTagName("timeDomain");
649 
650  if (typeList.empty())
651  throw cRuntimeError("No timeDomain has been defined in timeDomains!");
652 
653  for (cXMLElementList::const_iterator aType = typeList.begin(); aType != typeList.end(); aType++) {
654  sstr = (*aType)->getAttribute("name");
655 
656  EV_DEBUG << "Time domain " << sstr << " : " << endl;
657 
658  int typeID = transitions->addTimeDomain(sstr);
659 
660  cXMLElementList boundList = (*aType)->getElementsByTagName("boundary");
661  if (boundList.empty())
662  throw cRuntimeError("No boundary is given for a time domain!");
663 
664  simtime_t minTime, maxTime;
665  for (cXMLElementList::const_iterator aBound = boundList.begin(); aBound != boundList.end(); aBound++) {
666  str = (*aBound)->getAttribute("tMin");
667  minTime = strtod(str, nullptr);
668  str = (*aBound)->getAttribute("tMax");
669  maxTime = strtod(str, nullptr);
670 
671  transitions->setTimeBoundry(typeID, minTime, maxTime);
672  EV_DEBUG << "Low bound: (" << minTime.dbl() << ", " << maxTime << ")" << endl;
673  }
674  }
675  }
676 
677  /* Reading the combinations, if there are any. */
678  tagList = xmlConfig->getElementsByTagName("combinations");
679 
680  if (tagList.empty())
681  EV_DEBUG << "No combination is given. The default Markov model is then used for the whole time and space!" << endl;
682  else {
683  tempTag = tagList.front();
684  cXMLElementList combList = tempTag->getElementsByTagName("combination");
685 
686  if (combList.empty())
687  throw cRuntimeError("No combination has been defined in combinations!");
688 
689  EV_DEBUG << "Combinations: " << endl;
690 
691  for (cXMLElementList::const_iterator aComb = combList.begin(); aComb != combList.end(); aComb++) {
692  std::string areaName, timeName, matrixName;
693 
694  if ((*aComb)->getAttribute("areaType") != nullptr)
695  areaName = (*aComb)->getAttribute("areaType");
696  else
697  areaName.clear();
698 
699  if ((*aComb)->getAttribute("timeDomain") != nullptr)
700  timeName = (*aComb)->getAttribute("timeDomain");
701  else
702  timeName.clear();
703 
704  if ((*aComb)->getAttribute("matrix") != nullptr)
705  matrixName = (*aComb)->getAttribute("matrix");
706  else
707  throw cRuntimeError("No transition matrix is specified for a combination");
708 
709  transitions->addCombination(areaName, timeName, matrixName);
710 
711  EV_DEBUG << "(" << areaName << ", " << timeName << ", " << matrixName << ")" << endl;
712  }
713  }
714 
715  return true;
716 }

Referenced by initialize().

◆ readMobilityPatternFile()

bool inet::MoBanCoordinator::readMobilityPatternFile ( )
protected

Reads the previously logged mobility pattern and make mobility pattern data base.

This function reads the input mobility pattern file and make a list of the mobility patterns.

It will be called in the initialization phase if the useMobilityPattern parameter is true.

296 {
297  patternLength = 0;
298  double x, y, z, s;
299  int id;
300  char file_name[70];
301  char posture_name[50];
302 
303  sprintf(file_name, "%s", par("mobilityPatternFile").stringValue());
304  FILE *fp = fopen(file_name, "r");
305  if (fp == nullptr)
306  return false;
307 
308  // count number of patterns (lines in the input file)
309  int c;
310  while ((c = fgetc(fp)) != EOF)
311  if (c == '\n')
312  patternLength++;
313 
314  fclose(fp);
315 
316  EV_DEBUG << "Mobility Pattern Length: " << patternLength << endl;
317 
319 
320  fp = fopen(file_name, "r");
321 
322  int i = 0;
323  while (fscanf(fp, "%49s %d", posture_name, &id) != -1) {
324  mobilityPattern[i].postureID = id;
325  if (postureList[id]->isMobile()) {
326  if (fscanf(fp, "%le %le %le %le", &x, &y, &z, &s) == -1)
327  throw cRuntimeError("Couldn't parse parameters");
328  mobilityPattern[i].targetPos = Coord(x, y, z);
329  mobilityPattern[i].speed = s;
330  }
331  else {
332  if (fscanf(fp, "%le", &x) == -1)
333  throw cRuntimeError("Couldn't parse parameters");
334  mobilityPattern[i].duration = x;
335  }
336  ++i;
337  }
338 
339  fclose(fp);
340 
341  currentPattern = -1;
342 
343  return true;
344 }

Referenced by initialize().

◆ readPostureSpecificationFile()

bool inet::MoBanCoordinator::readPostureSpecificationFile ( )
protected

Reading the input postures specification file and making the posture data base.

Function to read the specified posture specification input file and make the posture data base.

The posture specification includes the specification of a set of possible body postures in the target application. The specification of each posture should provide the speed range of the global movement of the whole WBAN and the relative position of the reference point, movement radius around the reference point and movement velocity of all nodes in the WBAN. The function will be called in the initialization phase.

354 {
355  cXMLElement *xmlPosture = par("postureSpecFile");
356  if (xmlPosture == nullptr)
357  return false;
358 
359  const char *str;
360 
361  // read the specification of every posture from file and make a list of postures
362  cXMLElementList postures;
363 
364  postures = xmlPosture->getElementsByTagName("posture");
365 
366  // find the number of defined postures
367  numPostures = postures.size();
368  if (numPostures == 0)
369  throw cRuntimeError("No posture is defined in the input posture specification file");
370 
371  unsigned int postureID;
372 
373  cXMLElementList::const_iterator posture;
374  for (posture = postures.begin(); posture != postures.end(); posture++) {
375  str = (*posture)->getAttribute("postureID");
376  postureID = strtol(str, nullptr, 0);
377  if (postureID >= numPostures)
378  throw cRuntimeError("Posture ID in input posture specification file is out of the range");
379 
380  postureList.push_back(new Posture(postureID, localModules.size()));
381 
382  str = (*posture)->getAttribute("name");
383  postureList[postureID]->setPostureName(const_cast<char *>(str));
384 
385  str = (*posture)->getAttribute("minSpeed");
386  double minS = strtod(str, nullptr);
387  str = (*posture)->getAttribute("maxSpeed");
388  double maxS = strtod(str, nullptr);
389  postureList[postureID]->setPostureSpeed(minS, maxS);
390 
391  int i = 0;
392  double x, y, z, s, r;
393  cXMLElementList nodeParameters;
394 
395  nodeParameters = (*posture)->getElementsByTagName("nodeParameters");
396  if (nodeParameters.size() != localModules.size())
397  throw cRuntimeError("Some nodes may not have specified parameters in a posture in input posture specification file");
398 
399  cXMLElementList::const_iterator param;
400  for (param = nodeParameters.begin(); param != nodeParameters.end(); param++) {
401  str = (*param)->getAttribute("positionX");
402  x = strtod(str, nullptr);
403 
404  str = (*param)->getAttribute("positionY");
405  y = strtod(str, nullptr);
406 
407  str = (*param)->getAttribute("positionZ");
408  z = strtod(str, nullptr);
409 
410  str = (*param)->getAttribute("radius");
411  r = strtod(str, nullptr);
412 
413  str = (*param)->getAttribute("speed");
414  s = strtod(str, nullptr);
415 
416  postureList[postureID]->setPs(i, Coord(x, y, z));
417  postureList[postureID]->setRadius(i, r);
418  postureList[postureID]->setSpeed(i, s);
419 
420  i++;
421  }
422  }
423 
424  /* Report the obtained specification of the postures. */
425  for (unsigned int i = 0; i < numPostures; ++i) {
426  EV_DEBUG << "Information for the posture: " << i << " is" << endl;
427  for (unsigned int j = 0; j < localModules.size(); ++j)
428  EV_DEBUG << "Node " << j << " position: " << postureList[i]->getPs(j)
429  << " and radius: " << postureList[i]->getRadius(j) << " and speed: " << postureList[i]->getSpeed(j) << endl;
430  }
431 
432  return true;
433 }

Referenced by initialize().

◆ refreshDisplay()

void inet::MoBanCoordinator::refreshDisplay ( ) const
overrideprotectedvirtual

Moves the visual representation module's icon to the new position on the screen.

Reimplemented from inet::MobilityBase.

174 {
175  // show posture name in the graphical interface
176  char dis_str[100];
177  sprintf(dis_str, "%s until %f", currentPosture->getPostureName(), nextChange.dbl());
178  getDisplayString().setTagArg("t", 0, dis_str);
179 }

◆ selectDestination()

Coord inet::MoBanCoordinator::selectDestination ( )
protected

Function to select the destination in the case of a mobile posture.

Select a position inside the simulation area as the destination for the new mobile posture.

It is called whenever a new mobile posture is selected. It is taken into account that all nodes should be inside the area.

234 {
235  Coord res;
236  res = getRandomPosition();
237  res.z = lastPosition.z; // the z value remain the same
238 
239  // check if it is okay using CoverRadius
240  while (!isInsideWorld(res)) {
241  res = getRandomPosition();
242  res.z = lastPosition.z;
243  }
244 
245  return res;
246 }

Referenced by initialize(), and setTargetPosition().

◆ selectDuration()

simtime_t inet::MoBanCoordinator::selectDuration ( )
protected

Select a stay time duration in the specified range for the new posture.

Select a stay time duration in the specified duration range for the new posture.

It is called whenever a new stable posture is selected.

224 {
225  return uniform(minDuration, maxDuration);
226 }

Referenced by setTargetPosition().

◆ selectPosture()

void inet::MoBanCoordinator::selectPosture ( )
protected

Function to select the next posture considering the current posture and the Markov model.

Select a new posture randomly or based on the given Markov model.

If the requested strategy is not uniform random, A Markov chain will be used. If the strategy is INDIVIDUAL_MARKOV, we should retrieve the transition matrix for the current part of the area. If it is INDIVIDUAL_MARKOV, we have the base transition matrix and a steady state vector for the current part of the area. So the closest transition matrix to the base matrix is calculated which satisfies the required steady state vector. In any case, the next posture is selected considering the current posture and according to the final Markov transition matrix.

191 {
192  int postureID = 0;
193 
195  postureID = floor(uniform(0, numPostures)); // uniformly random posture selection
196  currentPosture = postureList[postureID];
197  return;
198  }
199 
200  /* Here we check the area and the time to determine the corresponding posture transition matrix */
202 
203  /* Using transition matrix to select the next posture */
204  double randomValue = uniform(0, 1);
205  double comp = 0;
206  int currentP = currentPosture->getPostureID(); // it determines the column in the matrix
207 
208  for (int i = 0; i < static_cast<int>(numPostures); ++i) {
209  comp += markovMatrix[i][currentP];
210  if (randomValue < comp) {
211  postureID = i;
212  break;
213  }
214  }
215 
216  currentPosture = postureList[postureID];
217 }

Referenced by setTargetPosition().

◆ selectSpeed()

double inet::MoBanCoordinator::selectSpeed ( )
protected

Select a velocity value within the given velocity range.

It is called whenever a new stable posture is selected. In the case of using a logged mobility pattern, the speed value is retrieved from the pattern.

254 {
255  return uniform(currentPosture->getMinSpeed(), currentPosture->getMaxSpeed());
256 }

Referenced by setTargetPosition().

◆ setInitialPosition()

void inet::MoBanCoordinator::setInitialPosition ( )
overrideprotectedvirtual

Initializes the position from the display string or from module parameters.

Reimplemented from inet::MobilityBase.

110 {
111 // lastPosition = selectDestination();
112 }

◆ setTargetPosition()

void inet::MoBanCoordinator::setTargetPosition ( )
overrideprotectedvirtual

Set a new target position from the next posture.

The main process of the MoBAN mobility model.

To be called whenever a destination is reached or the duration of the previous posture expires. It select the behavior of the next movement (the posture and the destination), and prepare the required variables to make the movement. In the case of using a logged mobility pattern, the new posture and other parameters are obtained from the pattern.

Implements inet::LineSegmentsMobilityBase.

121 {
122  // select the new posture and set the variable currentPosture as well as the reference points of all nodes within the WBAN.
123  if (useMobilityPattern) {
125  int postureID = mobilityPattern[currentPattern].postureID;
126  currentPosture = postureList[postureID];
127  }
128  else
129  selectPosture();
130 
131  EV_DEBUG << "New posture is selected: " << currentPosture->getPostureName() << endl;
132 
133  simtime_t duration;
134  if (currentPosture->isMobile()) {
135  double distance;
136 
137  if (useMobilityPattern) {
140  }
141  else {
143  speed = selectSpeed();
144  }
145 
146  if (speed == 0)
147  throw cRuntimeError("The velocity in a mobile posture should not be zero!");
148 
150  duration = distance / speed;
151  }
152  else {
154  if (useMobilityPattern)
156  else
157  duration = selectDuration();
158  }
159  nextChange = simTime() + duration;
160 
161  // write the move step into the output log file
162  if (currentPosture->isMobile())
164  else
165  fprintf(logfile, "%s %d %f \n", currentPosture->getPostureName(), currentPosture->getPostureID(), duration.dbl());
166 
167  publishToNodes();
168 
169  EV_DEBUG << "New posture: " << currentPosture->getPostureName() << endl;
170  EV_DEBUG << "Destination: " << targetPosition << " Total Time = " << duration << endl;
171 }

Member Data Documentation

◆ currentPattern

int inet::MoBanCoordinator::currentPattern
protected

The index of the currently applied mobility pattern from.

Referenced by readMobilityPatternFile(), and setTargetPosition().

◆ currentPosture

Posture* inet::MoBanCoordinator::currentPosture
protected

◆ localModules

std::vector<MoBanLocal *> inet::MoBanCoordinator::localModules
protected

The mobility modules of the nodes in this WBAN.

Referenced by collectLocalModules(), isInsideWorld(), publishToNodes(), and readPostureSpecificationFile().

◆ logfile

FILE* inet::MoBanCoordinator::logfile
protected

Pointer to the file for logging MoBAN mobility pattern for future use.

Referenced by finish(), initialize(), and setTargetPosition().

◆ markovMatrix

double** inet::MoBanCoordinator::markovMatrix
protected

A matrix which maintains the transition probabilities of the Markov Model of posture pattern.

To be given through configuration file.

Referenced by selectPosture().

◆ maxDuration

simtime_t inet::MoBanCoordinator::maxDuration
protected

The maximum value of the duration for stable postures.

Referenced by readConfigurationFile(), and selectDuration().

◆ maxSpeed

double inet::MoBanCoordinator::maxSpeed
protected

The possible maximum speed at any future time.

Referenced by computeMaxSpeed().

◆ minDuration

simtime_t inet::MoBanCoordinator::minDuration
protected

The minimum value of the duration for stable postures.

Referenced by readConfigurationFile(), and selectDuration().

◆ mobilityPattern

Pattern* inet::MoBanCoordinator::mobilityPattern
protected

The mobility pattern data base.

Referenced by computeMaxSpeed(), readMobilityPatternFile(), setTargetPosition(), and ~MoBanCoordinator().

◆ numPostures

unsigned int inet::MoBanCoordinator::numPostures
protected

Number of predefined postures.

Referenced by readConfigurationFile(), readPostureSpecificationFile(), and selectPosture().

◆ patternLength

int inet::MoBanCoordinator::patternLength
protected

The number of mobility pattern instances which has been read from the input file (length of mobility pattern data base).

Referenced by computeMaxSpeed(), readMobilityPatternFile(), and setTargetPosition().

◆ postureList

std::vector<Posture *> inet::MoBanCoordinator::postureList
protected

◆ postureSelStrategy

posture_sel_type inet::MoBanCoordinator::postureSelStrategy
protected

The requested strategy for posture selection.

To be given through configuration file.

Referenced by readConfigurationFile(), and selectPosture().

◆ speed

double inet::MoBanCoordinator::speed
protected

Currently selected speed for the mobile posture.

Referenced by setTargetPosition().

◆ transitions

PostureTransition* inet::MoBanCoordinator::transitions
protected

Class for performing operation for spatial and temporal correlations in posture selection.

Referenced by readConfigurationFile(), selectPosture(), and ~MoBanCoordinator().

◆ useMobilityPattern

bool inet::MoBanCoordinator::useMobilityPattern
protected

Variable that shows if reusing previously logged mobility pattern is requested.

The value is gotten from the parameter of the module

Referenced by computeMaxSpeed(), initialize(), and setTargetPosition().


The documentation for this class was generated from the following files:
inet::MoBanCoordinator::pattern::duration
simtime_t duration
Definition: MoBanCoordinator.h:128
inet::PostureTransition::addTimeDomain
int addTimeDomain(std::string)
Adds a time domain to the list with the given name and returns the index of the this time domain in t...
Definition: PostureTransition.cc:199
inet::MoBanCoordinator::postureSelStrategy
posture_sel_type postureSelStrategy
The requested strategy for posture selection.
Definition: MoBanCoordinator.h:154
inet::Posture::getPs
Coord getPs(unsigned int)
Returns the relative position of a node in this posture.
Definition: Posture.cc:141
inet::MoBanCoordinator::maxDuration
simtime_t maxDuration
The maximum value of the duration for stable postures.
Definition: MoBanCoordinator.h:117
inet::units::constants::c
const value< double, compose< units::m, pow< units::s, -1 > > > c(299792458)
inet::MoBanCoordinator::currentPattern
int currentPattern
The index of the currently applied mobility pattern from.
Definition: MoBanCoordinator.h:140
inet::MoBanCoordinator::selectPosture
void selectPosture()
Function to select the next posture considering the current posture and the Markov model.
Definition: MoBanCoordinator.cc:190
inet::MoBanCoordinator::collectLocalModules
void collectLocalModules(cModule *module)
Collect MoBAN local modules.
Definition: MoBanCoordinator.cc:718
inet::MoBanCoordinator::logfile
FILE * logfile
Pointer to the file for logging MoBAN mobility pattern for future use.
Definition: MoBanCoordinator.h:102
inet::MobilityBase::lastPosition
Coord lastPosition
The last position that was reported.
Definition: MobilityBase.h:73
inet::Posture::getPostureID
int getPostureID()
Returns the unique Id (index) of this posture.
Definition: Posture.cc:186
inet::INITSTAGE_GROUP_MOBILITY
INET_API InitStage INITSTAGE_GROUP_MOBILITY
Initialization of group mobility modules: calculating the initial position and orientation.
inet::PostureTransition::addCombination
bool addCombination(std::string, std::string, std::string)
Adds a space-time combination to the list.
Definition: PostureTransition.cc:236
inet::LineSegmentsMobilityBase::targetPosition
Coord targetPosition
End position of current linear movement.
Definition: LineSegmentsMobilityBase.h:28
inet::MoBanCoordinator::markovMatrix
double ** markovMatrix
A matrix which maintains the transition probabilities of the Markov Model of posture pattern.
Definition: MoBanCoordinator.h:145
inet::MoBanCoordinator::numPostures
unsigned int numPostures
Number of predefined postures.
Definition: MoBanCoordinator.h:105
inet::Coord::x
double x
Definition: Coord.h:36
inet::PostureTransition::setTimeBoundry
bool setTimeBoundry(int, simtime_t, simtime_t)
Adds the given boundary to the existing time domain specified by the given ID .
Definition: PostureTransition.cc:219
inet::Coord::distance
double distance(const Coord &a) const
Returns the distance to Coord 'a'.
Definition: Coord.h:251
inet::PostureTransition::setAreaBoundry
bool setAreaBoundry(int, Coord, Coord)
Adds the given boundary to the existing area type specified by the given ID .
Definition: PostureTransition.cc:184
inet::Posture::getPostureName
char * getPostureName()
Returns posture name.
Definition: Posture.cc:181
inet::MoBanCoordinator::computeMaxSpeed
void computeMaxSpeed()
Definition: MoBanCoordinator.cc:731
inet::MoBanCoordinator::selectDestination
Coord selectDestination()
Function to select the destination in the case of a mobile posture.
Definition: MoBanCoordinator.cc:233
inet::Posture::getSpeed
double getSpeed(unsigned int)
Returns the singular movement speed of a node in this posture.
Definition: Posture.cc:173
inet::MoBanCoordinator::minDuration
simtime_t minDuration
The minimum value of the duration for stable postures.
Definition: MoBanCoordinator.h:114
inet::MoBanCoordinator::maxSpeed
double maxSpeed
The possible maximum speed at any future time.
Definition: MoBanCoordinator.h:99
inet::MoBanCoordinator::localModules
std::vector< MoBanLocal * > localModules
The mobility modules of the nodes in this WBAN.
Definition: MoBanCoordinator.h:93
inet::MoBanCoordinator::posture_sel_type
posture_sel_type
Possible (supported) strategies for posture selection.
Definition: MoBanCoordinator.h:148
inet::MoBanCoordinator::selectDuration
simtime_t selectDuration()
Select a stay time duration in the specified range for the new posture.
Definition: MoBanCoordinator.cc:223
inet::units::values::s
value< double, units::s > s
Definition: Units.h:1235
inet::MovingMobilityBase::initialize
virtual void initialize(int stage) override
Initializes mobility model parameters.
Definition: MovingMobilityBase.cc:26
inet::MovingMobilityBase::nextChange
simtime_t nextChange
The next simulation time when the mobility module needs to update its internal state.
Definition: MovingMobilityBase.h:46
inet::Posture::getMaxSpeed
double getMaxSpeed()
Returns maximum value of the speed range of this posture.
Definition: Posture.cc:191
inet::MoBanCoordinator::patternLength
int patternLength
The number of mobility pattern instances which has been read from the input file (length of mobility ...
Definition: MoBanCoordinator.h:137
inet::Coord::z
double z
Definition: Coord.h:38
inet::PostureTransition::addMatrix
void addMatrix(double **, double **, double **)
Adds two matrices with dimension numPos*numPose .
Definition: PostureTransition.cc:427
inet::MoBanCoordinator::UNIFORM_RANDOM
@ UNIFORM_RANDOM
Definition: MoBanCoordinator.h:149
inet::MoBanCoordinator::currentPosture
Posture * currentPosture
The current selected posture.
Definition: MoBanCoordinator.h:111
inet::MoBanCoordinator::readPostureSpecificationFile
bool readPostureSpecificationFile()
Reading the input postures specification file and making the posture data base.
Definition: MoBanCoordinator.cc:353
inet::PostureTransition::getMatrix
double ** getMatrix(simtime_t, Coord)
Gets a time and location, and returns the corresponding Markov transition matrix.
Definition: PostureTransition.cc:302
inet::MoBanCoordinator::pattern::postureID
unsigned int postureID
Definition: MoBanCoordinator.h:125
NUM_INIT_STAGES
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
inet::MoBanCoordinator::selectSpeed
double selectSpeed()
Select a velocity value within the given velocity range.
Definition: MoBanCoordinator.cc:253
inet::physicallayer::k
const double k
Definition: Qam1024Modulation.cc:14
inet::MoBanCoordinator::mobilityPattern
Pattern * mobilityPattern
The mobility pattern data base.
Definition: MoBanCoordinator.h:132
inet::MoBanCoordinator::isInsideWorld
bool isInsideWorld(Coord)
Checks if all nodes of the WBAN are inside the simulation environment with the given position of the ...
Definition: MoBanCoordinator.cc:261
inet::PostureTransition::addAreaType
int addAreaType(std::string)
Adds a area type to the list with the given name and returns the index of this area type in the list.
Definition: PostureTransition.cc:164
inet::MoBanCoordinator::readMobilityPatternFile
bool readMobilityPatternFile()
Reads the previously logged mobility pattern and make mobility pattern data base.
Definition: MoBanCoordinator.cc:295
inet::MoBanCoordinator::publishToNodes
void publishToNodes()
Publishes the reference point and other information of the posture to the blackboard of the belonging...
Definition: MoBanCoordinator.cc:277
inet::Posture::isMobile
bool isMobile()
Check if this posture is mobile by checking the maximum possible speed.
Definition: Posture.cc:201
inet::MoBanCoordinator::MARKOV_BASE
@ MARKOV_BASE
Definition: MoBanCoordinator.h:150
inet::MoBanCoordinator::Pattern
struct inet::MoBanCoordinator::pattern Pattern
Data type for one instance of mobility pattern.
inet::Posture::getMinSpeed
double getMinSpeed()
Returns minimum value of the speed range of this posture.
Definition: Posture.cc:196
inet::MoBanCoordinator::pattern::targetPos
Coord targetPos
Definition: MoBanCoordinator.h:126
inet::MoBanCoordinator::readConfigurationFile
bool readConfigurationFile()
Reads the input configuration file.
Definition: MoBanCoordinator.cc:442
inet::MoBanCoordinator::postureList
std::vector< Posture * > postureList
The list of all predefined postures (posture data base)
Definition: MoBanCoordinator.h:108
inet::MoBanCoordinator::speed
double speed
Currently selected speed for the mobile posture.
Definition: MoBanCoordinator.h:96
inet::MoBanCoordinator::transitions
PostureTransition * transitions
Class for performing operation for spatial and temporal correlations in posture selection.
Definition: MoBanCoordinator.h:157
inet::MoBanCoordinator::pattern::speed
double speed
Definition: MoBanCoordinator.h:127
inet::utils::makePathForFile
void makePathForFile(const char *filename)
Definition: INETUtils.cc:210
inet::MoBanCoordinator::useMobilityPattern
bool useMobilityPattern
Variable that shows if reusing previously logged mobility pattern is requested.
Definition: MoBanCoordinator.h:121
inet::Coord::y
double y
Definition: Coord.h:37
inet::PostureTransition::addSteadyState
int addSteadyState(std::string, double *)
Receives a steady state vector, extracts the corresponding transition matrix considering the default ...
Definition: PostureTransition.cc:128
inet::Posture::getRadius
double getRadius(unsigned int)
Returns the singular movement radius of a node in this posture.
Definition: Posture.cc:165
inet::MobilityBase::getRandomPosition
virtual Coord getRandomPosition()
Returns a new random position satisfying the constraint area.
Definition: MobilityBase.cc:251