0

I am facing a problem with the simulation time limit.When It is reached, a new udp packet is created and the routing protocol is about to send a control packet then the end simulation event appears .so, how to prevent creating this udp packet at the end of simulation.

I am using INET veins-5.1-i2

omnetpp.ini file

network = Scenario
sim-time-limit = 24s
debug-on-errors = true
cmdenv-express-mode = true
image-path = ../../../../images

#UDPBasicApp
*.node[*].numApps = 1
*.node[*].app[0].typename = "UdpBasicApp"
*.node[1].app[0].destAddresses = "node[4]"
*.node[*].app[0].multicastInterface = "wlan0"
*.node[*].app[0].joinLocalMulticastGroups = true
*.node[*].app[0].destPort = 9001
*.node[*].app[0].localPort = 9001
*.node[*].app[0].messageLength = 100B
*.node[1].app[0].startTime = 21s
*.node[*].app[0].sendInterval = 1s

# Ieee80211Interface
*.node[*].wlan[0].opMode = "p"
*.node[*].wlan[0].radio.typename = "Ieee80211DimensionalRadio"
*.node[*].wlan[0].radio.bandName = "5.9 GHz"
*.node[*].wlan[0].radio.channelNumber = 3
*.node[*].wlan[0].radio.transmitter.power = 20mW
*.node[*].wlan[0].radio.bandwidth = 10 MHz
*.node[*].wlan[*].radio.antenna.mobility.typename = "AttachedMobility"
*.node[*].wlan[*].radio.antenna.mobility.mobilityModule = "^.^.^.^.mobility"
*.node[*].wlan[*].radio.antenna.mobility.offsetX = -2.5m
*.node[*].wlan[*].radio.antenna.mobility.offsetZ = 1.5m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMinX = 0m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMaxX = 0m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMinY = 0m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMaxY = 0m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMinZ = 0m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMaxZ = 0m

# HostAutoConfigurator
*.node[*].ipv4.configurator.typename = "HostAutoConfigurator"
*.node[*].ipv4.configurator.interfaces = "wlan0"
*.node[*].ipv4.configurator.mcastGroups = "224.0.0.1"

# VeinsInetMobility
*.node[*].mobility.typename = "VeinsInetMobility"

# VeinsInetManager
*.manager.updateInterval = 0.1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.autoShutdown = true
*.manager.launchConfig = xmldoc("square.launchd.xml")
*.manager.moduleType = "org.car2x.veins.subprojects.veins_inet.VeinsInetCar"

# PhysicalEnvironment
*.physicalEnvironment.config = xmldoc("obstacles.xml")
*.radioMedium.obstacleLoss.typename = "IdealObstacleLoss"

# Misc
**.vector-recording = true

A new udp packet is created at the 24th second !!!

Dalia Adly
  • 53
  • 6
  • Are you sure that a new UDP packet is creating **after** reaching the simulation time limit? Could you provide an example? – Jerzy D. Nov 06 '21 at 10:47
  • I added a screenshot to my question . Actually , the end simulation event is the event# 1531 and all these events(event#1519 to event#1531) happens at the same second (t=24). – Dalia Adly Nov 07 '21 at 05:39
  • 2
    So, why is that a problem that some packets are created exactly the same time when you stop the simulation? This is completely normal. It can happen also in real world scenarios. – Rudi Nov 07 '21 at 16:04
  • This last packet is counted as dropped packet so it affects the packet delivery ratio especially, if the number of packets sent is small. Also , at the end of simulation time the routing protocol is about to send a control packet so the simualtion ends with an error 139 After running the debugger mode , i figured out that its an error related to qtenv and animation and to avoid that i ran the simulator using cmdenv. – Dalia Adly Nov 08 '21 at 09:26

1 Answers1

2

If the simulation time limit is low and you are afraid that a single extra packet can affect and throw off your results then:

a) You are doing it wrong because you have so few events and messages in your simulation that the result you receive has no statistical significance. (like: my packet delivery ratio is 81% (+- 60%) ???). This is useless. So, you should either run the simulation for a much longer time (if it converges to a steady state) or run a lot of simulations with different random generator seeds. In either case the effect of a single packet will disappear.

b) If you insist on counting all packets accurately and you don't want to loose even a single packet, then do what you would do in real life: stop sending packets from the data sources well before the simulation stops so all packets will have a chance (and time) to arrive at destination. You should configure your applications to stop sending at least a few seconds before the simulation time limit. There are parameters to do that in almost all application models.

Rudi
  • 6,418
  • 1
  • 16
  • 20