19.3.2 Using shadowing model

Before using the model, the user should select the values of the path loss exponent $\beta$ and the shadowing deviation $\sigma_{dB}$ according to the simulated environment.

The OTcl interface is still the node-config command. One way to use it is as follows, and the values for these parameters are just examples.

# first set values of shadowing model
Propagation/Shadowing set pathlossExp_ 2.0  ;# path loss exponent
Propagation/Shadowing set std_db_ 4.0       ;# shadowing deviation (dB)
Propagation/Shadowing set dist0_ 1.0        ;# reference distance (m)
Propagation/Shadowing set seed_ 0           ;# seed for RNG

$ns_ node-config -propType Propagation/Shadowing

The shadowing model creates a random number generator (RNG) object. The RNG has three types of seeds: raw seed, pre-defined seed (a set of known good seeds) and the huristic seed (details in Section [*]). The above API only uses the pre-defined seed. If a user want different seeding method, the following API can be used.

set prop [new Propagation/Shadowing]
$prop set pathlossExp_ 2.0
$prop set std_db_ 4.0
$prop set dist0_ 1.0
$prop seed \<seed-type\> 0              ;# user can specify seeding method

$ns_ node-config -propInstance $prop

The seed-type above can be raw, predef or heuristic.



Tom Henderson 2014-12-17