A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
channel-condition-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 SIGNET Lab, Department of Information Engineering,
3 * University of Padova
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
19#ifndef CHANNEL_CONDITION_MODEL_H
20#define CHANNEL_CONDITION_MODEL_H
21
22#include "ns3/nstime.h"
23#include "ns3/object.h"
24#include "ns3/random-variable-stream.h"
25#include "ns3/vector.h"
26
27#include <unordered_map>
28
29namespace ns3
30{
31
32class MobilityModel;
33
34/**
35 * \ingroup propagation
36 *
37 * \brief Carries information about the LOS/NLOS channel state
38 *
39 * Additional information about the channel condition can be aggregated to instances of
40 * this class.
41 */
43{
44 public:
45 /**
46 * Possible values for Line-of-Sight condition.
47 */
49 {
50 LOS, //!< Line of Sight
51 NLOS, //!< Non Line of Sight
52 NLOSv, //!< Non Line of Sight due to a vehicle
53 LC_ND //!< Los condition not defined
54 };
55
56 /**
57 * Possible values for Outdoor to Indoor condition.
58 */
60 {
61 O2O, //!< Outdoor to Outdoor
62 O2I, //!< Outdoor to Indoor
63 I2I, //!< Indoor to Indoor
64 O2I_ND //!< Outdoor to Indoor condition not defined
65 };
66
67 /**
68 * Possible values for Low-High Penetration Loss condition.
69 */
71 {
72 LOW, //!< Low Penetration Losses
73 HIGH, //!< High Penetration Losses
74 LH_O2I_ND //!< Low-High Penetration Losses not defined
75 };
76
77 /**
78 * Get the type ID.
79 * \brief Get the type ID.
80 * \return the object TypeId
81 */
82 static TypeId GetTypeId();
83
84 /**
85 * Constructor for the ChannelCondition class
86 */
88
89 /**
90 * Constructor for the ChannelCondition class
91 * \param losCondition the LOS condition value
92 * \param o2iCondition the O2I condition value (by default is set to O2O)
93 * \param o2iLowHighCondition the O2I Low-High Building Penetration loss condition value (by
94 * default is set to LOW)
95 */
97 O2iConditionValue o2iCondition = O2O,
98 O2iLowHighConditionValue o2iLowHighCondition = LOW);
99
100 /**
101 * Destructor for the ChannelCondition class
102 */
103 ~ChannelCondition() override;
104
105 /**
106 * Get the LosConditionValue containing the information about the LOS/NLOS
107 * state of the channel
108 *
109 * \return the LosConditionValue
110 */
112
113 /**
114 * Set the LosConditionValue with the information about the LOS/NLOS
115 * state of the channel
116 *
117 * \param losCondition the LosConditionValue
118 */
119 void SetLosCondition(LosConditionValue losCondition);
120
121 /**
122 * Get the O2iConditionValue containing the information about the O2I
123 * state of the channel
124 *
125 * \return the O2iConditionValue
126 */
128
129 /**
130 * Set the O2iConditionValue containing the information about the O2I
131 * state of the channel
132 *
133 * \param o2iCondition the O2iConditionValue
134 */
135 void SetO2iCondition(O2iConditionValue o2iCondition);
136
137 /**
138 * Get the O2iLowHighConditionValue containing the information about the O2I
139 * building penetration losses (low or high)
140 *
141 * \return the O2iLowHighConditionValue
142 */
144
145 /**
146 * Set the O2iLowHighConditionValue containing the information about the O2I
147 * building penetration losses (low or high)
148 *
149 * \param o2iLowHighCondition the O2iLowHighConditionValue
150 */
151 void SetO2iLowHighCondition(O2iLowHighConditionValue o2iLowHighCondition);
152
153 /**
154 * Return true if the channel condition is LOS
155 *
156 * \return true if the channel condition is LOS
157 */
158 bool IsLos() const;
159
160 /**
161 * Return true if the channel condition is NLOS
162 *
163 * It does not consider the case in which the LOS path is obstructed by a
164 * vehicle. This case is represented as a separate channel condition (NLOSv),
165 * use the method IsNlosv instead.
166 *
167 * \return true if the channel condition is NLOS
168 */
169 bool IsNlos() const;
170
171 /**
172 * Return true if the channel condition is NLOSv
173 *
174 * \return true if the channel condition is NLOSv
175 */
176 bool IsNlosv() const;
177
178 /**
179 * Return true if the channel is outdoor-to-indoor
180 *
181 * \return true if the channel is outdoor-to-indoor
182 */
183 bool IsO2i() const;
184
185 /**
186 * Return true if the channel is outdoor-to-outdoor
187 *
188 * \return true if the channel is outdoor-to-outdoor
189 */
190 bool IsO2o() const;
191
192 /**
193 * Return true if the channel is indoor-to-indoor
194 *
195 * \return true if the channel is indoor-to-indoor
196 */
197 bool IsI2i() const;
198
199 /**
200 * Return true if this instance is equivalent to the one passed as argument
201 *
202 * \param losCondition the LOS condition of the other channel condition instance
203 * \param o2iCondition the 02I condition of the other channel condition instance
204 * \return true if the channel LOS and O2i conditions of the instance are equivalent to those
205 * passed as arguments
206 */
207 bool IsEqual(LosConditionValue losCondition, O2iConditionValue o2iCondition) const;
208
209 private:
211 m_losCondition; //!< contains the information about the LOS state of the channel
213 m_o2iCondition; //!< contains the information about the O2I state of the channel
214 O2iLowHighConditionValue m_o2iLowHighCondition; //!< contains the information about the O2I
215 //!< low-high building penetration losses
216
217 /**
218 * Prints a LosConditionValue to output
219 * \param os the output stream
220 * \param cond the LosConditionValue
221 *
222 * \return a reference to the output stream
223 */
224 friend std::ostream& operator<<(std::ostream& os, LosConditionValue cond);
225};
226
227/**
228 * \ingroup propagation
229 *
230 * \brief Models the channel condition
231 *
232 * Computes the condition of the channel between the transmitter and the
233 * receiver
234 */
236{
237 public:
238 /**
239 * Get the type ID.
240 * \brief Get the type ID.
241 * \return the object TypeId
242 */
243 static TypeId GetTypeId();
244
245 /**
246 * Constructor for the ChannelConditionModel class
247 */
249
250 /**
251 * Destructor for the ChannelConditionModel class
252 */
253 ~ChannelConditionModel() override;
254
255 // Delete copy constructor and assignment operator to avoid misuse
258
259 /**
260 * Computes the condition of the channel between a and b
261 *
262 * \param a mobility model
263 * \param b mobility model
264 * \return the condition of the channel between a and b
265 */
267 Ptr<const MobilityModel> b) const = 0;
268
269 /**
270 * If this model uses objects of type RandomVariableStream,
271 * set the stream numbers to the integers starting with the offset
272 * 'stream'. Return the number of streams (possibly zero) that
273 * have been assigned.
274 *
275 * \param stream the offset used to set the stream numbers
276 * \return the number of stream indices assigned by this model
277 */
278 virtual int64_t AssignStreams(int64_t stream) = 0;
279};
280
281/**
282 * \ingroup propagation
283 *
284 * \brief Models an always in-LoS condition model
285 */
287{
288 public:
289 /**
290 * Get the type ID.
291 * \brief Get the type ID.
292 * \return the object TypeId
293 */
294 static TypeId GetTypeId();
295
296 /**
297 * Constructor
298 */
300
301 /**
302 * Destructor
303 */
305
306 // Delete copy constructor and assignment operator to avoid misuse
309
310 /**
311 * Computes the condition of the channel between a and b, that will be always LoS
312 *
313 * \param a mobility model
314 * \param b mobility model
315 * \return the condition of the channel between a and b, that will be always LoS
316 */
318 Ptr<const MobilityModel> b) const override;
319
320 /**
321 * If this model uses objects of type RandomVariableStream,
322 * set the stream numbers to the integers starting with the offset
323 * 'stream'. Return the number of streams (possibly zero) that
324 * have been assigned.
325 *
326 * \param stream the offset used to set the stream numbers
327 * \return the number of stream indices assigned by this model
328 */
329 int64_t AssignStreams(int64_t stream) override;
330};
331
332/**
333 * \ingroup propagation
334 *
335 * \brief Models a never in-LoS condition model
336 */
338{
339 public:
340 /**
341 * Get the type ID.
342 * \brief Get the type ID.
343 * \return the object TypeId
344 */
345 static TypeId GetTypeId();
346
347 /**
348 * Constructor
349 */
351
352 /**
353 * Destructor
354 */
356
357 // Delete copy constructor and assignment operator to avoid misuse
360
361 /**
362 * Computes the condition of the channel between a and b, that will be always non-LoS
363 *
364 * \param a mobility model
365 * \param b mobility model
366 * \return the condition of the channel between a and b, that will be always non-LoS
367 */
369 Ptr<const MobilityModel> b) const override;
370
371 /**
372 * If this model uses objects of type RandomVariableStream,
373 * set the stream numbers to the integers starting with the offset
374 * 'stream'. Return the number of streams (possibly zero) that
375 * have been assigned.
376 *
377 * \param stream the offset used to set the stream numbers
378 * \return the number of stream indices assigned by this model
379 */
380 int64_t AssignStreams(int64_t stream) override;
381};
382
383/**
384 * \ingroup propagation
385 *
386 * \brief Models a never in-LoS condition model caused by a blocking vehicle
387 */
389{
390 public:
391 /**
392 * Get the type ID.
393 * \brief Get the type ID.
394 * \return the object TypeId
395 */
396 static TypeId GetTypeId();
397
398 /**
399 * Constructor
400 */
402
403 /**
404 * Destructor
405 */
407
408 // Delete copy constructor and assignment operator to avoid misuse
411 delete;
412
413 /**
414 * Computes the condition of the channel between a and b, that will be always NLOSv
415 *
416 * \param a mobility model
417 * \param b mobility model
418 * \return the condition of the channel between a and b, that will be always NLOSv
419 */
421 Ptr<const MobilityModel> b) const override;
422
423 /**
424 * If this model uses objects of type RandomVariableStream,
425 * set the stream numbers to the integers starting with the offset
426 * 'stream'. Return the number of streams (possibly zero) that
427 * have been assigned.
428 *
429 * \param stream the offset used to set the stream numbers
430 * \return the number of stream indices assigned by this model
431 */
432 int64_t AssignStreams(int64_t stream) override;
433};
434
435/**
436 * \ingroup propagation
437 *
438 * \brief Base class for the 3GPP channel condition models
439 *
440 */
442{
443 public:
444 /**
445 * Get the type ID.
446 * \brief Get the type ID.
447 * \return the object TypeId
448 */
449 static TypeId GetTypeId();
450
451 /**
452 * Constructor for the ThreeGppRmaChannelConditionModel class
453 */
455
456 /**
457 * Destructor for the ThreeGppRmaChannelConditionModel class
458 */
460
461 /**
462 * \brief Retrieve the condition of the channel between a and b.
463 *
464 * If the channel condition does not exists, the method computes it by calling
465 * ComputeChannelCondition and stores it in a local cache, that will be updated
466 * following the "UpdatePeriod" parameter.
467 *
468 * \param a mobility model
469 * \param b mobility model
470 * \return the condition of the channel between a and b
471 */
473 Ptr<const MobilityModel> b) const override;
474
475 /**
476 * If this model uses objects of type RandomVariableStream,
477 * set the stream numbers to the integers starting with the offset
478 * 'stream'. Return the number of streams (possibly zero) that
479 * have been assigned.
480 *
481 * \param stream the offset used to set the stream numbers
482 * \return the number of stream indices assigned by this model
483 */
484 int64_t AssignStreams(int64_t stream) override;
485
486 protected:
487 void DoDispose() override;
488
489 /**
490 * Determine the density of vehicles in a V2V scenario.
491 */
493 {
497 INVALID
498 };
499
500 /**
501 * \brief Computes the 2D distance between two 3D vectors
502 * \param a the first 3D vector
503 * \param b the second 3D vector
504 * \return the 2D distance between a and b
505 */
506 static double Calculate2dDistance(const Vector& a, const Vector& b);
507
508 Ptr<UniformRandomVariable> m_uniformVar; //!< uniform random variable
509
510 private:
511 /**
512 * This method computes the channel condition based on a probabilistic model
513 * that is specific for the scenario of interest
514 *
515 * \param a tx mobility model
516 * \param b rx mobility model
517 * \return the channel condition
518 */
521
522 /**
523 * Compute the LOS probability.
524 *
525 * \param a tx mobility model
526 * \param b rx mobility model
527 * \return the LOS probability
528 */
530
531 /**
532 * Determines whether the channel condition is O2I or O2O
533 *
534 * \param a tx mobility model
535 * \param b rx mobility model
536 * \return the O2I channelcondition
537 */
540
541 /**
542 * Compute the NLOS probability. By default returns 1 - PLOS
543 *
544 * \param a tx mobility model
545 * \param b rx mobility model
546 * \return the LOS probability
547 */
549
550 /**
551 * \brief Returns a unique and reciprocal key for the channel between a and b.
552 * \param a tx mobility model
553 * \param b rx mobility model
554 * \return channel key
555 */
557
558 /**
559 * Struct to store the channel condition in the m_channelConditionMap
560 */
561 struct Item
562 {
563 Ptr<ChannelCondition> m_condition; //!< the channel condition
564 Time m_generatedTime; //!< the time when the condition was generated
565 };
566
567 std::unordered_map<uint32_t, Item>
568 m_channelConditionMap; //!< map to store the channel conditions
569 Time m_updatePeriod; //!< the update period for the channel condition
570
572 0}; //!< the threshold for determining what is the ratio of channels with O2I
573 double m_o2iLowLossThreshold{0}; //!< the threshold for determining what is the ratio of low -
574 //!< high O2I building penetration losses
576 false}; //!< the indicator that determines whether the O2I/O2O condition is determined based
577 //!< on the UE height
578 Ptr<UniformRandomVariable> m_uniformVarO2i; //!< uniform random variable that is used for the
579 //!< generation of the O2i conditions
581 m_uniformO2iLowHighLossVar; //!< a uniform random variable for the calculation of the
582 //!< low/high losses, see TR38.901 Table 7.4.3-2
583};
584
585/**
586 * \ingroup propagation
587 *
588 * \brief Computes the channel condition for the RMa scenario
589 *
590 * Computes the channel condition following the specifications for the RMa
591 * scenario reported in Table 7.4.2-1 of 3GPP TR 38.901
592 */
594{
595 public:
596 /**
597 * Get the type ID.
598 * \brief Get the type ID.
599 * \return the object TypeId
600 */
601 static TypeId GetTypeId();
602
603 /**
604 * Constructor for the ThreeGppRmaChannelConditionModel class
605 */
607
608 /**
609 * Destructor for the ThreeGppRmaChannelConditionModel class
610 */
612
613 private:
614 /**
615 * Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901
616 * for the RMa scenario.
617 *
618 * \param a tx mobility model
619 * \param b rx mobility model
620 * \return the LOS probability
621 */
623};
624
625/**
626 * \ingroup propagation
627 *
628 * \brief Computes the channel condition for the UMa scenario
629 *
630 * Computes the channel condition following the specifications for the UMa
631 * scenario reported in Table 7.4.2-1 of 3GPP TR 38.901
632 */
634{
635 public:
636 /**
637 * Get the type ID.
638 * \brief Get the type ID.
639 * \return the object TypeId
640 */
641 static TypeId GetTypeId();
642
643 /**
644 * Constructor for the ThreeGppUmaChannelConditionModel class
645 */
647
648 /**
649 * Destructor for the ThreeGppUmaChannelConditionModel class
650 */
652
653 private:
654 /**
655 * Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901
656 * for the UMa scenario.
657 *
658 * \param a tx mobility model
659 * \param b rx mobility model
660 * \return the LOS probability
661 */
663};
664
665/**
666 * \ingroup propagation
667 *
668 * \brief Computes the channel condition for the UMi-Street canyon scenario
669 *
670 * Computes the channel condition following the specifications for the
671 * UMi-Street canyon scenario reported in Table 7.4.2-1 of 3GPP TR 38.901
672 */
674{
675 public:
676 /**
677 * Get the type ID.
678 * \brief Get the type ID.
679 * \return the object TypeId
680 */
681 static TypeId GetTypeId();
682
683 /**
684 * Constructor for the ThreeGppUmiStreetCanyonChannelConditionModel class
685 */
687
688 /**
689 * Destructor for the ThreeGppUmiStreetCanyonChannelConditionModel class
690 */
692
693 private:
694 /**
695 * Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901
696 * for the UMi-Street Canyon scenario.
697 *
698 * \param a tx mobility model
699 * \param b rx mobility model
700 * \return the LOS probability
701 */
703};
704
705/**
706 * \ingroup propagation
707 *
708 * \brief Computes the channel condition for the Indoor Mixed Office scenario
709 *
710 * Computes the channel condition following the specifications for the
711 * Indoor Mixed Office scenario reported in Table 7.4.2-1 of 3GPP TR 38.901
712 */
714{
715 public:
716 /**
717 * Get the type ID.
718 * \brief Get the type ID.
719 * \return the object TypeId
720 */
721 static TypeId GetTypeId();
722
723 /**
724 * Constructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class
725 */
727
728 /**
729 * Destructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class
730 */
732
733 private:
734 /**
735 * Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901
736 * for the Indoor Mixed Office scenario.
737 *
738 * \param a tx mobility model
739 * \param b rx mobility model
740 * \return the LOS probability
741 */
743};
744
745/**
746 * \ingroup propagation
747 *
748 * \brief Computes the channel condition for the Indoor Open Office scenario
749 *
750 * Computes the channel condition following the specifications for the
751 * Indoor Open Office scenario reported in Table 7.4.2-1 of 3GPP TR 38.901
752 */
754{
755 public:
756 /**
757 * Get the type ID.
758 * \brief Get the type ID.
759 * \return the object TypeId
760 */
761 static TypeId GetTypeId();
762
763 /**
764 * Constructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class
765 */
767
768 /**
769 * Destructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class
770 */
772
773 private:
774 /**
775 * Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901
776 * for the Indoor Open Office scenario.
777 *
778 * \param a tx mobility model
779 * \param b rx mobility model
780 * \return the LOS probability
781 */
783};
784
785} // namespace ns3
786
787#endif /* CHANNEL_CONDITION_MODEL_H */
Models an always in-LoS condition model.
AlwaysLosChannelConditionModel & operator=(const AlwaysLosChannelConditionModel &)=delete
int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
AlwaysLosChannelConditionModel(const AlwaysLosChannelConditionModel &)=delete
static TypeId GetTypeId()
Get the type ID.
Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b, that will be always LoS.
Carries information about the LOS/NLOS channel state.
LosConditionValue m_losCondition
contains the information about the LOS state of the channel
O2iLowHighConditionValue m_o2iLowHighCondition
contains the information about the O2I low-high building penetration losses
bool IsO2i() const
Return true if the channel is outdoor-to-indoor.
ChannelCondition()
Constructor for the ChannelCondition class.
void SetLosCondition(LosConditionValue losCondition)
Set the LosConditionValue with the information about the LOS/NLOS state of the channel.
LosConditionValue GetLosCondition() const
Get the LosConditionValue containing the information about the LOS/NLOS state of the channel.
bool IsNlos() const
Return true if the channel condition is NLOS.
bool IsEqual(LosConditionValue losCondition, O2iConditionValue o2iCondition) const
Return true if this instance is equivalent to the one passed as argument.
O2iConditionValue m_o2iCondition
contains the information about the O2I state of the channel
bool IsNlosv() const
Return true if the channel condition is NLOSv.
bool IsLos() const
Return true if the channel condition is LOS.
void SetO2iCondition(O2iConditionValue o2iCondition)
Set the O2iConditionValue containing the information about the O2I state of the channel.
~ChannelCondition() override
Destructor for the ChannelCondition class.
O2iLowHighConditionValue GetO2iLowHighCondition() const
Get the O2iLowHighConditionValue containing the information about the O2I building penetration losses...
friend std::ostream & operator<<(std::ostream &os, LosConditionValue cond)
Prints a LosConditionValue to output.
bool IsO2o() const
Return true if the channel is outdoor-to-outdoor.
bool IsI2i() const
Return true if the channel is indoor-to-indoor.
static TypeId GetTypeId()
Get the type ID.
O2iConditionValue
Possible values for Outdoor to Indoor condition.
@ O2I_ND
Outdoor to Indoor condition not defined.
@ O2O
Outdoor to Outdoor.
O2iLowHighConditionValue
Possible values for Low-High Penetration Loss condition.
@ LOW
Low Penetration Losses.
@ LH_O2I_ND
Low-High Penetration Losses not defined.
@ HIGH
High Penetration Losses.
void SetO2iLowHighCondition(O2iLowHighConditionValue o2iLowHighCondition)
Set the O2iLowHighConditionValue containing the information about the O2I building penetration losses...
O2iConditionValue GetO2iCondition() const
Get the O2iConditionValue containing the information about the O2I state of the channel.
LosConditionValue
Possible values for Line-of-Sight condition.
@ NLOSv
Non Line of Sight due to a vehicle.
@ LC_ND
Los condition not defined.
Models the channel condition.
static TypeId GetTypeId()
Get the type ID.
virtual int64_t AssignStreams(int64_t stream)=0
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
ChannelConditionModel(const ChannelConditionModel &)=delete
ChannelConditionModel & operator=(const ChannelConditionModel &)=delete
ChannelConditionModel()
Constructor for the ChannelConditionModel class.
virtual Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const =0
Computes the condition of the channel between a and b.
~ChannelConditionModel() override
Destructor for the ChannelConditionModel class.
Models a never in-LoS condition model.
static TypeId GetTypeId()
Get the type ID.
~NeverLosChannelConditionModel() override
Destructor.
Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b, that will be always non-LoS.
NeverLosChannelConditionModel(const NeverLosChannelConditionModel &)=delete
int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
NeverLosChannelConditionModel & operator=(const NeverLosChannelConditionModel &)=delete
Models a never in-LoS condition model caused by a blocking vehicle.
int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b, that will be always NLOSv.
NeverLosVehicleChannelConditionModel(const NeverLosVehicleChannelConditionModel &)=delete
NeverLosVehicleChannelConditionModel & operator=(const NeverLosVehicleChannelConditionModel &)=delete
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Base class for the 3GPP channel condition models.
int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
void DoDispose() override
Destructor implementation.
Ptr< UniformRandomVariable > m_uniformVarO2i
uniform random variable that is used for the generation of the O2i conditions
virtual ChannelCondition::O2iConditionValue ComputeO2i(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Determines whether the channel condition is O2I or O2O.
static uint32_t GetKey(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b)
Returns a unique and reciprocal key for the channel between a and b.
Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Retrieve the condition of the channel between a and b.
~ThreeGppChannelConditionModel() override
Destructor for the ThreeGppRmaChannelConditionModel class.
Ptr< UniformRandomVariable > m_uniformO2iLowHighLossVar
a uniform random variable for the calculation of the low/high losses, see TR38.901 Table 7....
VehicleDensity
Determine the density of vehicles in a V2V scenario.
double m_o2iLowLossThreshold
the threshold for determining what is the ratio of low - high O2I building penetration losses
static double Calculate2dDistance(const Vector &a, const Vector &b)
Computes the 2D distance between two 3D vectors.
virtual double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Compute the NLOS probability.
double m_o2iThreshold
the threshold for determining what is the ratio of channels with O2I
virtual double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const =0
Compute the LOS probability.
std::unordered_map< uint32_t, Item > m_channelConditionMap
map to store the channel conditions
Ptr< UniformRandomVariable > m_uniformVar
uniform random variable
ThreeGppChannelConditionModel()
Constructor for the ThreeGppRmaChannelConditionModel class.
Ptr< ChannelCondition > ComputeChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
This method computes the channel condition based on a probabilistic model that is specific for the sc...
bool m_linkO2iConditionToAntennaHeight
the indicator that determines whether the O2I/O2O condition is determined based on the UE height
Time m_updatePeriod
the update period for the channel condition
static TypeId GetTypeId()
Get the type ID.
Computes the channel condition for the Indoor Mixed Office scenario.
ThreeGppIndoorMixedOfficeChannelConditionModel()
Constructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class.
~ThreeGppIndoorMixedOfficeChannelConditionModel() override
Destructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the Indoor Mixed Offi...
Computes the channel condition for the Indoor Open Office scenario.
ThreeGppIndoorOpenOfficeChannelConditionModel()
Constructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the Indoor Open Offic...
~ThreeGppIndoorOpenOfficeChannelConditionModel() override
Destructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class.
Computes the channel condition for the RMa scenario.
~ThreeGppRmaChannelConditionModel() override
Destructor for the ThreeGppRmaChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the RMa scenario.
ThreeGppRmaChannelConditionModel()
Constructor for the ThreeGppRmaChannelConditionModel class.
static TypeId GetTypeId()
Get the type ID.
Computes the channel condition for the UMa scenario.
static TypeId GetTypeId()
Get the type ID.
ThreeGppUmaChannelConditionModel()
Constructor for the ThreeGppUmaChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the UMa scenario.
~ThreeGppUmaChannelConditionModel() override
Destructor for the ThreeGppUmaChannelConditionModel class.
Computes the channel condition for the UMi-Street canyon scenario.
ThreeGppUmiStreetCanyonChannelConditionModel()
Constructor for the ThreeGppUmiStreetCanyonChannelConditionModel class.
~ThreeGppUmiStreetCanyonChannelConditionModel() override
Destructor for the ThreeGppUmiStreetCanyonChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the UMi-Street Canyon...
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Struct to store the channel condition in the m_channelConditionMap.
Ptr< ChannelCondition > m_condition
the channel condition
Time m_generatedTime
the time when the condition was generated