missing repulsive_effects_from_borders, and last three updates. Restructured the whole project. TODO: check constants/parameters and implement missing functions.

This commit is contained in:
smail alijagic
2026-03-22 00:05:32 +01:00
parent 0f05b93b57
commit e905bc4a86
6 changed files with 267 additions and 164 deletions
+55
View File
@@ -0,0 +1,55 @@
#pragma once
#include <pedestrian.h>
#include <sidewalk.h>
// Params
// TODO: change this
// $\tau$
const double TAU = 1.0; // time to reach desired speed in s
// TODO: change this
// $V^0_{\alpha \beta}$
const double V0_AB = 2.1;
// TODO: change this
// $\sigma$
const double SIGMA = 0.3;
// TODO: change this
// $U^0_{\alpha B}$
const double U0_AB = 10.0;
// TODO: change this
// $R$
const double R = 0.2;
// TODO: change this
// $C$
const double C = 0.2;
// TODO: change this
// $\phi$
const double PHI_DEG = 120.0;
// TODO: change this
const double DISTANCE = 2.0;
// Helper functions
Vector2d get_desired_direction(Pedestrian& p);
Vector2d get_actual_direction(Pedestrian& p);
double w(Vector2d e, Vector2d f);
// Force functions
void compute_acceleration_term(Pedestrian* p);
void compute_repulsive_effects_from_pedestrians(Pedestrian* P, Pedestrian *p, int N);
void compute_repulsive_effects_from_borders(Sidewalk& S, Pedestrian* p);