What is the effect of changing the SEED in OMNET++ VS in SUMO for Vehicular Network simulation? - omnet++

I noticed that setting the seed-set in the "ini" file for a Veins-OMNET++ simulation, will only affect the communication-related values by comparing different runs at a specific time. i.e. at a particular time for different runs, the vehicles' mobilities values (x,y, speed, direction) are relatively the same. Could you please confirm that?
However, when I set the <seed value="seedValue" /> in the "mapname.launchd.xml" file, the mobilities of the vehicles change between runs. My second question is, Is changing the seed for SUMO affect the traffic flow (veh/h) set in the route file (.rou.xml)?

seed-set controls OMNeT++/Veins parameters defined as random variables in your omnetpp.ini file, something like **.packetSize = uniform(100B, 500B). SUMO's seed does the same job on the SUMO side. I assume you use VeinsInetMobility in your scenario -- in that case your speed and positions distribution is controlled by SUMO's seed since all computations are happening there, if you use any of inet's internal mobilities and set it in omnetpp.inifile -- then it is controlled by seed-set.

Related

How to run a Lua script at a certain hour mark?

I've altered one of the popular clock skins for Rainmeter to be exactly how I want it. However, the only issue is that the '1' in the clock for hours 10, 11, and 12 gets cut off by the edge of the skin with the current margins.
I know exactly which value needs to be altered at the given times, so all I need to figure out now is how to run a Lua script to change it when the clock hits them. Problem is, after much searching I don't have the slightest clue how. It definitely seems like something that should be easily possible.
You need to run your lua script as a cron job.
In order to achieve this I'd suggest you use this cron.lua module which has the functionality you want. One example of what you can do is the following:
local clock = cron.every(time, callback, ...).
--Creates a clock that will execute callback every time, periodically. Additional parameters are passed to the callback too.
The callback variable is the code you want to be executed at every interval.

How to choose different seeds for the BER in OMNeT++

I'm running a small simulation in OMNeT++, making use of the Inet. I am simulating a file upload from a single client to a server over a TCP connection. I want to use different seeds for the BER. The BER is somewhere around 1e-7.
My idea was to first let the BER be randomly distributed:
[General]
network = MyNetwork
MyNetwork.BER = truncnormal(1e-7,1e-8)
Now, I know there's a way to repeat the simulation, by either including repeat = 10 or ${repetition=0...9} somewhere in the .ini file. But what would be the exact syntax? I cannot just write this. And how do I select different seeds for the BER? There is some seed-set =command available for the .ini as well, but again I don't know how to use it. Can you please help out?

Multiple runs in omnet++ but with new network

I am trying to get different results for the code I have written in veins. I would like to run simulation multiple times to get average of all result. Issue I am facing is when I use repeat=5 i get exact same result in all 5 runs. I want to regenerate the network each time it repeats. I have written code to place RSUs in random positions but i get same result. What I can try?
Frist of all, see the TicToc Tutorial.
For your issue, you need to set a seed for each run as the OMNet Manual show
For me, the best way is set seed-set as the repetition number(repeat)
seed-set = ${repetition}
To start all repetitions of a simulation go to Run Configurations and set Cmdenv as User interface and:
for OMNeT++ 5.0 or older: set * (asterisk) in Runnumber
for OMNeT++ 5.1: set 0..4 in Run(s)
As a result you will obtain five set of results.
Optionally you can choose more than one processes to run in parallel or CPUs/processes to use in Run Configurations.

Saving the simulation time of an event within a Control and Simulation Loop

I've got a Control & Simulation Loop structure in LabVIEW that is sending inputs to and receiving outputs from a Multisim model. I'd like to measure the simulation time difference between when two boolean outputs from the Multisim model go to true. I'm able to add a Control & Simulation -> Simulation -> Utilities -> Simulation Time widget and wire that up to an indicator on my front panel, and see the simulation time progressing as I run it, but I can't find a way to latch that double-precision numerical value into a storage location for later comparison without using a loop structure that isn't allowed within a Control & Simulation Loop structure. Am I missing something straightforward?
The function you're looking to use is called "Memory" and is located in the Simulation Utilities Functions palette. Memory does the following,
"Stores the value of the Input signal from the previous iteration of the simulation. Use this polymorphic function to transfer values from one iteration of the Control & Simulation Loop to the next. The data type you wire to the Initial Value input determines the polymorphic instance to use."
- https://zone.ni.com/reference/en-XX/help/371894H-01/lvsim/sim_memory/

Does shell affects the randomization produced by a seed

I am an avid csh/tcsh user.
But the current environment I have to work on has all ksh scripts. The team works on k-shell.
So, if I select a seed and run a test in k-shell and c-shell, would the outcome be the same?
Seed is just one example, I want to know whether using alternate shell would create any divergence of end result?
The whole point of a seeding mechanism for random number generators is to be able to reproduce results regardless of other factors. This means that as long as you're running the same compiled code for the simulator (same version, basically) you're going to get the same results when passing in a seed, regardless of what machine you're running on, what shell you use, etc.
Also, the shell you use has no end effect on the executable being started, other than setting environment variables that the program might use. You're going to have to make sure that you don't diverge in this point.

Resources