fix: 🚑 scout bee exploration sticks to unnecessary limit
This commit is contained in:
parent
6cbba58e63
commit
030a8f7596
1 changed files with 2 additions and 7 deletions
|
@ -70,13 +70,8 @@ impl Bee {
|
|||
if food_sources[most_tried_index].try_counter > limit {
|
||||
let mut coordinates_for_new = vec![];
|
||||
for _ in 0..decision_variable_count {
|
||||
let random = if upper_bound * lower_bound > 0.0 {
|
||||
lower_bound
|
||||
+ rand::thread_rng().gen_range(0.0..=1.0) * (upper_bound - lower_bound)
|
||||
} else {
|
||||
lower_bound
|
||||
+ rand::thread_rng().gen_range(0.0..=1.0) * (upper_bound + lower_bound)
|
||||
};
|
||||
let random = lower_bound
|
||||
+ rand::thread_rng().gen_range(0.0..=1.0) * (upper_bound - lower_bound);
|
||||
if random > upper_bound {
|
||||
coordinates_for_new.push(upper_bound);
|
||||
} else if random < lower_bound {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue