
ErasureChannel |
ptolemy.domains.wireless.lib.ErasureChannel |
Model of a wireless channel with a specified loss probability. If the
loss probability is greater than zero then on each
call to the transmit() method, for each receiver in range,
with the specified probability, the transmission to that
receiver will not occur. Whether a transmission occurs to a particular
receiver is independent of whether it occurs to any other receiver.
<p>
For convenience, a variable named "distance" is available and
equal to the distance between the transmitter and the receiver
when the <i>lossProbability</i> is evaluated. Thus, the
loss probability can be given as an expression that depends
on this distance.
<p>
The distance between the transmitter and receiver is determined
by the protected method _distanceBetween(), which is also used
to set the value of the <i>distance</i> variable that can be
used in the expression for loss probability.
In this base class, that method uses
the _location attribute of the transmit and receive actors,
which corresponds to the position of the icon in the Vergil
visual editor. Subclasses may override this protected method
to provide some other notion of distance.
Author(s): Edward A. Lee
Version:$Id: ErasureChannel.doc.html,v 1.1 2006/02/22 18:40:27 mangal Exp $
Pt.Proposed Rating:Green (cxh)
Pt.Accepted Rating:Yellow (cxh)
lossProbability
The probability that a call to transmit() will fail to deliver
the token to a receiver that is in range.
This is a double that defaults to 0.0, which means that
no loss occurs.
seed
The seed that controls the random number generation.
A seed of zero is interpreted to mean that no seed is specified,
which means that each execution of the model could result in
distinct data. For the value 0, the seed is set to
System.currentTimeMillis() + hashCode(), which means that
with extremely high probability, two distinct actors will have
distinct seeds. However, current time may not have enough
resolution to ensure that two subsequent executions of the
same model have distinct seeds.
This parameter contains a LongToken, initially with value 0.