Several actions may be associated with an event or a message, each having a different probability of occurrence. Of course, the probabilities must add to 1. qThe probabilities are specified using the reserved word prob followed by an arithmetic expression.
EXAMPLE: Assume we want to model a faulty link which corrupts a packet with probability . Upon arrival the packet is accepted and queued with probability and discarded with probability .
action= { /* a packet with no errors has arrived */ int queue; queue = Queue + 1; set_st("Queue", queue); } : prob = p; { /* a corrupted packet has arrived, do nothing */ ; } : prob = 1 - p;