From 1b79bd15f41b71e24c224d4e431c8aeaea50eaf8 Mon Sep 17 00:00:00 2001 From: lbaumberger Date: Mon, 27 Apr 2026 14:23:13 +0200 Subject: [PATCH] set parameters to dt 0.01 --- forces.hpp | 2 +- main.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/forces.hpp b/forces.hpp index 74498ae..3d2bd4a 100644 --- a/forces.hpp +++ b/forces.hpp @@ -21,7 +21,7 @@ const double cos_phi = cos(phi); const double delta_t = 2; -const double dt = 0.001; +const double dt = 0.01; // # Optional (forces.cpp: compute_repulsive_effects_from_pedestrians) // const double DISTANCE = 2.0; diff --git a/main.cpp b/main.cpp index 9d6ef6a..afd1f76 100644 --- a/main.cpp +++ b/main.cpp @@ -67,7 +67,7 @@ int main(int argc, const char *argv[]) { int n_iter = atoi(argv[2]); // Logic to get/dump the simulation data - const int dump_interval = 50; // dump every 5 iterations -> 20 fps (since dt = 0.01) + const int dump_interval = 5; // dump every 5 iterations -> 20 fps (since dt = 0.01) const char *dump_path = (argc >= 4) ? argv[3] : nullptr; std::vector> samples; // t, id, x, y, color @@ -117,11 +117,11 @@ int main(int argc, const char *argv[]) { if (p.color == WHITE && p.curr_pos.x > (BOARD_LENGTH - 1.5)) { // basically just keep the y position and reset the x p.curr_pos.x = 1.0; - // p.destination.y = p.curr_pos.y; + p.destination.y = p.curr_pos.y; } if (p.color == BLACK && p.curr_pos.x < 1.5) { p.curr_pos.x = BOARD_LENGTH - 1.0; - // p.destination.y = p.curr_pos.y; + p.destination.y = p.curr_pos.y; } // # 10 flops = 5 ADDs, 2 DIVs, 1 SQRT, 2 MULTs