I'm trying to use mt19937 to generate (good) random numbers on Veins to my node/vehicle class. When I use one mt19937 for each car, he woks, but when I set to be static (one mt19937 to all car) he doesn't work
static mt19937 mt;
Occurs one error when mt is used:
uniform_int_distribution <int> unif_dist(1, 100);
...
return unif_dist(mt);
Error:
Error in module (cModule) vehDist_rsu (id=48) during network setup: Class "Veins::ObstacleControl" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel().
Error during network cleanup: Model error: ASSERT: condition vect[i]==NULL false in function deleteNetwork, csimulation.cc line 437.
seed-set = ${repetition}), but I need of more random numbers (another sources), so I create one mt19937 to be used on the first car (car[0]) and one srand to be used for all cars. It is not the best option, but it woks. I use the mt19937 to select which car will generate the message(s) (data) and the srand to select for the which car (based on some variables) will send each message. - João Batista