Closed gforney closed 9 years ago
Timo,
Please have a look. Thanks.
Original issue reported on code.google.com by randy.mcdermott
on 2014-02-28 13:17:56
Well, the guard_men is on obsolote feature that was never finnished.
So, the commands inside the if-statement true branch are not used.
But the source should be correct. The EVEL is just a temporary variable
that is used in many different places. The lines:
UBAR = WSPA
VBAR = WSPB
EVEL = SQRT(UBAR**2 + VBAR**2)
UBAR = UBAR/EVEL ; VBAR = VBAR/EVEL
make sure that the UBAR,VBAR is an unit vector (the direction of
the prefered walking velocity).
After the if-statement:
EVEL = UBAR**2 + VBAR**2
is used in the if-test: EVEL >= TWO_EPSILON_EB
Here it is just tested that the velocity v0_i, whose components
are ubar and vbar, is not a zero vector (i.e., the agent does
not have any preferred walking velocity). Well, I could have
taken the square root, but square root takes much cpu seconds
to compute, so I test the square. Well, modern compilers could
have optimized this automatically, perhaps.
UBAR and VBAR are the components of an unit vector (or both zeros)
that give the preferred walking direction in a (x,y) plane.
Wbr,
Timo
Original issue reported on code.google.com by tkorhon1
on 2014-03-03 14:40:57
thank you Timo
In the code
F_X,F_Y denote the social+contact forces in the x,y direction separately
U_NEW = HR%U + 0.5_EB*HR%F_X*DTSP/HR%MASS
V_NEW = HR%V + 0.5_EB*HR%F_Y*DTSP/HR%MASS
this is the velocity that calculated by the forces
X1 = HR%X + U_NEW*DTSP
Y1 = HR%Y + V_NEW*DTSP
this is the new coordinates are calculated using the new velocities
I think X1-HR%X is a vector,if F_X,F_Y are vector quantities too
Original issue reported on code.google.com by dlmuSword
on 2014-03-05 08:15:12
I'll close this one. TimoK
Original issue reported on code.google.com by
dlmuSword
on 2014-02-28 03:25:46