MATSIM
LeastCostPathCalculator.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * LeastCostPathCalculator.java
4  * *
5  * *********************************************************************** *
6  * *
7  * copyright : (C) 2007 by the members listed in the COPYING, *
8  * LICENSE and WARRANTY file. *
9  * email : info at matsim dot org *
10  * *
11  * *********************************************************************** *
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * See also COPYING, LICENSE and WARRANTY file *
18  * *
19  * *********************************************************************** */
20 
21 package org.matsim.core.router.util;
22 
23 import java.util.List;
24 
28 import org.matsim.vehicles.Vehicle;
29 
30 public interface LeastCostPathCalculator {
31 
32  Path calcLeastCostPath(Node fromNode, Node toNode, double starttime, final Person person, final Vehicle vehicle);
33 
34  class Path {
35  public List<Node> nodes;
36  public final List<Link> links;
37  public final double travelTime;
38  public final double travelCost;
39 
40  public Path(final List<Node> nodes, final List<Link> links, final double travelTime, final double travelCost) {
41  this.nodes = nodes;
42  this.links = links;
43  this.travelTime = travelTime;
44  this.travelCost = travelCost;
45  }
46 
47  public Node getFromNode() {
48  return nodes.get(0);
49  }
50 
51  public Node getToNode() {
52  return nodes.get(nodes.size() - 1);
53  }
54  }
55 }
Path calcLeastCostPath(Node fromNode, Node toNode, double starttime, final Person person, final Vehicle vehicle)
Path(final List< Node > nodes, final List< Link > links, final double travelTime, final double travelCost)