A Discrete-Event Network Simulator
API
steady-state-random-waypoint-mobility-model.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 IITP RAS
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Denis Fakhriev <fakhriev@iitp.ru>
19  */
20 #ifndef STEADY_STATE_RANDOM_WAYPOINT_MOBILITY_MODEL_H
21 #define STEADY_STATE_RANDOM_WAYPOINT_MOBILITY_MODEL_H
22 
24 #include "mobility-model.h"
25 #include "position-allocator.h"
26 #include "ns3/ptr.h"
27 #include "ns3/random-variable-stream.h"
28 
29 namespace ns3 {
30 
56 {
57 public:
62  static TypeId GetTypeId (void);
64 protected:
65  virtual void DoInitialize (void);
66 private:
72  void DoInitializePrivate (void);
78  void SteadyStateBeginWalk (const Vector &destination);
82  void Start (void);
86  void BeginWalk (void);
87  virtual Vector DoGetPosition (void) const;
88  virtual void DoSetPosition (const Vector &position);
89  virtual Vector DoGetVelocity (void) const;
90  virtual int64_t DoAssignStreams (int64_t);
91 
93  double m_maxSpeed;
94  double m_minSpeed;
96  double m_minX;
97  double m_maxX;
98  double m_minY;
99  double m_maxY;
100  double m_z;
102  double m_minPause;
103  double m_maxPause;
114 };
115 
116 } // namespace ns3
117 
118 #endif /* STEADY_STATE_RANDOM_WAYPOINT_MOBILITY_MODEL_H */
ns3::SteadyStateRandomWaypointMobilityModel::m_u_r
Ptr< UniformRandomVariable > m_u_r
rv used in step 5 of algorithm
Definition: steady-state-random-waypoint-mobility-model.h:111
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::SteadyStateRandomWaypointMobilityModel::m_maxX
double m_maxX
maximum x value of traveling region (m)
Definition: steady-state-random-waypoint-mobility-model.h:97
ns3::SteadyStateRandomWaypointMobilityModel::m_y
Ptr< UniformRandomVariable > m_y
rv used for position allocator
Definition: steady-state-random-waypoint-mobility-model.h:113
ns3::SteadyStateRandomWaypointMobilityModel::m_maxPause
double m_maxPause
maximum pause value (s)
Definition: steady-state-random-waypoint-mobility-model.h:103
ns3::SteadyStateRandomWaypointMobilityModel::m_speed
Ptr< UniformRandomVariable > m_speed
random variable for speed values
Definition: steady-state-random-waypoint-mobility-model.h:95
ns3::SteadyStateRandomWaypointMobilityModel::Start
void Start(void)
Start a pause period and schedule the ending of the pause.
Definition: steady-state-random-waypoint-mobility-model.cc:255
ns3::EventId
An identifier for simulation events.
Definition: event-id.h:54
ns3::SteadyStateRandomWaypointMobilityModel::m_pause
Ptr< UniformRandomVariable > m_pause
random variable for pause values
Definition: steady-state-random-waypoint-mobility-model.h:104
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::SteadyStateRandomWaypointMobilityModel::m_minX
double m_minX
minimum x value of traveling region (m)
Definition: steady-state-random-waypoint-mobility-model.h:96
ns3::SteadyStateRandomWaypointMobilityModel::m_position
Ptr< RandomBoxPositionAllocator > m_position
position allocator
Definition: steady-state-random-waypoint-mobility-model.h:101
position-allocator.h
ns3::SteadyStateRandomWaypointMobilityModel::m_z
double m_z
z value of traveling region
Definition: steady-state-random-waypoint-mobility-model.h:100
ns3::ConstantVelocityHelper
Utility class used to move node with constant velocity.
Definition: constant-velocity-helper.h:37
ns3::SteadyStateRandomWaypointMobilityModel::DoAssignStreams
virtual int64_t DoAssignStreams(int64_t)
The default implementation does nothing but return the passed-in parameter.
Definition: steady-state-random-waypoint-mobility-model.cc:286
ns3::SteadyStateRandomWaypointMobilityModel::DoInitializePrivate
void DoInitializePrivate(void)
Configure random variables based on attributes; calculate the steady state probability that node is i...
Definition: steady-state-random-waypoint-mobility-model.cc:109
ns3::SteadyStateRandomWaypointMobilityModel::m_minSpeed
double m_minSpeed
minimum speed value (m/s)
Definition: steady-state-random-waypoint-mobility-model.h:94
ns3::SteadyStateRandomWaypointMobilityModel::m_minPause
double m_minPause
minimum pause value (s)
Definition: steady-state-random-waypoint-mobility-model.h:102
ns3::SteadyStateRandomWaypointMobilityModel::m_x2_r
Ptr< UniformRandomVariable > m_x2_r
rv used in rejection sampling phase
Definition: steady-state-random-waypoint-mobility-model.h:109
ns3::SteadyStateRandomWaypointMobilityModel::DoGetVelocity
virtual Vector DoGetVelocity(void) const
Definition: steady-state-random-waypoint-mobility-model.cc:281
ns3::SteadyStateRandomWaypointMobilityModel::DoInitialize
virtual void DoInitialize(void)
Initialize() implementation.
Definition: steady-state-random-waypoint-mobility-model.cc:102
ns3::Ptr< UniformRandomVariable >
ns3::SteadyStateRandomWaypointMobilityModel::m_minY
double m_minY
minimum y value of traveling region (m)
Definition: steady-state-random-waypoint-mobility-model.h:98
ns3::SteadyStateRandomWaypointMobilityModel::DoSetPosition
virtual void DoSetPosition(const Vector &position)
Definition: steady-state-random-waypoint-mobility-model.cc:271
ns3::SteadyStateRandomWaypointMobilityModel::m_y2_r
Ptr< UniformRandomVariable > m_y2_r
rv used in rejection sampling phase
Definition: steady-state-random-waypoint-mobility-model.h:110
constant-velocity-helper.h
ns3::SteadyStateRandomWaypointMobilityModel::m_y1_r
Ptr< UniformRandomVariable > m_y1_r
rv used in rejection sampling phase
Definition: steady-state-random-waypoint-mobility-model.h:108
ns3::SteadyStateRandomWaypointMobilityModel::alreadyStarted
bool alreadyStarted
flag for starting state
Definition: steady-state-random-waypoint-mobility-model.h:106
mobility-model.h
ns3::SteadyStateRandomWaypointMobilityModel::BeginWalk
void BeginWalk(void)
Start a motion period and schedule the ending of the motion.
Definition: steady-state-random-waypoint-mobility-model.cc:233
ns3::SteadyStateRandomWaypointMobilityModel::m_event
EventId m_event
current event ID
Definition: steady-state-random-waypoint-mobility-model.h:105
ns3::SteadyStateRandomWaypointMobilityModel
Steady-state random waypoint mobility model.
Definition: steady-state-random-waypoint-mobility-model.h:56
ns3::SteadyStateRandomWaypointMobilityModel::m_x
Ptr< UniformRandomVariable > m_x
rv used for position allocator
Definition: steady-state-random-waypoint-mobility-model.h:112
ns3::SteadyStateRandomWaypointMobilityModel::DoGetPosition
virtual Vector DoGetPosition(void) const
Definition: steady-state-random-waypoint-mobility-model.cc:265
ns3::SteadyStateRandomWaypointMobilityModel::m_x1_r
Ptr< UniformRandomVariable > m_x1_r
rv used in rejection sampling phase
Definition: steady-state-random-waypoint-mobility-model.h:107
ns3::SteadyStateRandomWaypointMobilityModel::m_maxSpeed
double m_maxSpeed
maximum speed value (m/s)
Definition: steady-state-random-waypoint-mobility-model.h:93
ns3::SteadyStateRandomWaypointMobilityModel::SteadyStateRandomWaypointMobilityModel
SteadyStateRandomWaypointMobilityModel()
Definition: steady-state-random-waypoint-mobility-model.cc:86
ns3::SteadyStateRandomWaypointMobilityModel::m_maxY
double m_maxY
maximum y value of traveling region (m)
Definition: steady-state-random-waypoint-mobility-model.h:99
ns3::MobilityModel
Keep track of the current position and velocity of an object.
Definition: mobility-model.h:40
ns3::SteadyStateRandomWaypointMobilityModel::m_helper
ConstantVelocityHelper m_helper
helper for velocity computations
Definition: steady-state-random-waypoint-mobility-model.h:92
ns3::SteadyStateRandomWaypointMobilityModel::GetTypeId
static TypeId GetTypeId(void)
Register this type with the TypeId system.
Definition: steady-state-random-waypoint-mobility-model.cc:31
ns3::SteadyStateRandomWaypointMobilityModel::SteadyStateBeginWalk
void SteadyStateBeginWalk(const Vector &destination)
Use provided destination to calculate travel delay, and schedule a Start() event at that time.
Definition: steady-state-random-waypoint-mobility-model.cc:209