Table Of Contents
Table Of Contents

Markov-Chain-Based Classifier

The MarkovClassifier module uses a Markov process to classify packets. The current state of the Markov process selects the output gate, a configurable transition matrix determines the probabilities of state change, and the configured wait intervals determine the time between state changes.

In this example network, packets are generated by an active packet source (ActivePacketSource). The packet source pushes packets into a classifier (MarkovClassifier). The classifier is connected to two passive packet sinks (PassivePacketSink). The classifier pushes packets into one of the packet sinks based on the current state of the Markov process.

network MarkovClassifierTutorialStep
        producer: ActivePacketSource {
        classifier: MarkovClassifier {
        consumer1: PassivePacketSink {
        consumer2: PassivePacketSink {
    connections allowunconnected:
        producer.out -->;
        classifier.out++ -->;
        classifier.out++ -->;
[Config MarkovClassifier]
network = MarkovClassifierTutorialStep
sim-time-limit = 100s

*.producer.packetLength = 1B
*.producer.productionInterval = 1s
*.classifier.transitionProbabilities = "0 1 1 0"
*.classifier.waitIntervals = "40 4"