Search code examples
simulationomnet++

OMNET++ - Control when vector file is updated


I would like to explain my Omnet++ behavior on writing .vec files during simulation first.

My Omnet++ version: 5.6.2

Operation system: Windows 10

When I start running the simulation for my network in express mode for a moment, I noticed that the .vec and .vci files are created but only has the header. Then the .vec file size and content does not have any change when the simulation keep running. Only when I double click the .vec file in Omnet++ file explorer and open the Omnet Analysis, then the vector data is written into the .vec file. And from that moment on, I am only able to see the .vec file content and size updated when I close, delete the created .anf file and double click to open the .vec file again.

So my questions are:

  1. I am not sure if this is the default behaviour of omnet++ when updating .vec files during simulation time, or there is something different with my configuration?
  2. If this is the expected behaviour, is there any way to change that (i.e., what I want is the .vec file content is automatically keeping up to date without me having to close, delete and re-open the anf file again and again)?

Thank you very much.


Solution

  • Based on Rudi's answer about the memory buffer that control the amount of maximum data to be hold before writing to .vec files, I did a follow up search in Omnet++'s manual and found the exact configuration parameter to control the size of that memory buffer from Apdendix H. It is the below per-simulation-run setting in the .ini file:

    output-vectors-memory-limit = , unit=B, default: 16MiB
    Per-simulation-run setting.
    Total memory that can be used for buffering output vectors. Larger values produce less fragmented vector files (i.e. cause vector data to be grouped into larger chunks), and therefore allow more efficient processing later. There is also a per-vector limit, see **.vector-buffer.

    I also did a test and changed the value to 8MiB, the result was what I expected: Omnet++ did update the output .vec file more often.