Commit 565a7fb3 authored by Arne Graf's avatar Arne Graf

no close to target mechanic; startpoint for one-way-stairs

parent 60b744d8
Pipeline #9267 failed with stages
in 5 minutes and 40 seconds
......@@ -283,7 +283,7 @@ public:
void set_write_VTK_files_direction(bool write_VTK_files_direction) {_write_VTK_files_direction = write_VTK_files_direction;}
bool get_write_VTK_files_direction() const {return _write_VTK_files_direction;}
void SetHostname(std::string hostname) { _hostname = hostname; };
const std::string& GetTrajectoriesFile() const { return _trajectoriesFile; };
......
......@@ -308,12 +308,17 @@ Point VelocityModel::e0(Pedestrian* ped, Room* room) const
if ( (dynamic_cast<DirectionFloorfield*>(_direction.get())) ||
(dynamic_cast<DirectionLocalFloorfield*>(_direction.get())) ||
(dynamic_cast<DirectionSubLocalFloorfield*>(_direction.get())) ) {
if (dist > 50*J_EPS_GOAL) {
desired_direction = target - pos; //ped->GetV0(target);
} else {
desired_direction = lastE0;
ped->SetLastE0(lastE0); //keep old vector (revert set operation done 9 lines above)
desired_direction = target-pos;
if (desired_direction.NormSquare() < 0.25) {
desired_direction = lastE0;
ped->SetLastE0(lastE0);
}
// if (dist > 1*J_EPS_GOAL) {
// desired_direction = target - pos; //ped->GetV0(target);
// } else {
// desired_direction = lastE0;
// ped->SetLastE0(lastE0); //keep old vector (revert set operation done 9 lines above)
// }
} else if (dist > J_EPS_GOAL) {
desired_direction = ped->GetV0(target);
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment