'Storing data in a single varaible using coutvector in omnet++
I am recording the data in omnet++ using the coutVector method the problem I am facing is instead of every time it stores the value in the variable it basically creates a new variable of the same name and stores the data value into it at that instance. my question how to store all the data values in a single variable? At the end of the simulation, I have data in the .vec file but it is 100 variables of the same name and each contains each instance of data in time, I want to make one variable contain all the data. in header file I define,
protected:
cOutVector variable;
in .cc file
variable.setName("Reward");
variable.record(new_var);
That is of my code look like, One thing to clear is that This .cc file will run in each instance of simulation time. Here is the screeshot
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
