made getTravelTime()

This commit is contained in:
Sebastien Moll 2026-04-15 16:33:02 +02:00
parent 5140e88075
commit 2f523b12c3

View file

@ -208,11 +208,13 @@ public class Path {
* @param speed Speed to compute the travel time. * @param speed Speed to compute the travel time.
* @return Time (in seconds) required to travel this path at the given speed (in * @return Time (in seconds) required to travel this path at the given speed (in
* kilometers-per-hour). * kilometers-per-hour).
* @deprecated Need to be implemented.
*/ */
public double getTravelTime(double speed) { public double getTravelTime(double speed) {
// TODO: double ttime = 0;
return 0; for (Arc thisArc : arcs) {
ttime += thisArc.getTravelTime(speed);
}
return ttime;
} }
/** /**