Professional Documents
Culture Documents
1. Gate vectors
2. Dynamic connections
3. Sampling from random distributions
4. Self messaging
4
Gate vectors
Building gates of different sizes
5
Gate vectors
We can use for loops and if conditions inside connections to deal with arbitrarily
large modules and add some logic to our topology.
13 Dynamic networks cont.
exponential(double mean)
Remember the exponential distribution’s mean = 1/lambda
Lambda could be a parameter that has different value for every node
18 Self messaging
Need to schedule the packet arrival event.
Remember that messages are omnetpp’s representation of events.
We need to send ourselves a message in the future, to trigger the sending at the
appropriate time.
The scheduleAt(t, msg) function allows us to send ourselves a message that will be
received at simulation time t
The simTime() functions returns the current simulation time.
We can combine this with our samples interval to send ourselves a message as
follows:
19 Self messaging cont.