0

My application file alters the TX power using two different algorithms, will call them algorithm1 and algorithm2.

I do four separate runs as follows:

1) Simulate for 400 seconds, alter TXPOWER using algorithm 1. At the end I would have simulated n vehicles.

2) Simulate for 400 seconds, alter TXPOWER using algorithm 2. At the end I would have simulated m vehicles.

3) Simulate for 50 seconds, alter TXPOWER using algorithm 1. At the end I would have simulated x vehicles.

4) Simulate for 50 seconds, alter TXPOWER using algorithm 2. At the end I would have simulated y vehicles.

I noticed that for run 1 and run 2 I would have n <> m and for run 3 and run 4 I would have x = y

where n,m,x,y are the numbers of vehicles simulated for run 1,2,3,4 respectively.

The question is, I do not understand why that the first two runs i have n <> m and for the latter two runs I have x = y

Thank you.

LionsFan
  • 119
  • 1
  • 10
  • Can you be a little bit more verbose in what you do, what happens, and what you expected? Imagine that all I have is a fresh checkout of the Veins source code. What would I need to do to see the problem you are experiencing with your code? – Christoph Sommer Dec 20 '17 at 09:41
  • I have revised my question and tried to make it more clear. – LionsFan Dec 20 '17 at 19:54
  • Clearly, you would expect m = n <> x = y because of the lower simulation time. Did you make sure that the same algorithm (let's say algorithm 1) produces the same results every time you run it (with the same run number) or are they different? I am asking to find out whether there is some randomness involved in your simulation. If everything is done right, even with randomness the same algorithm with the same simulation time should give the same results each time you run it (assuming the same replication/run number which is used as a seed for the random number generator). – Julian Heinovski Dec 21 '17 at 11:47
  • @JulianHeinovski You are right, I would expect m=n <> x = y but I am getting m <> n <> x = y I ran two separate simulation after your question under 50 seconds using algorithm 1 and I also got x = y. Further, the numbers generated or results are the same for each node. The only difference between Algorithm1 and Algorithm2 is the way they handle TXPOWER. – LionsFan Dec 21 '17 at 17:44
  • Okay, so apparently it behaves as expected for 50s. Can you try the same for 400s? – Julian Heinovski Dec 21 '17 at 19:55
  • @JulianHeinovski This will take a while. I will get back to you once I have them. Hypothetically they are equal, which is my assumption at this point. Where would that take us? – LionsFan Dec 21 '17 at 19:57
  • Well, a different result will tell us that something goes wrong between 50s and 400s with the same input parameters and the same algorithm which means something in your code might be wrong. – Julian Heinovski Dec 21 '17 at 20:29

0 Answers0