11.08., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

Commit 8b05aaa8 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier

In "PedestrianOSM.java", added getters and setters for "combinedPotentialStrategy".

parent e9f110be
......@@ -41,7 +41,7 @@ public class PedestrianOSM extends Pedestrian {
private transient IPotentialFieldTarget potentialFieldTarget;
private transient PotentialFieldObstacle potentialFieldObstacle;
private transient PotentialFieldAgent potentialFieldPedestrian;
// TODO: Provide method to change object here according to stragey pattern.
// A setter is provided to be able to change strategy at runtime (e.g. by events).
private transient CombinedPotentialStrategy combinedPotentialStrategy;
private transient List<SpeedAdjuster> speedAdjusters;
private transient List<StepSizeAdjuster> stepSizeAdjusters;
......@@ -240,7 +240,9 @@ public class PedestrianOSM extends Pedestrian {
strides.clear();
}
// Getters...
// TODO: Group getters and setters correctly.
// Getters
public double getTargetPotential(VPoint pos) {
return potentialFieldTarget.getPotential(pos, this);
......@@ -263,6 +265,10 @@ public class PedestrianOSM extends Pedestrian {
new Vector2D(0, 0), this, relevantPedestrians);
}
public CombinedPotentialStrategy getCombinedPotentialStrategy() {
return combinedPotentialStrategy;
}
public double getTimeOfNextStep() {
return timeOfNextStep;
}
......@@ -307,6 +313,10 @@ public class PedestrianOSM extends Pedestrian {
this.relevantPedestrians = relevantPedestrians;
}
public void setCombinedPotentialStrategy(CombinedPotentialStrategy combinedPotentialStrategy) {
this.combinedPotentialStrategy = combinedPotentialStrategy;
}
public Collection<? extends Agent> getRelevantPedestrians() {
return relevantPedestrians;
}
......
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