A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
22
#include "
constant-velocity-helper.h
"
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
56
class
SteadyStateRandomWaypointMobilityModel
:
public
MobilityModel
57
{
58
public
:
63
static
TypeId
GetTypeId
();
64
SteadyStateRandomWaypointMobilityModel
();
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
95
ConstantVelocityHelper
m_helper
;
96
double
m_maxSpeed
;
97
double
m_minSpeed
;
98
Ptr<UniformRandomVariable>
m_speed
;
99
double
m_minX
;
100
double
m_maxX
;
101
double
m_minY
;
102
double
m_maxY
;
103
double
m_z
;
104
Ptr<RandomBoxPositionAllocator>
m_position
;
105
double
m_minPause
;
106
double
m_maxPause
;
107
Ptr<UniformRandomVariable>
m_pause
;
108
EventId
m_event
;
109
bool
alreadyStarted
;
110
Ptr<UniformRandomVariable>
m_x1_r
;
111
Ptr<UniformRandomVariable>
m_y1_r
;
112
Ptr<UniformRandomVariable>
m_x2_r
;
113
Ptr<UniformRandomVariable>
m_y2_r
;
114
Ptr<UniformRandomVariable>
m_u_r
;
115
Ptr<UniformRandomVariable>
m_x
;
116
Ptr<UniformRandomVariable>
m_y
;
117
};
118
119
}
// namespace ns3
120
121
#endif
/* STEADY_STATE_RANDOM_WAYPOINT_MOBILITY_MODEL_H */
ns3::ConstantVelocityHelper
Utility class used to move node with constant velocity.
Definition:
constant-velocity-helper.h:38
ns3::EventId
An identifier for simulation events.
Definition:
event-id.h:55
ns3::MobilityModel
Keep track of the current position and velocity of an object.
Definition:
mobility-model.h:40
ns3::Ptr< UniformRandomVariable >
ns3::SteadyStateRandomWaypointMobilityModel
Steady-state random waypoint mobility model.
Definition:
steady-state-random-waypoint-mobility-model.h:57
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:114
ns3::SteadyStateRandomWaypointMobilityModel::DoSetPosition
void DoSetPosition(const Vector &position) override
Definition:
steady-state-random-waypoint-mobility-model.cc:285
ns3::SteadyStateRandomWaypointMobilityModel::DoAssignStreams
int64_t DoAssignStreams(int64_t) override
The default implementation does nothing but return the passed-in parameter.
Definition:
steady-state-random-waypoint-mobility-model.cc:302
ns3::SteadyStateRandomWaypointMobilityModel::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition:
steady-state-random-waypoint-mobility-model.cc:105
ns3::SteadyStateRandomWaypointMobilityModel::m_maxSpeed
double m_maxSpeed
maximum speed value (m/s)
Definition:
steady-state-random-waypoint-mobility-model.h:96
ns3::SteadyStateRandomWaypointMobilityModel::m_minPause
double m_minPause
minimum pause value (s)
Definition:
steady-state-random-waypoint-mobility-model.h:105
ns3::SteadyStateRandomWaypointMobilityModel::m_minX
double m_minX
minimum x value of traveling region (m)
Definition:
steady-state-random-waypoint-mobility-model.h:99
ns3::SteadyStateRandomWaypointMobilityModel::m_y2_r
Ptr< UniformRandomVariable > m_y2_r
rv used in rejection sampling phase
Definition:
steady-state-random-waypoint-mobility-model.h:113
ns3::SteadyStateRandomWaypointMobilityModel::m_pause
Ptr< UniformRandomVariable > m_pause
random variable for pause values
Definition:
steady-state-random-waypoint-mobility-model.h:107
ns3::SteadyStateRandomWaypointMobilityModel::m_x2_r
Ptr< UniformRandomVariable > m_x2_r
rv used in rejection sampling phase
Definition:
steady-state-random-waypoint-mobility-model.h:112
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:222
ns3::SteadyStateRandomWaypointMobilityModel::DoGetVelocity
Vector DoGetVelocity() const override
Definition:
steady-state-random-waypoint-mobility-model.cc:296
ns3::SteadyStateRandomWaypointMobilityModel::m_y
Ptr< UniformRandomVariable > m_y
rv used for position allocator
Definition:
steady-state-random-waypoint-mobility-model.h:116
ns3::SteadyStateRandomWaypointMobilityModel::m_speed
Ptr< UniformRandomVariable > m_speed
random variable for speed values
Definition:
steady-state-random-waypoint-mobility-model.h:98
ns3::SteadyStateRandomWaypointMobilityModel::m_z
double m_z
z value of traveling region
Definition:
steady-state-random-waypoint-mobility-model.h:103
ns3::SteadyStateRandomWaypointMobilityModel::m_maxX
double m_maxX
maximum x value of traveling region (m)
Definition:
steady-state-random-waypoint-mobility-model.h:100
ns3::SteadyStateRandomWaypointMobilityModel::DoGetPosition
Vector DoGetPosition() const override
Definition:
steady-state-random-waypoint-mobility-model.cc:278
ns3::SteadyStateRandomWaypointMobilityModel::GetTypeId
static TypeId GetTypeId()
Register this type with the TypeId system.
Definition:
steady-state-random-waypoint-mobility-model.cc:33
ns3::SteadyStateRandomWaypointMobilityModel::m_maxPause
double m_maxPause
maximum pause value (s)
Definition:
steady-state-random-waypoint-mobility-model.h:106
ns3::SteadyStateRandomWaypointMobilityModel::m_minSpeed
double m_minSpeed
minimum speed value (m/s)
Definition:
steady-state-random-waypoint-mobility-model.h:97
ns3::SteadyStateRandomWaypointMobilityModel::m_x1_r
Ptr< UniformRandomVariable > m_x1_r
rv used in rejection sampling phase
Definition:
steady-state-random-waypoint-mobility-model.h:110
ns3::SteadyStateRandomWaypointMobilityModel::DoInitializePrivate
void DoInitializePrivate()
Configure random variables based on attributes; calculate the steady state probability that node is i...
Definition:
steady-state-random-waypoint-mobility-model.cc:112
ns3::SteadyStateRandomWaypointMobilityModel::BeginWalk
void BeginWalk()
Start a motion period and schedule the ending of the motion.
Definition:
steady-state-random-waypoint-mobility-model.cc:246
ns3::SteadyStateRandomWaypointMobilityModel::m_minY
double m_minY
minimum y value of traveling region (m)
Definition:
steady-state-random-waypoint-mobility-model.h:101
ns3::SteadyStateRandomWaypointMobilityModel::Start
void Start()
Start a pause period and schedule the ending of the pause.
Definition:
steady-state-random-waypoint-mobility-model.cc:268
ns3::SteadyStateRandomWaypointMobilityModel::m_x
Ptr< UniformRandomVariable > m_x
rv used for position allocator
Definition:
steady-state-random-waypoint-mobility-model.h:115
ns3::SteadyStateRandomWaypointMobilityModel::SteadyStateRandomWaypointMobilityModel
SteadyStateRandomWaypointMobilityModel()
Definition:
steady-state-random-waypoint-mobility-model.cc:89
ns3::SteadyStateRandomWaypointMobilityModel::m_helper
ConstantVelocityHelper m_helper
helper for velocity computations
Definition:
steady-state-random-waypoint-mobility-model.h:95
ns3::SteadyStateRandomWaypointMobilityModel::m_y1_r
Ptr< UniformRandomVariable > m_y1_r
rv used in rejection sampling phase
Definition:
steady-state-random-waypoint-mobility-model.h:111
ns3::SteadyStateRandomWaypointMobilityModel::alreadyStarted
bool alreadyStarted
flag for starting state
Definition:
steady-state-random-waypoint-mobility-model.h:109
ns3::SteadyStateRandomWaypointMobilityModel::m_event
EventId m_event
current event ID
Definition:
steady-state-random-waypoint-mobility-model.h:108
ns3::SteadyStateRandomWaypointMobilityModel::m_maxY
double m_maxY
maximum y value of traveling region (m)
Definition:
steady-state-random-waypoint-mobility-model.h:102
ns3::SteadyStateRandomWaypointMobilityModel::m_position
Ptr< RandomBoxPositionAllocator > m_position
position allocator
Definition:
steady-state-random-waypoint-mobility-model.h:104
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
constant-velocity-helper.h
mobility-model.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
position-allocator.h
src
mobility
model
steady-state-random-waypoint-mobility-model.h
Generated on Sun Mar 3 2024 17:11:05 for ns-3 by
1.9.1