Table Of Contents
Table Of Contents

Markov-Chain-Based Scheduler

The MarkovScheduler module uses a Markov process to schedule packets. The current state of the Markov process selects the input gate; a configurable transition matrix determines the probabilities of state change; the configured wait intervals determine the time between state changes. If the provider at the selected input cannot prodivide a packet for duration of the state’s wait interval, the process switches to the next state without pulling a packet.

In this example network, packets are generated by two passive packet sources (PassivePacketSource). The packet sources are connected to a scheduler (MarkovScheduler). Packets are popped from the scheduler by an active packet sink (ActivePacketSink). The scheduler in turn pops packets from one of the packet sources, based on the current state of the Markov process.

network MarkovSchedulerTutorialStep
        provider1: PassivePacketSource {
        provider2: PassivePacketSource {
        scheduler: MarkovScheduler {
        collector: ActivePacketSink {
    connections allowunconnected:
        provider1.out -->;
        provider2.out -->;
        scheduler.out -->;
[Config MarkovScheduler]
network = MarkovSchedulerTutorialStep
sim-time-limit = 100s

*.provider*.packetLength = 1B
*.collector*.collectionInterval = uniform(0s, 2s)
*.scheduler.transitionProbabilities = "0 1 1 0"
*.scheduler.waitIntervals = "40 4"