The following code gives an example to create a uniform 0.1 loss rate.
# creating the uniform distribution random variable
set loss_random_variable [new RandomVariable/Uniform]
$loss_random_variable set min_ 0 # set the range of the random variable;
$loss_random_variable set max_ 100
set loss_module [new ErrorModel] # create the error model;
$loss_module drop-target [new Agent/Null]
$loss_module set rate_ 10 # set error rate to \(0.1 = 10 / (100 - 0)\);
$loss_module ranvar $loss_random_variable # attach random var. to loss module;
A catalogue of the random variable distributions was described earlierChapterchap:math.
A more detailed discussion of error models was also described earlier
in a different chapterChapterchap:error_model.