we are still doing isValid

This commit is contained in:
knzrd 2025-04-04 10:50:23 +02:00
parent 623774148d
commit c39df6a694

View file

@ -187,7 +187,9 @@ public class Path {
* @deprecated Need to be implemented.
*/
public boolean isValid() {
// TODO:
if (this.isEmpty() || !(this.origin.hasSuccessors()) || (this.origin()==this.arcs[0].getOrigin() && (for(i=0;i<this.arcs.getLength(),i++)) )){
};
return false;
}
@ -210,7 +212,6 @@ public class Path {
* @param speed Speed to compute the travel time.
* @return Time (in seconds) required to travel this path at the given speed (in
* kilometers-per-hour).
* @deprecated Need to be implemented.
*/
public double getTravelTime(double speed) {
double longueur = (double) this.getLength() / 1000;
@ -223,11 +224,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 mintime = 0;
for (Arc a : this.arcs) {
mintime = mintime + a.getMinimumTravelTime();
}
return mintime;
}
}