Dalia Adly
Dalia Adly

Reputation: 53

simulation time limit issue

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 !!!

Upvotes: 0

Views: 524

Answers (1)

Rudi
Rudi

Reputation: 6681

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.

Upvotes: 2

Related Questions