minor fixes
This commit is contained in:
+8
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user