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

Commit fd7953ae authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

Merge branch 'issue#242' into 'master'

fix issue #242.

Closes #242

See merge request !66
parents a303cac0 ea3b983c
Pipeline #122557 passed with stages
in 114 minutes and 28 seconds
......@@ -141,7 +141,7 @@ public class UpdateSchemeEventDrivenParallel extends UpdateSchemeEventDriven {
parallelUpdatablePeds.stream().forEach(ped -> {
//logger.info(ped.getTimeOfNextStep());
//System.out.println(ped.getId());
update(ped, currentTimeInSec);
update(ped, timeStepInSec, currentTimeInSec);
});
......
......@@ -28,7 +28,12 @@ public class TimeCostFunctionObstacleDistance implements ITimeCostFunction {
public double costAt(IPoint p) {
double timeCost = timeCostFunction.costAt(p);
double distance = obstacleDistanceFunction.apply(p);
if(distance > 0 && distance < width) {
if(distance <= 0) {
timeCost += height;
}
else if(distance > 0 && distance < width) {
//timeCost += height * Math.exp(2 / (Math.pow(distance / (width), 2) - 1));
timeCost += (1-(distance/ width)) * height;
}
return timeCost;
......
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