minor fix, desired velocity to current velocity
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ void compute_repulsive_effects_from_pedestrians(Pedestrian *pedestrians, Pedestr
|
|||||||
Vector2d e_b = pedestrians[i].e;
|
Vector2d e_b = pedestrians[i].e;
|
||||||
|
|
||||||
// # 2 MULTs
|
// # 2 MULTs
|
||||||
double s_b = pedestrians[i].desired_v0 * delta_t;
|
double s_b = pedestrians[i].curr_vel.norm() * delta_t;
|
||||||
|
|
||||||
// # 4 flops = 2 ADDs, 2 MULTs
|
// # 4 flops = 2 ADDs, 2 MULTs
|
||||||
Vector2d r_ab2 = r_ab - (e_b * s_b);
|
Vector2d r_ab2 = r_ab - (e_b * s_b);
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ const double cos_phi = cos(phi);
|
|||||||
|
|
||||||
const double delta_t = 2;
|
const double delta_t = 2;
|
||||||
|
|
||||||
const double dt = 0.01;
|
const double dt = 0.001;
|
||||||
|
|
||||||
// # Optional (forces.cpp: compute_repulsive_effects_from_pedestrians)
|
// # Optional (forces.cpp: compute_repulsive_effects_from_pedestrians)
|
||||||
// const double DISTANCE = 2.0;
|
// const double DISTANCE = 2.0;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ int main(int argc, const char *argv[]) {
|
|||||||
int n_iter = atoi(argv[2]);
|
int n_iter = atoi(argv[2]);
|
||||||
|
|
||||||
// Logic to get/dump the simulation data
|
// Logic to get/dump the simulation data
|
||||||
const int dump_interval = 5; // dump every 5 iterations -> 20 fps (since dt = 0.01)
|
const int dump_interval = 50; // dump every 5 iterations -> 20 fps (since dt = 0.01)
|
||||||
const char *dump_path = (argc >= 4) ? argv[3] : nullptr;
|
const char *dump_path = (argc >= 4) ? argv[3] : nullptr;
|
||||||
|
|
||||||
std::vector<std::tuple<int, int, double, double, int>> samples; // t, id, x, y, color
|
std::vector<std::tuple<int, int, double, double, int>> samples; // t, id, x, y, color
|
||||||
|
|||||||
Reference in New Issue
Block a user