Commit 6eeaa8c1 authored by BZoennchen's avatar BZoennchen

potential test.

parent cafd2cf8
......@@ -82,9 +82,9 @@ public class PotentialFieldPedestrianCompactSoftshell implements PotentialFieldA
}
/*
@Override
public double getAgentPotential(VPoint pos, Agent pedestrian,
/*@Override
public double getAgentPotential(IPoint pos, Agent pedestrian,
Agent otherPedestrian) {
double radii = pedestrian.getRadius() + otherPedestrian.getRadius(); // 2* r_p (sivers-2016b)
double potential = 0;
......@@ -98,18 +98,18 @@ public class PotentialFieldPedestrianCompactSoftshell implements PotentialFieldA
int perPower = this.attributes.getPersonalSpacePower(); // not defined in sivers-2016b (perPower = 1)
double factor = this.attributes.getIntimateSpaceFactor(); // a_p
if (distance < personalWidth + otherPedestrian.getRadius()) {
if (distance < personalWidth + pedestrian.getRadius()) {
// implementation differs from sivers-2016b here: \delta_{per} + r_p (note: radii = 2*r_p)
potential += this.height * Math.exp(4 / (Math.pow(distance / (personalWidth + radii), (2 * perPower)) - 1));
potential += this.height * Math.exp(4 / (Math.pow(distance / (personalWidth + pedestrian.getRadius()), (2 * perPower)) - 1));
}
if (distance < this.intimateWidth + otherPedestrian.getRadius()) {
if (distance < this.intimateWidth + pedestrian.getRadius()) {
// implementation differs from sivers-2016b here: \delta_{int} + r_p (note: radii = 2*r_p)
potential += this.height / factor
* Math.exp(4 / (Math.pow(distance / (this.intimateWidth + pedestrian.getRadius()), (2 * intPower)) - 1));
}
if (distance < radii) {
// implementations differs from sivers-2016b here : Math.power(distance / (radii),2)
potential += 1000 * Math.exp(1 / (Math.pow(distance / pedestrian.getRadius(), 2) - 1));
potential += 1000 * Math.exp(1 / (Math.pow(distance / radii, 2) - 1));
}
}
return potential;
......
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