@@ -355,21 +355,25 @@ sub calculate_status_timer {
355
355
my ($hosts , $host ) = @_ ;
356
356
my $i = $hosts -> {$host }{workerid } ? $hosts -> {$host }{workerid } : looks_like_number($instance ) ? $instance : 1;
357
357
my $imax = $hosts -> {$host }{population } ? $hosts -> {$host }{population } : 1;
358
- my $scale_factor = 300;
358
+ my $scale_factor = $imax ;
359
+ my $steps = 215;
360
+ my $r = 3.81199961;
361
+
362
+ # my $scale_factor = 4;
363
+ # my $scale_factor = (MAX_TIMER - MIN_TIMER)/MIN_TIMER;
364
+ # log_debug("I: $i population: $imax scale_factor: $scale_factor");
359
365
360
366
# XXX: we are using now fixed values, to stick with a
361
367
# predictable behavior but random intervals
362
368
# seems to work as well.
363
369
# my $steps = int(rand_range(2, 120));
364
370
# my $r = rand_range(3.20, 3.88);
365
371
366
- my $steps = 215;
367
- my $r = 3.81199961;
368
- my $population = feature_scaling($i , $imax , 0.1, 1);
372
+ my $population = feature_scaling($i , $imax , 0, 1);
369
373
my $status_timer
370
- = abs(feature_scaling(logistic_map_steps($steps , $r , $population ), $imax , MIN_TIMER, MAX_TIMER) * $scale_factor );
371
-
372
- $status_timer = $status_timer > MIN_TIMER && $status_timer < MAX_TIMER ? $status_timer : MIN_TIMER;
374
+ = abs(feature_scaling(logistic_map_steps($steps , $r , $population ) * $scale_factor , $imax , MIN_TIMER, MAX_TIMER));
375
+ $status_timer = $status_timer > MIN_TIMER
376
+ && $status_timer < MAX_TIMER ? $status_timer : $status_timer > MAX_TIMER ? MAX_TIMER : MIN_TIMER;
373
377
return int ($status_timer );
374
378
}
375
379
0 commit comments