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 { ...@@ -141,7 +141,7 @@ public class UpdateSchemeEventDrivenParallel extends UpdateSchemeEventDriven {
parallelUpdatablePeds.stream().forEach(ped -> { parallelUpdatablePeds.stream().forEach(ped -> {
//logger.info(ped.getTimeOfNextStep()); //logger.info(ped.getTimeOfNextStep());
//System.out.println(ped.getId()); //System.out.println(ped.getId());
update(ped, currentTimeInSec); update(ped, timeStepInSec, currentTimeInSec);
}); });
......
...@@ -28,7 +28,12 @@ public class TimeCostFunctionObstacleDistance implements ITimeCostFunction { ...@@ -28,7 +28,12 @@ public class TimeCostFunctionObstacleDistance implements ITimeCostFunction {
public double costAt(IPoint p) { public double costAt(IPoint p) {
double timeCost = timeCostFunction.costAt(p); double timeCost = timeCostFunction.costAt(p);
double distance = obstacleDistanceFunction.apply(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; timeCost += (1-(distance/ width)) * height;
} }
return timeCost; 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