diff --git a/src/main/org/insa/algo/ArcInspectorFactory.java b/src/main/org/insa/algo/ArcInspectorFactory.java index 2404674..aa1f8f7 100644 --- a/src/main/org/insa/algo/ArcInspectorFactory.java +++ b/src/main/org/insa/algo/ArcInspectorFactory.java @@ -79,6 +79,34 @@ public class ArcInspectorFactory { }); // Only road allowed for cars and time: + + filters.add(new ArcInspector() { + @Override + public boolean isAllowed(Arc arc) { + return true; + } + + @Override + public double getCost(Arc arc) { + return arc.getMinimumTravelTime(); + } + + @Override + public int getMaximumSpeed() { + return GraphStatistics.NO_MAXIMUM_SPEED; + } + + @Override + public Mode getMode() { + return Mode.TIME; + } + + @Override + public String toString() { + return "Fastest path, all roads allowed"; + } + }); + filters.add(new ArcInspector() { @Override public boolean isAllowed(Arc arc) { diff --git a/src/main/org/insa/graphics/AlgorithmPanel.java b/src/main/org/insa/graphics/AlgorithmPanel.java index fdbc28e..b1e7532 100644 --- a/src/main/org/insa/graphics/AlgorithmPanel.java +++ b/src/main/org/insa/graphics/AlgorithmPanel.java @@ -194,7 +194,7 @@ public class AlgorithmPanel extends JPanel implements DrawingChangeListener { c.gridy = 1; c.gridx = 0; c.weightx = 0; - modeAndObserverPanel.add(new JLabel("Restrictions: "), c); + modeAndObserverPanel.add(new JLabel("Mode: "), c); c.gridx = 1; c.gridwidth = 2; c.weightx = 1;