parameterssimulationomnet++inet

Unable to calculate Throughtput, Jitters and E2E delay in OMNET++ 4.6


I am running AVENS (FANET) scenario and unable to get following in outputs/results:

I have added vectors-recording in ini file and @statistic in my NED file.

also how can I display UAVs (nodes) at different positions instead of stacking over one another.

Here's the NED file

//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see http://www.gnu.org/licenses/.
// 

package avens;

import inet.common.lifecycle.LifecycleController;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.inet.AdhocHost;
import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.networklayer.ipv4.RoutingTableRecorder;

network FANET
{
    parameters:
        int numHosts = default(2);
        @display("bgb=600,600");
        @statistic[eed](title="end-to-end delay of received packets"; unit=s);
        @statistic[jitter](title="jitter of received packets");
        //@statistic[throughput](source="sumPerDuration(packetBits(messageSent))"; record=last?; unit=bps);
        @statistic[throughput](title="throughput"; unit=bps; record=histogram,vector);


    submodules:

        lifecycleController: LifecycleController {
            @display("p=410,483");
        }
        radioMedium: Ieee80211ScalarRadioMedium {
            @display("p=410,426");
        }
        routingTableRecorder: RoutingTableRecorder {
            parameters:
                @display("p=514,360");
        }
        configurator: IPv4NetworkConfigurator {
            config = xml("<config><interface hosts='*' address='192.168.0.x' netmask='255.255.255.0'/></config>");
            @display("p=529,483");
        }

        uav[numHosts]: Aircraft {
            @display("i=device/drone;is=n;p=398,92");
        }

        gcs: AdhocHost {
            @display("i=device/antennatower_vl;r=,,#707070;p=227,148");
        }

        handler: FileHandler {
            @display("p=529,427");
        }

}


and the ini file

[General]
#debug-on-errors = true

sim-time-limit = 100000s        #simulation time
output-scalar-file-append = false
cmdenv-express-mode = true      #express run of simulation
network = FANET     #simulate the network 
num-rngs = 2        #random number generator

FANET.numHosts = 10     #no of hosts/uavs in FANET
FANET.handler.filename = "D:\\UAV\\positions\\pluginInterface.xml"      #XML file for filehandler module
FANET.handler.hostVariableName = "uav"                                  #name of host
FANET.handler.numHostVariableName = "numHosts"                          #no of hosts

tkenv-plugin-path = ../../../Etc/plugins    #path for addtional plug-ins for OMNET
#tkenv-default-run=1

description = "Simulacao AVENS"

**.vector-recording = true
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 2500m
**.constraintAreaMaxY = 2500m
**.constraintAreaMaxZ = 2500m

**.channelNumber = 0

**.mobility.updateInterval = 2s

**.numPingApps = 1
**.pingApp[*].destAddr = "uav[0]"
**.pingApp[*].sendInterval = 10s
**.pingApp[*].sleepDuration = 10s

#**.uav[0].numUdpApps = 0
#
#**.uav[0].udpApp[*].typename = "UDPVideoStreamSvr"
#**.uav[0].udpApp[*].videoSize = 10MiB
#**.uav[0].udpApp[*].localPort = 3088
#**.uav[0].udpApp[*].sendInterval = 10ms
#**.uav[0].udpApp[*].packetLen = 1000B

**.uav[*].numUdpApps = 0

**.uav[*].udpApp[*].typename = "UDPVideoStreamSvr"
**.uav[*].udpApp[*].videoSize = 10MiB
**.uav[*].udpApp[*].localPort = 3088
**.uav[*].udpApp[*].sendInterval = 10ms
**.uav[*].udpApp[*].packetLen = 1000B
**.uav[*].udpApp[*].packetName = "UDPData"

**.gcs.numUdpApps = 0
**.gcs.udpApp[*].typename = "UDPVideoStreamCli"
**.gcs.udpApp[*].serverAddress = "uav[*](ipv4)"
**.gcs.udpApp[*].localPort = 9999
**.gcs.udpApp[*].serverPort = 3088
**.gcs.udpApp[*].startTime = 0

**.routingFile = ""
**.ip.procDelay = 10us

# ARP configuration
**.arp.retryTimeout = 1s
**.arp.retryCount = 3
**.arp.cacheTimeout = 100s

#*.obstacleControl.obstacles = xmldoc("obstacles.xml")      # obstacles XML
#*.obstacleControl.debug = true     # obstacles XML
#**.annotations.draw = true 

##############################################################################
# Parameters for MAC layer #
##############################################################################

# nic settings
**.wlan*.bitrate = 2Mbps

**.mac.address = "auto"
**.mac.maxQueueSize = 14
**.mac.rtsThresholdBytes = 3000B
**.wlan[*].mac.retryLimit = 7
**.wlan[*].mac.cwMinData = 7

**.radioMedium.backgroundNoise.power = -110dBm
**.radioMedium.mediumVisualizer.displayCommunication = true

include uavconf.ini
 ##########################################################
                  #       Parameters for the Host                          #
                  ##########################################################
                  ############# Phy parameters #############################
                  **.phy.usePropagationDelay = false
                  **.phy.useThermalNoise = true
                  **.phy.analogueModels = xmldoc("config.xml")
                  **.phy.maxTXPower = 100mW
                  **.phy.sensitivity = -104dBm
                  ############# Phy parameters #############################


##############################################################################
# Parameters for the Energy Model (units: mAh and mA) #
##############################################################################
**.hasStatus = true

**.energyStorageType = "SimpleEnergyStorage"
**.energyConsumerType = "StateBasedEnergyConsumer"
**.energyStorage.nominalCapacity = 0.05J
**.energyStorage.nodeShutdownCapacity = 0J
**.energyStorage.nodeStartCapacity = 0.5 * this.nominalCapacity
**.energyStorage.initialCapacity = uniform(0J, this.nominalCapacity)
**.energyGeneratorType = "AlternatingEnergyGenerator"
**.energyGenerator.energySinkModule = "^.energyStorage"
**.energyGenerator.powerGeneration = 100mW
**.energyGenerator.sleepInterval = exponential(10s)
**.energyGenerator.generationInterval = exponential(10s)

#**.rxSetupTime = 0.00108s

##############################################################################
# Mobility #
##############################################################################

**.gcs.mobilityType = "StationaryMobility"

##############################################################################
#       Output vectors                                                       #
##############################################################################
output-vector-file = ${resultdir}/${configname}-${runnumber}.vec
output-scalar-file = ${resultdir}/${configname}-${runnumber}.sca

**.End-to-end delay.vector-recording = true
**.Mean end-to-end delay.vector-recording = true
**.throughput.vector-recording = true
**.scalar-recording = true
**.result-recording-modes = default
**.jitter.vector-recording = true

                  ##########################################################
                  #       Parameters for the ConnectionManager             #
                  ##########################################################
                  **.connectionManager.carrierFrequency = 2.4e9Hz  # - Hz
                  # max transmission power - mW
                  **.connectionManager.pMax = 100mW
                  # signal attenuation threshold - dBm
                  **.connectionManager.sat = -104dBm
                  # path loss coefficient alpha
                  **.connectionManager.alpha = 2.5
                  **.connectionManager.sendDirect = false


#visualizer

**.radio.displayCommunicationRange = true
*.visualizer.mediumVisualizer.displaySignals = true
*.visualizer.physicalLinkVisualizer.displayLinks = true
*.visualizer.physicalLinkVisualizer.packetFilter = "UDPData*"
*.visualizer.mobilityVisualizer.displayVelocities = true
*.visualizer.mobilityVisualizer.displayMovementTrails = true

Solution

    1. The declarations of your @statistic do not precise a source of the statistic nor the name of signal to use.
      Take a look at these files:

      inet-3.2.4-src\inet\src\inet\applications\pingapp\PingApp.ned
      inet-3.2.4-src\inet\src\inet\applications\pingapp\PingApp.cc
      

      and for example analyze how numLost signal and statistic are defined and generated in the C++ code.

    2. Even if statistics are correctly prepared, note that in your model traffic is very small.The UDP and TCP applications are disabled. Only pingApp is generating a small packet every 10 second.

    3. To show the nodes in different positions remove part p=... from @display directive in NED, i.e. change it to:

      uav[numHosts]: Aircraft {
         @display("i=device/drone;is=n");
      }