reduced flop count
This commit is contained in:
+30
-6
@@ -12,35 +12,59 @@ const double V0_AB = 2.1;
|
||||
// $\sigma$
|
||||
const double SIGMA = 0.3;
|
||||
|
||||
//
|
||||
// $\frac{V^0_{\alpha\beta}}{\sigma}$
|
||||
//
|
||||
const double V0_AB_div_SIGMA = V0_AB / SIGMA;
|
||||
|
||||
// $U^0_{\alpha B}$
|
||||
const double U0_AB = 10.0;
|
||||
|
||||
// $R$
|
||||
const double R = 0.2;
|
||||
|
||||
//
|
||||
// $\frac{U^0_{\alpha B}}{R}$
|
||||
//
|
||||
const double U0_AB_div_R = U0_AB / R;
|
||||
|
||||
// $c$
|
||||
const double c = 0.5;
|
||||
|
||||
// $\varphi$
|
||||
const double phi = 45.0 / 180.0 * M_PI;
|
||||
|
||||
// $cos(\varphi)$
|
||||
const double cos_phi = cos(phi);
|
||||
|
||||
// $<v^0>$
|
||||
const double v0_mean = 1.34;
|
||||
|
||||
// $\sqrt{\theta}$
|
||||
const double v0_std_dev = 0.26;
|
||||
|
||||
// $\varDelta_{t}$
|
||||
// step size = 0.2 seconds
|
||||
const double delta_t = 2;
|
||||
|
||||
// $dt$
|
||||
const double dt = 0.2;
|
||||
|
||||
// # Optional (forces.cpp: compute_repulsive_effects_from_pedestrians)
|
||||
// const double DISTANCE = 2.0;
|
||||
const double cost_add = 1;
|
||||
const double cost_mult = 1;
|
||||
const double cost_div = 1;
|
||||
|
||||
// https://acl.inf.ethz.ch/teaching/fastcode/knowledgebase/#:~:text=How%20do%20exp(x)%2C%20sin(x)%2C%20etc.%20count%20in%20the%20flopcount%20of%20an%20algorithm%3F
|
||||
const double cost_exp = 30;
|
||||
|
||||
// -O3 maps each sqrt() call to an instruction
|
||||
const double cost_sqrt = 1;
|
||||
|
||||
double w(Vector2d e, Vector2d f);
|
||||
|
||||
double g(double v_max_alpha, double w_alpha_norm);
|
||||
|
||||
void compute_acceleration_term(Pedestrian *p);
|
||||
void add_acceleration_term(Pedestrian *p);
|
||||
|
||||
void compute_repulsive_effects_from_pedestrians(Pedestrian *P, Pedestrian *p, int N);
|
||||
void add_repulsive_effects_from_pedestrians(Pedestrian *P, Pedestrian *p, int N);
|
||||
|
||||
void compute_repulsive_effects_from_borders(Board &B, Pedestrian *p);
|
||||
void add_repulsive_effects_from_borders(Board &B, Pedestrian *p);
|
||||
|
||||
Reference in New Issue
Block a user