minor fixes

This commit is contained in:
lbaumberger
2026-04-26 20:01:14 +02:00
parent 2ca70ae7fa
commit b2b5f9f863
4 changed files with 13 additions and 6 deletions
+8 -2
View File
@@ -72,7 +72,7 @@ void compute_repulsive_effects_from_pedestrians(Pedestrian *pedestrians, Pedestr
}
// # Assume that the four borders are also 4 obstacles
// # 36 n_obstacles flops = 144 flops
// # 48 n_obstacles flops = 192 flops
void compute_repulsive_effects_from_borders(Board &board, Pedestrian *p) {
Obstacle *obstacles = board.obstacles;
@@ -89,6 +89,12 @@ void compute_repulsive_effects_from_borders(Board &board, Pedestrian *p) {
Vector2d f_obst = (r_aB / r_aB.norm()) * (U0_AB / R) * std::exp(-r_aB.norm() / R);
// # 2 ADDs
p->f_i += f_obst;
// p->f_i += f_obst; //commented since this version dont takes the field of view / angle to the border into account
// I have read the paper again and on page 6 they say
// However, the formulas above for attractive and repulsive effects only hold for situations that are perceived in the desired direction e_alpha(t) of motion.
// I assumed that with formulas above its also meant for equation 8 (even though not explicitly mentioned their)
// # 14 flops: 9 MULTs, 4 ADDS, 1 SQRT
p->f_i += f_obst * w(p->e, f_obst * -1);
}
}