ajout: Implémentation de Path#getMinimumTravelTime()
This commit is contained in:
parent
4f95b5539b
commit
370fe10947
1 changed files with 5 additions and 3 deletions
|
|
@ -239,11 +239,13 @@ public class Path {
|
|||
* every arc.
|
||||
*
|
||||
* @return Minimum travel time to travel this path (in seconds).
|
||||
* @deprecated Need to be implemented.
|
||||
*/
|
||||
public double getMinimumTravelTime() {
|
||||
// TODO:
|
||||
return 0;
|
||||
double time = 0;
|
||||
for(Arc arc : this.arcs){
|
||||
time += arc.getLength()/arc.getRoadInformation().getMaximumSpeed();
|
||||
}
|
||||
return time*3.6;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue