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 */
virtual void DoInitialize(void)
Initialize() implementation.
Ptr< UniformRandomVariable > m_speed
random variable for speed values
Ptr< UniformRandomVariable > m_pause
random variable for pause values
Ptr< UniformRandomVariable > m_x1_r
rv used in rejection sampling phase
Ptr< UniformRandomVariable > m_u_r
rv used in step 5 of algorithm
Utility class used to move node with constant velocity.
Ptr< UniformRandomVariable > m_x2_r
rv used in rejection sampling phase
ConstantVelocityHelper m_helper
helper for velocity computations
void SteadyStateBeginWalk(const Vector &destination)
Use provided destination to calculate travel delay, and schedule a Start() event at that time...
Keep track of the current position and velocity of an object.
Ptr< UniformRandomVariable > m_y2_r
rv used in rejection sampling phase
void Start(void)
Start a pause period and schedule the ending of the pause.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
An identifier for simulation events.
Definition: event-id.h:53
Ptr< UniformRandomVariable > m_y1_r
rv used in rejection sampling phase
Ptr< UniformRandomVariable > m_y
rv used for position allocator
Ptr< RandomBoxPositionAllocator > m_position
position allocator
virtual int64_t DoAssignStreams(int64_t)
The default implementation does nothing but return the passed-in parameter.
void BeginWalk(void)
Start a motion period and schedule the ending of the motion.
static TypeId GetTypeId(void)
Register this type with the TypeId system.
a unique identifier for an interface.
Definition: type-id.h:58
Ptr< UniformRandomVariable > m_x
rv used for position allocator
void DoInitializePrivate(void)
Configure random variables based on attributes; calculate the steady state probability that node is i...