Multiple action

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 $1-p$. Upon arrival the packet is accepted and queued with probability $p$ and discarded with probability $1-p$.

  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;



Subsections

Guilherme Dutra Gonzaga Jaime 2010-10-27