Starting from 2021-07-01, all LRZ GitLab users will be required to explicitly accept the GitLab Terms of Service. Please see the detailed information at https://doku.lrz.de/display/PUBLIC/GitLab and make sure that your projects conform to the requirements.

Commit 6a8873dd authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

add some usful comments and remove unnecessary logging.

parent 1064f70c
...@@ -143,13 +143,11 @@ public class OnlineVisualization implements PassiveCallback { ...@@ -143,13 +143,11 @@ public class OnlineVisualization implements PassiveCallback {
selectedAgent = (Agent)model.getSelectedElement(); selectedAgent = (Agent)model.getSelectedElement();
} }
/*if(model.config.isShowPotentialField() && selectedAgent != null && potentialField != null) { if(model.config.isShowPotentialField() && selectedAgent != null && potentialField != null) {
pedPotentialField = IPotentialField.copyAgentField(potentialField, selectedAgent, new VRectangle(model.getTopographyBound()), 0.1); pedPotentialField = IPotentialField.copyAgentField(potentialField, selectedAgent, new VRectangle(model.getTopographyBound()), 0.1);
}*/ }
//ObservationAreaSnapshotData data = new ObservationAreaSnapshotData(simTimeInSec, domain.clone(), pft, pedPotentialField, selectedAgent, discretizations);
ObservationAreaSnapshotData data = new ObservationAreaSnapshotData(simTimeInSec, domain, pft, pedPotentialField, selectedAgent, discretizations);
ObservationAreaSnapshotData data = new ObservationAreaSnapshotData(simTimeInSec, domain.clone(), pft, pedPotentialField, selectedAgent, discretizations);
model.pushObservationAreaSnapshot(data); model.pushObservationAreaSnapshot(data);
} }
} }
......
package org.vadere.gui.onlinevisualization.view; package org.vadere.gui.onlinevisualization.view;
import java.awt.*; import java.awt.*;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Map; import java.util.Map;
import java.util.Random;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
...@@ -16,7 +14,6 @@ import org.vadere.gui.renderer.agent.AgentRender; ...@@ -16,7 +14,6 @@ import org.vadere.gui.renderer.agent.AgentRender;
import org.vadere.state.scenario.Agent; import org.vadere.state.scenario.Agent;
import org.vadere.state.scenario.Pedestrian; import org.vadere.state.scenario.Pedestrian;
import org.vadere.util.geometry.shapes.VPoint; import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.visualization.ColorHelper;
public class OnlinevisualizationRenderer extends SimulationRenderer { public class OnlinevisualizationRenderer extends SimulationRenderer {
...@@ -25,7 +22,6 @@ public class OnlinevisualizationRenderer extends SimulationRenderer { ...@@ -25,7 +22,6 @@ public class OnlinevisualizationRenderer extends SimulationRenderer {
private final Map<Integer, VPoint> lastPedestrianPositions; private final Map<Integer, VPoint> lastPedestrianPositions;
private final Map<Integer, VPoint> pedestrianDirections; private final Map<Integer, VPoint> pedestrianDirections;
private final Map<Integer, LinkedList<VPoint>> pedestrianPositions; private final Map<Integer, LinkedList<VPoint>> pedestrianPositions;
private final ArrayList<Color> randomColors = new ArrayList<>();
public OnlinevisualizationRenderer(final OnlineVisualizationModel model) { public OnlinevisualizationRenderer(final OnlineVisualizationModel model) {
super(model); super(model);
...@@ -58,35 +54,10 @@ public class OnlinevisualizationRenderer extends SimulationRenderer { ...@@ -58,35 +54,10 @@ public class OnlinevisualizationRenderer extends SimulationRenderer {
} }
} }
private Color getNextRandomColor() {
Random random = new Random(1);
Color color = new Color(random.nextInt(150), random.nextInt(150), random.nextInt(150));
while (randomColors.contains(color)) {
color = new Color(random.nextInt(150), random.nextInt(150), random.nextInt(150));
}
randomColors.add(color);
return color;
}
private Color getRandomColor(final int index) {
if(randomColors.size() <= index) {
while (randomColors.size() <= index) {
randomColors.add(getNextRandomColor());
}
}
return randomColors.get(index);
}
private void renderPedestrians(final Graphics2D g) { private void renderPedestrians(final Graphics2D g) {
AgentRender agentRender = getAgentRender(); AgentRender agentRender = getAgentRender();
for (Pedestrian ped : model.getPedestrians()) { for (Pedestrian ped : model.getPedestrians()) {
Color agentColor = getPedestrianColor(ped); Color agentColor = getPedestrianColor(ped);
if(ped.updateCount != -1) {
agentColor = getRandomColor(ped.updateCount);
}
g.setColor(agentColor); g.setColor(agentColor);
VPoint position = ped.getPosition(); VPoint position = ped.getPosition();
agentRender.render(ped, agentColor, g); agentRender.render(ped, agentColor, g);
......
...@@ -15,7 +15,6 @@ import org.vadere.util.geometry.shapes.VPoint; ...@@ -15,7 +15,6 @@ import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VTriangle; import org.vadere.util.geometry.shapes.VTriangle;
import org.vadere.util.logging.Logger; import org.vadere.util.logging.Logger;
import org.vadere.util.math.IDistanceFunction; import org.vadere.util.math.IDistanceFunction;
import org.vadere.util.math.InterpolationUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
......
...@@ -121,7 +121,7 @@ public class GenEikMesh<V extends IVertex, E extends IHalfEdge, F extends IFace> ...@@ -121,7 +121,7 @@ public class GenEikMesh<V extends IVertex, E extends IHalfEdge, F extends IFace>
private static final Logger log = Logger.getLogger(GenEikMesh.class); private static final Logger log = Logger.getLogger(GenEikMesh.class);
static { static {
log.setDebug(); //log.setDebug();
} }
......
...@@ -65,19 +65,11 @@ public class MeshConstructor { ...@@ -65,19 +65,11 @@ public class MeshConstructor {
IDistanceFunction distanceFunction = IDistanceFunction.create(segmentBound, holes); IDistanceFunction distanceFunction = IDistanceFunction.create(segmentBound, holes);
logger.info("construct distance function"); logger.info("construct distance function");
IDistanceFunction distanceFunctionApproximation = new DistanceFunctionApproxBF(pslg, distanceFunction, () -> new PMesh()); IDistanceFunction distanceFunctionApproximation = new DistanceFunctionApproxBF(pslg, distanceFunction, () -> new PMesh());
((DistanceFunctionApproxBF) distanceFunctionApproximation).printPython();
IEdgeLengthFunction edgeLengthFunction = p -> hmin + smoothness * Math.abs((distanceFunctionApproximation).apply(p)); IEdgeLengthFunction edgeLengthFunction = p -> hmin + smoothness * Math.abs((distanceFunctionApproximation).apply(p));
EdgeLengthFunctionApprox edgeLengthFunctionApprox = new EdgeLengthFunctionApprox(pslg, edgeLengthFunction, p -> hmax); EdgeLengthFunctionApprox edgeLengthFunctionApprox = new EdgeLengthFunctionApprox(pslg, edgeLengthFunction, p -> hmax);
edgeLengthFunctionApprox.smooth(smoothness); edgeLengthFunctionApprox.smooth(smoothness);
logger.info("construct element size function"); logger.info("construct element size function");
edgeLengthFunctionApprox.printPython();
//((DistanceFunctionApproxBF) distanceFunctionApproximation).printPython();
//edgeLengthFunctionApprox.printPython();
//edgeLengthFunctionApprox.printPython();
Collection<VPolygon> polygons = pslg.getAllPolygons(); Collection<VPolygon> polygons = pslg.getAllPolygons();
//polygons.add(targetShape); //polygons.add(targetShape);
...@@ -107,14 +99,6 @@ public class MeshConstructor { ...@@ -107,14 +99,6 @@ public class MeshConstructor {
var meshPanel = new PMeshPanel(meshRenderer, 500, 500); var meshPanel = new PMeshPanel(meshRenderer, 500, 500);
meshPanel.display("EikMesh h0 = " + h0); meshPanel.display("EikMesh h0 = " + h0);
/*try {
MovRecorder<PVertex, PHalfEdge, PFace> movRecorder = new MovRecorder<>(meshImprover, meshRenderer, 500, 500);
movRecorder.record();
movRecorder.finish();
} catch (IOException e) {
e.printStackTrace();
}*/
while (!meshImprover.isFinished()) { while (!meshImprover.isFinished()) {
synchronized (meshImprover.getMesh()) { synchronized (meshImprover.getMesh()) {
meshImprover.improve(); meshImprover.improve();
...@@ -123,35 +107,6 @@ public class MeshConstructor { ...@@ -123,35 +107,6 @@ public class MeshConstructor {
meshPanel.repaint(); meshPanel.repaint();
} }
logger.info("generation completed."); logger.info("generation completed.");
/*BufferedWriter meshWriter = null;
try {
File dir = new File("/Users/bzoennchen/Development/workspaces/hmRepo/PersZoennchen/PhD/trash/generated/eikmesh/");
BufferedWriter bufferedWriterQualities1 = IOUtils.getWriter("qualities1_eik.csv", dir);
bufferedWriterQualities1.write("iteration quality\n");
BufferedWriter bufferedWriterQualities2 = IOUtils.getWriter("qualities2_eik.csv", dir);
bufferedWriterQualities2.write("iteration quality\n");
BufferedWriter bufferedWriterAngles = IOUtils.getWriter("angles_eik.csv", dir);
bufferedWriterAngles.write("iteration angle\n");
bufferedWriterQualities1.write(printQualities(200, meshImprover.getMesh(), f -> meshImprover.getTriangulation().faceToQuality(f)));
bufferedWriterQualities1.close();
bufferedWriterQualities2.write(printQualities(200, meshImprover.getMesh(), f -> meshImprover.getTriangulation().faceToLongestEdgeQuality(f)));
bufferedWriterQualities2.close();
bufferedWriterAngles.write(printAngles(200, meshImprover.getMesh()));
bufferedWriterAngles.close();
meshWriter = IOUtils.getWriter("kaiserslautern_mittel.tex", dir);
meshWriter.write(TexGraphGenerator.toTikz(meshImprover.getMesh(), f -> Colors.YELLOW, e -> Color.BLACK, vertexColorFunction, 1.0f, true));
meshWriter.close();
} catch (IOException e) {
e.printStackTrace();
}*/
} else { } else {
meshImprover.generate(); meshImprover.generate();
...@@ -159,59 +114,6 @@ public class MeshConstructor { ...@@ -159,59 +114,6 @@ public class MeshConstructor {
return meshImprover.getMesh(); return meshImprover.getMesh();
} }
/*public IMesh<PVertex, PHalfEdge, PFace> pslgToUniformPMesh(@NotNull final PSLG pslg, final double hmin, final double hmax, final boolean viszalize) {
EdgeLengthFunctionApprox edgeLengthFunctionApprox = new EdgeLengthFunctionApprox(pslg, p -> Double.POSITIVE_INFINITY, p -> hmax);
edgeLengthFunctionApprox.smooth(0.4);
logger.info("construct element size function");
//edgeLengthFunctionApprox.printPython();
Collection<VPolygon> holes = pslg.getHoles();
VPolygon segmentBound = pslg.getSegmentBound();
IDistanceFunction distanceFunction = IDistanceFunction.create(segmentBound, holes);
logger.info("construct distance function");
IDistanceFunction distanceFunctionApproximation = new DistanceFunctionApproxBF(pslg, distanceFunction, () -> new PMesh());
Collection<VPolygon> polygons = pslg.getAllPolygons();
//polygons.add(targetShape);
// (3) use EikMesh to improve the mesh
double h0 = hmin;
var meshImprover = new PEikMesh(
distanceFunctionApproximation,
p -> edgeLengthFunctionApprox.apply(p),
h0,
pslg.getBoundingBox(),
polygons
);
if(viszalize) {
Function<PVertex, Color> vertexColorFunction = v -> {
if(meshImprover.isSlidePoint(v)){
return Colors.BLUE;
} else if(meshImprover.isFixPoint(v)) {
return Colors.RED;
} else {
return Color.BLACK;
}
};
var meshRenderer = new MeshRenderer<>(meshImprover.getMesh(), f -> false, f -> Colors.YELLOW, e -> Color.BLACK, vertexColorFunction);
var meshPanel = new PMeshPanel(meshRenderer, 500, 500);
meshPanel.display("EikMesh uniform h0 = " + h0);
while (!meshImprover.isFinished()) {
synchronized (meshImprover.getMesh()) {
meshImprover.improve();
}
meshPanel.repaint();
}
} else {
meshImprover.generate();
}
return meshImprover.getMesh();
}*/
public IMesh<PVertex, PHalfEdge, PFace> pslgToUniformPMesh(@NotNull final PSLG pslg, final double h0, final boolean viszalize) { public IMesh<PVertex, PHalfEdge, PFace> pslgToUniformPMesh(@NotNull final PSLG pslg, final double h0, final boolean viszalize) {
Collection<VPolygon> holes = pslg.getHoles(); Collection<VPolygon> holes = pslg.getHoles();
VPolygon segmentBound = pslg.getSegmentBound(); VPolygon segmentBound = pslg.getSegmentBound();
...@@ -274,12 +176,6 @@ public class MeshConstructor { ...@@ -274,12 +176,6 @@ public class MeshConstructor {
logger.info("construct element size function"); logger.info("construct element size function");
edgeLengthFunctionApprox.printPython(); edgeLengthFunctionApprox.printPython();
//((DistanceFunctionApproxBF) distanceFunctionApproximation).printPython();
//edgeLengthFunctionApprox.printPython();
//edgeLengthFunctionApprox.printPython();
Collection<VPolygon> polygons = pslg.getAllPolygons(); Collection<VPolygon> polygons = pslg.getAllPolygons();
//polygons.add(targetShape); //polygons.add(targetShape);
...@@ -307,14 +203,6 @@ public class MeshConstructor { ...@@ -307,14 +203,6 @@ public class MeshConstructor {
var meshPanel = new PMeshPanel(meshRenderer, 500, 500); var meshPanel = new PMeshPanel(meshRenderer, 500, 500);
meshPanel.display("EikMesh h0 = " + h0); meshPanel.display("EikMesh h0 = " + h0);
/*try {
MovRecorder<PVertex, PHalfEdge, PFace> movRecorder = new MovRecorder<>(meshImprover, meshRenderer, 500, 500);
movRecorder.record();
movRecorder.finish();
} catch (IOException e) {
e.printStackTrace();
}*/
while (!meshImprover.isFinished()) { while (!meshImprover.isFinished()) {
synchronized (meshImprover.getMesh()) { synchronized (meshImprover.getMesh()) {
meshImprover.improve(); meshImprover.improve();
...@@ -323,35 +211,6 @@ public class MeshConstructor { ...@@ -323,35 +211,6 @@ public class MeshConstructor {
meshPanel.repaint(); meshPanel.repaint();
} }
logger.info("generation completed."); logger.info("generation completed.");
/*BufferedWriter meshWriter = null;
try {
File dir = new File("/Users/bzoennchen/Development/workspaces/hmRepo/PersZoennchen/PhD/trash/generated/eikmesh/");
BufferedWriter bufferedWriterQualities1 = IOUtils.getWriter("qualities1_eik.csv", dir);
bufferedWriterQualities1.write("iteration quality\n");
BufferedWriter bufferedWriterQualities2 = IOUtils.getWriter("qualities2_eik.csv", dir);
bufferedWriterQualities2.write("iteration quality\n");
BufferedWriter bufferedWriterAngles = IOUtils.getWriter("angles_eik.csv", dir);
bufferedWriterAngles.write("iteration angle\n");
bufferedWriterQualities1.write(printQualities(200, meshImprover.getMesh(), f -> meshImprover.getTriangulation().faceToQuality(f)));
bufferedWriterQualities1.close();
bufferedWriterQualities2.write(printQualities(200, meshImprover.getMesh(), f -> meshImprover.getTriangulation().faceToLongestEdgeQuality(f)));
bufferedWriterQualities2.close();
bufferedWriterAngles.write(printAngles(200, meshImprover.getMesh()));
bufferedWriterAngles.close();
meshWriter = IOUtils.getWriter("kaiserslautern_mittel.tex", dir);
meshWriter.write(TexGraphGenerator.toTikz(meshImprover.getMesh(), f -> Colors.YELLOW, e -> Color.BLACK, vertexColorFunction, 1.0f, true));
meshWriter.close();
} catch (IOException e) {
e.printStackTrace();
}*/
} else { } else {
meshImprover.generate(); meshImprover.generate();
......
package org.vadere.simulator.examples; package org.vadere.simulator.examples.Meshing;
import org.vadere.meshing.mesh.gen.MeshPanel; import org.vadere.meshing.mesh.gen.MeshPanel;
import org.vadere.meshing.mesh.gen.PFace; import org.vadere.meshing.mesh.gen.PFace;
......
package org.vadere.simulator.examples; package org.vadere.simulator.examples.Meshing;
import org.vadere.meshing.WeilerAtherton; import org.vadere.meshing.WeilerAtherton;
import org.vadere.meshing.mesh.gen.IncrementalTriangulation; import org.vadere.meshing.mesh.gen.IncrementalTriangulation;
......
package org.vadere.simulator.examples; package org.vadere.simulator.examples.Meshing;
import org.vadere.meshing.examples.ElementSizeFunction; import org.vadere.meshing.examples.ElementSizeFunction;
import org.vadere.meshing.mesh.gen.PMesh; import org.vadere.meshing.mesh.gen.PMesh;
......
package org.vadere.simulator.examples; package org.vadere.simulator.examples.Meshing;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.vadere.meshing.mesh.gen.PFace; import org.vadere.meshing.mesh.gen.PFace;
......
package org.vadere.simulator.examples; package org.vadere.simulator.examples.Meshing;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.time.StopWatch; import org.apache.commons.lang3.time.StopWatch;
......
...@@ -49,38 +49,22 @@ public class UpdateSchemeEventDrivenParallel extends UpdateSchemeEventDriven { ...@@ -49,38 +49,22 @@ public class UpdateSchemeEventDrivenParallel extends UpdateSchemeEventDriven {
super(topography); super(topography);
this.topography = topography; this.topography = topography;
this.pedestrianPotentialWidth = pedestrianPotentialWidth; this.pedestrianPotentialWidth = pedestrianPotentialWidth;
File dir = new File("/Users/bzoennchen/Development/workspaces/hmRepo/PersZoennchen/PhD/trash/generated/parallelOSM/");
try {
bufferedWriter = IOUtils.getWriter("histogram.csv", dir);
bufferedWriter.write("iteration round\n");
} catch (IOException e) {
e.printStackTrace();
}
} }
@Override @Override
public void update(final double timeStepInSec, final double currentTimeInSec) { public void update(final double timeStepInSec, final double currentTimeInSec) {
ArrayList<Integer> histUpdateable = new ArrayList<>();
topography.getElements(PedestrianOSM.class).parallelStream().forEach(pedestrianOSM -> pedestrianOSM.clearStrides()); topography.getElements(PedestrianOSM.class).parallelStream().forEach(pedestrianOSM -> pedestrianOSM.clearStrides());
if(sideLength <= 0) { double maxStepSize = topography.getElements(PedestrianOSM.class).parallelStream().mapToDouble(ped -> ped.getDesiredStepSize()).max().orElse(0);
double maxStepSize = topography.getElements(PedestrianOSM.class).parallelStream().mapToDouble(ped -> ped.getDesiredStepSize()).max().orElse(0); double maxDesiredSpeed = topography.getElements(PedestrianOSM.class).parallelStream().mapToDouble(ped -> ped.getDesiredSpeed()).max().orElse(0);
double maxDesiredSpeed = topography.getElements(PedestrianOSM.class).parallelStream().mapToDouble(ped -> ped.getDesiredSpeed()).max().orElse(0);
//double stepSize = Math.max(maxStepSize, maxDesiredSpeed * timeStepInSec);
//double sideLength = (stepSize+pedestrianPotentialWidth) * 2.0;
double stepSize = maxStepSize;
sideLength = (2.0*stepSize+pedestrianPotentialWidth); ;
//logger.debug("initial grid with a grid edge length equal to " + sideLength);
}
for(PedestrianOSM ped : pedestrianEventsQueue) { double stepSize = Math.max(maxStepSize, maxDesiredSpeed * timeStepInSec);
ped.updateCount = -1; // this formula is slightly different than the formula in the PhD of B. Zoennchen (p. 63, eq. 5.3)
} // bit it is a good approximation
double sideLength = (2.0 * stepSize + pedestrianPotentialWidth);
//logger.debug("initial grid with a grid edge length equal to " + sideLength);
int nCells = 0; int nCells = 0;
int counter = 1; int counter = 1;
// event driven update ignores time credits // event driven update ignores time credits
do { do {
...@@ -97,10 +81,10 @@ public class UpdateSchemeEventDrivenParallel extends UpdateSchemeEventDriven { ...@@ -97,10 +81,10 @@ public class UpdateSchemeEventDrivenParallel extends UpdateSchemeEventDriven {
// lock cell of the agent // lock cell of the agent
if(!locked[gridPos[0]][gridPos[1]]) { if(!locked[gridPos[0]][gridPos[1]]) {
updateAbleAgents.add(ped); updateAbleAgents.add(ped);
ped.updateCount = counter; //ped.updateCount = counter;
} else { } else {
notUpdateAbleAgents.add(ped); notUpdateAbleAgents.add(ped);
ped.updateCount = -1; //ped.updateCount = -1;
} }
// lock neighbours // lock neighbours
...@@ -113,8 +97,6 @@ public class UpdateSchemeEventDrivenParallel extends UpdateSchemeEventDriven { ...@@ -113,8 +97,6 @@ public class UpdateSchemeEventDrivenParallel extends UpdateSchemeEventDriven {
} }
} }
histUpdateable.add(updateAbleAgents.size());
//logger.debug("not updated " + notUpdateAbleAgents.size() + " " + counter + "."); //logger.debug("not updated " + notUpdateAbleAgents.size() + " " + counter + ".");
updateAbleAgents.parallelStream().forEach(ped -> { updateAbleAgents.parallelStream().forEach(ped -> {
//logger.info(ped.getTimeOfNextStep()); //logger.info(ped.getTimeOfNextStep());
...@@ -128,20 +110,5 @@ public class UpdateSchemeEventDrivenParallel extends UpdateSchemeEventDriven { ...@@ -128,20 +110,5 @@ public class UpdateSchemeEventDrivenParallel extends UpdateSchemeEventDriven {
} while (!pedestrianEventsQueue.isEmpty() && pedestrianEventsQueue.peek().getTimeOfNextStep() < currentTimeInSec); } while (!pedestrianEventsQueue.isEmpty() && pedestrianEventsQueue.peek().getTimeOfNextStep() < currentTimeInSec);
iteration++; iteration++;
logger.debug("rounds: " + counter + ", #peds: " + topography.getPedestrianDynamicElements().getElements().size() + ", cells: " + nCells + ", sideLen:" + sideLength); logger.debug("rounds: " + counter + ", #peds: " + topography.getPedestrianDynamicElements().getElements().size() + ", cells: " + nCells + ", sideLen:" + sideLength);
try {
StringBuilder builder = new StringBuilder();
for(int round = 1; round <= histUpdateable.size(); round++) {
for(int i = 0; i < histUpdateable.get(round-1); i++) {
builder.append(iteration);
builder.append(" ");
builder.append(round);
builder.append("\n");
}
}
bufferedWriter.write(builder.toString());
bufferedWriter.flush();
} catch (IOException e) {
e.printStackTrace();
}
} }
} }
...@@ -130,7 +130,7 @@ public class EikonalSolverFIM extends AGridEikonalSolver { ...@@ -130,7 +130,7 @@ public class EikonalSolverFIM extends AGridEikonalSolver {
activeList.addAll(newActiveList); activeList.addAll(newActiveList);
} }
System.out.println("#update / #vertices: " + nUpdates + " / " + cellGrid.pointStream().filter(p -> cellGrid.getValue(p).tag == PathFindingTag.Reached).count()); logger.debug("#update / #vertices: " + nUpdates + " / " + cellGrid.pointStream().filter(p -> cellGrid.getValue(p).tag == PathFindingTag.Reached).count());
nUpdates = 0; nUpdates = 0;
} }
......
...@@ -81,7 +81,6 @@ public class EikonalSolverFMM extends AGridEikonalSolver { ...@@ -81,7 +81,6 @@ public class EikonalSolverFMM extends AGridEikonalSolver {
} }
long runTime = System.currentTimeMillis() - ms; long runTime = System.currentTimeMillis() - ms;
logger.debug("fmm on the gird run time = " + runTime + ", #updates = " + updates); logger.debug("fmm on the gird run time = " + runTime + ", #updates = " + updates);
System.out.println("fmm on the gird run time = " + runTime + ", #updates = " + updates);
} }
/** /**
......
...@@ -16,7 +16,11 @@ import java.util.List; ...@@ -16,7 +16,11 @@ import java.util.List;
import java.util.ListIterator; import java.util.ListIterator;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/**