0

Parameter change does not effect on simulation results

I am working on a simulator which generates wsn topologies, the old version of the simulator generates only 1 bridge networks and new version has parameter to set number of bridges 1 or 2. The problem when I was running the new version, I was getting the results only with 2 bridge parameter no matter what I set to the parameter. And I replaced files with old version, and run the code and after getting 1 bridge results put the new version classes back. Now when I run the code I keep getting 1 bridge results even if I set the parameter as 2 bridges. The simulator works with seed and duration, and seed is "1", I heard that there are possibilities to have late results for parameter changes thanks to seed . But I wrap the main method in a loop and run the simulation 1000 times, result did not change. What can cause this problem? and is there any sollution recommended?

3rd Nov 2016, 12:32 PM
dudu ok
dudu ok - avatar
1 Odpowiedź
0
Well, until we see your code, there's not a lot of specific help anyone can give you. You don't have to dump all the source code here, but try sharing the parts you think are problematic. Regardless, I'll take a shot in the dark and give some things you might want to check: - Do you use the same method for both 1- and 2-bridge networks? If so, I suggest splitting it up. In your topology generator class, create two separate methods - one for generating 1-bridge networks, and one for 2-bridge. - Alternatively, you could create separate classes for either network type - in particular, you could create two network classes that inherit from a super class. Then adjust any values if necessary. You could go with either, but I much prefer the second one. If you already tried these, then by all means, share some of your code. Also, a consistent seed produces consistent results unless you add in other factors. I'm not sure what factors these are, but since you want the results to change, the seed needs to change too. If that's what you're looking for, just mix it up a little with Java's random number generator.
3rd Nov 2016, 8:41 PM
DaemonThread
DaemonThread - avatar