- if(rate_no_limit>float_random(1.0))
- //Look at what happens when there is no concurrency limit
- l=-1;
- else
- //Badly logarithmically random concurrency limit in [2^pw_base_limit+1,2^pw_base_limit+2^pw_max_limit]
- l=(1<<pw_base_limit)+(1<<int_random(pw_max_limit));
-
- lmm_constraint_concurrency_limit_set(cnst[i],l );
+ if (rate_no_limit > simgrid::xbt::random::uniform_real(0.0, 1.0)) {
+ // Look at what happens when there is no concurrency limit
+ l = -1;
+ } else {
+ // Badly logarithmically random concurrency limit in [2^pw_base_limit+1,2^pw_base_limit+2^pw_max_limit]
+ l = (1 << pw_base_limit) + (1 << simgrid::xbt::random::uniform_int(0, pw_max_limit - 1));
+ }
+ cnst[i]->set_concurrency_limit(l);