A Discrete-Event Network Simulator
API
steady-state-random-waypoint-mobility-model.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 IITP RAS
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Denis Fakhriev <fakhriev@iitp.ru>
18  */
19 #ifndef STEADY_STATE_RANDOM_WAYPOINT_MOBILITY_MODEL_H
20 #define STEADY_STATE_RANDOM_WAYPOINT_MOBILITY_MODEL_H
21 
23 #include "mobility-model.h"
24 #include "position-allocator.h"
25 
26 #include "ns3/ptr.h"
27 #include "ns3/random-variable-stream.h"
28 
29 namespace ns3
30 {
31 
57 {
58  public:
63  static TypeId GetTypeId();
65 
66  protected:
67  void DoInitialize() override;
68 
69  private:
75  void DoInitializePrivate();
81  void SteadyStateBeginWalk(const Vector& destination);
85  void Start();
89  void BeginWalk();
90  Vector DoGetPosition() const override;
91  void DoSetPosition(const Vector& position) override;
92  Vector DoGetVelocity() const override;
93  int64_t DoAssignStreams(int64_t) override;
94 
96  double m_maxSpeed;
97  double m_minSpeed;
99  double m_minX;
100  double m_maxX;
101  double m_minY;
102  double m_maxY;
103  double m_z;
105  double m_minPause;
106  double m_maxPause;
117 };
118 
119 } // namespace ns3
120 
121 #endif /* STEADY_STATE_RANDOM_WAYPOINT_MOBILITY_MODEL_H */
Utility class used to move node with constant velocity.
An identifier for simulation events.
Definition: event-id.h:55
Keep track of the current position and velocity of an object.
Ptr< UniformRandomVariable > m_u_r
rv used in step 5 of algorithm
int64_t DoAssignStreams(int64_t) override
The default implementation does nothing but return the passed-in parameter.
Ptr< UniformRandomVariable > m_y2_r
rv used in rejection sampling phase
Ptr< UniformRandomVariable > m_pause
random variable for pause values
Ptr< UniformRandomVariable > m_x2_r
rv used in rejection sampling phase
void SteadyStateBeginWalk(const Vector &destination)
Use provided destination to calculate travel delay, and schedule a Start() event at that time.
Ptr< UniformRandomVariable > m_y
rv used for position allocator
Ptr< UniformRandomVariable > m_speed
random variable for speed values
static TypeId GetTypeId()
Register this type with the TypeId system.
Ptr< UniformRandomVariable > m_x1_r
rv used in rejection sampling phase
void DoInitializePrivate()
Configure random variables based on attributes; calculate the steady state probability that node is i...
void BeginWalk()
Start a motion period and schedule the ending of the motion.
void Start()
Start a pause period and schedule the ending of the pause.
Ptr< UniformRandomVariable > m_x
rv used for position allocator
ConstantVelocityHelper m_helper
helper for velocity computations
Ptr< UniformRandomVariable > m_y1_r
rv used in rejection sampling phase
Ptr< RandomBoxPositionAllocator > m_position
position allocator
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.