MinGetTravelTimeFini
This commit is contained in:
parent
61b5068180
commit
c2e656059a
1 changed files with 17 additions and 3 deletions
|
@ -30,7 +30,16 @@ public class Path {
|
||||||
public static Path createFastestPathFromNodes(Graph graph, List<Node> nodes)
|
public static Path createFastestPathFromNodes(Graph graph, List<Node> nodes)
|
||||||
throws IllegalArgumentException {
|
throws IllegalArgumentException {
|
||||||
List<Arc> arcs = new ArrayList<Arc>();
|
List<Arc> arcs = new ArrayList<Arc>();
|
||||||
// TODO:
|
|
||||||
|
for(Node node : nodes)
|
||||||
|
{
|
||||||
|
for( Arc arc : node.getSuccessors())
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return new Path(graph, arcs);
|
return new Path(graph, arcs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,8 +241,13 @@ public class Path {
|
||||||
* @deprecated Need to be implemented.
|
* @deprecated Need to be implemented.
|
||||||
*/
|
*/
|
||||||
public double getMinimumTravelTime() {
|
public double getMinimumTravelTime() {
|
||||||
// TODO:
|
|
||||||
return 0;
|
double time = 0.0;
|
||||||
|
for(Arc arcs : this.arcs)
|
||||||
|
{
|
||||||
|
time += arcs.getMinimumTravelTime();
|
||||||
|
}
|
||||||
|
return time;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue